class Lock
Same name in other branches
- 9 core/lib/Drupal/Core/TempStore/Lock.php \Drupal\Core\TempStore\Lock
- 8.9.x core/lib/Drupal/Core/TempStore/Lock.php \Drupal\Core\TempStore\Lock
- 10 core/lib/Drupal/Core/TempStore/Lock.php \Drupal\Core\TempStore\Lock
Provides a value object representing the lock from a TempStore.
Hierarchy
- class \Drupal\Core\TempStore\Lock
Expanded class hierarchy of Lock
4 files declare their use of Lock
- PrivateTempStoreTest.php in core/
tests/ Drupal/ Tests/ Core/ TempStore/ PrivateTempStoreTest.php - SharedTempStoreTest.php in core/
tests/ Drupal/ Tests/ Core/ TempStore/ SharedTempStoreTest.php - ViewUI.php in core/
modules/ views_ui/ src/ ViewUI.php - ViewUIObjectTest.php in core/
modules/ views_ui/ tests/ src/ Unit/ ViewUIObjectTest.php
22 string references to 'Lock'
- AliasTest::testPrefixList in core/
modules/ path_alias/ tests/ src/ Kernel/ AliasTest.php - Tests the alias prefix.
- AliasTest::testPrefixListCacheDeletionMidRequest in core/
modules/ path_alias/ tests/ src/ Kernel/ AliasTest.php - Tests situation where the prefix list cache is deleted mid-request.
- CacheCollectorTest::testCacheCollector in core/
tests/ Drupal/ KernelTests/ Core/ Cache/ CacheCollectorTest.php - Tests setting and invalidating.
- CheckpointStorageTest::getConfigImporter in core/
tests/ Drupal/ KernelTests/ Core/ Config/ Storage/ Checkpoint/ CheckpointStorageTest.php - CKEditor5ImageController::create in core/
modules/ ckeditor5/ src/ Controller/ CKEditor5ImageController.php
File
-
core/
lib/ Drupal/ Core/ TempStore/ Lock.php, line 8
Namespace
Drupal\Core\TempStoreView source
final class Lock {
/**
* The owner ID.
*
* @var int
*/
private $ownerId;
/**
* The timestamp the lock was last updated.
*
* @var int
*/
private $updated;
/**
* Constructs a new Lock object.
*
* @param int $owner_id
* The owner ID.
* @param int $updated
* The updated timestamp.
*/
public function __construct($owner_id, $updated) {
$this->ownerId = $owner_id;
$this->updated = $updated;
}
/**
* Gets the owner ID.
*
* @return int
* The owner ID.
*/
public function getOwnerId() {
return $this->ownerId;
}
/**
* Gets the timestamp of the last update to the lock.
*
* @return int
* The updated timestamp.
*/
public function getUpdated() {
return $this->updated;
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
Lock::$ownerId | private | property | The owner ID. |
Lock::$updated | private | property | The timestamp the lock was last updated. |
Lock::getOwnerId | public | function | Gets the owner ID. |
Lock::getUpdated | public | function | Gets the timestamp of the last update to the lock. |
Lock::__construct | public | function | Constructs a new Lock object. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.