function Drupal::lock
Same name in other branches
- 8.9.x core/lib/Drupal.php \Drupal::lock()
- 10 core/lib/Drupal.php \Drupal::lock()
- 11.x core/lib/Drupal.php \Drupal::lock()
Returns the locking layer instance.
Return value
\Drupal\Core\Lock\LockBackendInterface
Related topics
11 calls to Drupal::lock()
- DrupalTest::testLock in core/
tests/ Drupal/ Tests/ Core/ DrupalTest.php - Tests the lock() method.
- RegistryLegacyTest::testMultipleSubThemes in core/
tests/ Drupal/ KernelTests/ Core/ Theme/ RegistryLegacyTest.php - Tests the theme registry with theme functions and multiple subthemes.
- RegistryLegacyTest::testRegistryConstructorParameters in core/
tests/ Drupal/ KernelTests/ Core/ Theme/ RegistryLegacyTest.php - Tests the order of registry parameters.
- RegistryLegacyTest::testSuggestionPreprocessFunctions in core/
tests/ Drupal/ KernelTests/ Core/ Theme/ RegistryLegacyTest.php - Tests the theme registry with theme functions with suggestions.
- RegistryTest::testMultipleSubThemes in core/
tests/ Drupal/ KernelTests/ Core/ Theme/ RegistryTest.php - Tests the theme registry with multiple subthemes.
File
-
core/
lib/ Drupal.php, line 399
Class
- Drupal
- Static Service Container wrapper.
Code
public static function lock() {
return static::getContainer()->get('lock');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.