function LockBackendAbstract::getLockId

Same name in other branches
  1. 9 core/lib/Drupal/Core/Lock/LockBackendAbstract.php \Drupal\Core\Lock\LockBackendAbstract::getLockId()
  2. 8.9.x core/lib/Drupal/Core/Lock/LockBackendAbstract.php \Drupal\Core\Lock\LockBackendAbstract::getLockId()
  3. 10 core/lib/Drupal/Core/Lock/LockBackendAbstract.php \Drupal\Core\Lock\LockBackendAbstract::getLockId()

Overrides LockBackendInterface::getLockId

1 call to LockBackendAbstract::getLockId()
DatabaseLockBackend::releaseAll in core/lib/Drupal/Core/Lock/DatabaseLockBackend.php
Releases all locks for the given lock token identifier.

File

core/lib/Drupal/Core/Lock/LockBackendAbstract.php, line 68

Class

LockBackendAbstract
Non backend related common methods implementation for lock backends.

Namespace

Drupal\Core\Lock

Code

public function getLockId() {
    if (!isset($this->lockId)) {
        $this->lockId = uniqid((string) mt_rand(), TRUE);
    }
    return $this->lockId;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.