function lock

Get locking layer instance.

Return value

Drupal\Core\Lock\LockBackendInterface

Deprecated

Use Drupal::lock() instead, or even better have the lock service injected into your object.

Related topics

5 string references to 'lock'
ConfigImporterTest::setUp in drupal/core/modules/config/lib/Drupal/config/Tests/ConfigImporterTest.php
Sets up Drupal unit test environment.
DrupalUnitTestBase::containerBuild in drupal/core/modules/simpletest/lib/Drupal/simpletest/DrupalUnitTestBase.php
Sets up the base service container for this test.
install_begin_request in drupal/core/includes/install.core.inc
Begins an installation request, modifying the installation state as needed.
TestBase::configImporter in drupal/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php
Returns a ConfigImporter object to import test importing of configuration.
UpdateBundle::build in drupal/core/lib/Drupal/Core/DependencyInjection/UpdateBundle.php
Implements \Symfony\Component\HttpKernel\Bundle\BundleInterface::build().

File

drupal/core/includes/bootstrap.inc, line 3166
Functions that need to be loaded on every Drupal request.

Code

function lock() {
  return Drupal::lock();
}