public function SharedTempStore::delete in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/user/src/SharedTempStore.php \Drupal\user\SharedTempStore::delete()
Deletes data from the store for a given key and releases the lock on it.
Parameters
string $key: The key of the data to delete.
1 call to SharedTempStore::delete()
- SharedTempStore::deleteIfOwner in core/
modules/ user/ src/ SharedTempStore.php - Deletes data from the store for a given key and releases the lock on it.
File
- core/
modules/ user/ src/ SharedTempStore.php, line 237 - Contains \Drupal\user\SharedTempStore.
Class
- SharedTempStore
- Stores and retrieves temporary data for a given owner.
Namespace
Drupal\userCode
public function delete($key) {
if (!$this->lockBackend
->acquire($key)) {
$this->lockBackend
->wait($key);
if (!$this->lockBackend
->acquire($key)) {
throw new TempStoreException("Couldn't acquire lock to delete item '{$key}' from {$this->storage->getCollectionName()} temporary storage.");
}
}
$this->storage
->delete($key);
$this->lockBackend
->release($key);
}