You are here

public static function Drupal::lock in Drupal 8

Same name and namespace in other branches
  1. 9 core/lib/Drupal.php \Drupal::lock()

Returns the locking layer instance.

Return value

\Drupal\Core\Lock\LockBackendInterface

Related topics

10 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::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.
RegistryTest::testRaceCondition in core/tests/Drupal/KernelTests/Core/Theme/RegistryTest.php
Tests the behavior of the theme registry class.

... See full list

File

core/lib/Drupal.php, line 367
Contains \Drupal.

Class

Drupal
Static Service Container wrapper.

Code

public static function lock() {
  return static::getContainer()
    ->get('lock');
}