function PrivateTempStore::__construct
Same name and namespace in other branches
- 11.x core/lib/Drupal/Core/TempStore/PrivateTempStore.php \Drupal\Core\TempStore\PrivateTempStore::__construct()
- 10 core/lib/Drupal/Core/TempStore/PrivateTempStore.php \Drupal\Core\TempStore\PrivateTempStore::__construct()
- 9 core/lib/Drupal/Core/TempStore/PrivateTempStore.php \Drupal\Core\TempStore\PrivateTempStore::__construct()
- 8.9.x core/lib/Drupal/Core/TempStore/PrivateTempStore.php \Drupal\Core\TempStore\PrivateTempStore::__construct()
Constructs a new object for accessing data from a key/value store.
Parameters
\Drupal\Core\KeyValueStore\KeyValueStoreExpirableInterface $storage: The key/value storage object used for this data. Each storage object represents a particular collection of data and will contain any number of key/value pairs.
\Drupal\Core\Lock\LockBackendInterface $lockBackend: The lock object used for this data.
\Drupal\Core\Session\AccountProxyInterface $currentUser: The current user account.
\Symfony\Component\HttpFoundation\RequestStack $requestStack: The request stack.
int $expire: The time to live for items, in seconds.
File
-
core/
lib/ Drupal/ Core/ TempStore/ PrivateTempStore.php, line 50
Class
- PrivateTempStore
- Stores and retrieves temporary data for a given owner.
Namespace
Drupal\Core\TempStoreCode
public function __construct(protected KeyValueStoreExpirableInterface $storage, protected LockBackendInterface $lockBackend, protected AccountProxyInterface $currentUser, protected RequestStack $requestStack, protected $expire = 604800) {
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.