public function DatabaseLockBackend::releaseAll in Service Container 7
Same name and namespace in other branches
- 7.2 lib/Drupal/Core/Lock/DatabaseLockBackend.php \Drupal\Core\Lock\DatabaseLockBackend::releaseAll()
Implements Drupal\Core\Lock\LockBackedInterface::releaseAll().
Overrides LockBackendInterface::releaseAll
File
- lib/
Drupal/ Core/ Lock/ DatabaseLockBackend.php, line 131 - Contains \Drupal\Core\Lock\DatabaseLockBackend.
Class
- DatabaseLockBackend
- Defines the database lock backend. This is the default backend in Drupal.
Namespace
Drupal\Core\LockCode
public function releaseAll($lock_id = NULL) {
// Only attempt to release locks if any were acquired.
if (!empty($this->locks)) {
$this->locks = array();
if (empty($lock_id)) {
$lock_id = $this
->getLockId();
}
$this->database
->delete('semaphore')
->condition('value', $lock_id)
->execute();
}
}