function SharedTempStoreFactory::__construct
Same name in other branches
- 9 core/lib/Drupal/Core/TempStore/SharedTempStoreFactory.php \Drupal\Core\TempStore\SharedTempStoreFactory::__construct()
- 8.9.x core/lib/Drupal/Core/TempStore/SharedTempStoreFactory.php \Drupal\Core\TempStore\SharedTempStoreFactory::__construct()
- 10 core/lib/Drupal/Core/TempStore/SharedTempStoreFactory.php \Drupal\Core\TempStore\SharedTempStoreFactory::__construct()
Constructs a Drupal\Core\TempStore\SharedTempStoreFactory object.
Parameters
\Drupal\Core\KeyValueStore\KeyValueExpirableFactoryInterface $storage_factory: The key/value store factory.
\Drupal\Core\Lock\LockBackendInterface $lock_backend: The lock object used for this data.
\Symfony\Component\HttpFoundation\RequestStack $request_stack: The request stack.
\Drupal\Core\Session\AccountProxyInterface $current_user: The current user.
int $expire: The time to live for items, in seconds.
File
-
core/
lib/ Drupal/ Core/ TempStore/ SharedTempStoreFactory.php, line 65
Class
- SharedTempStoreFactory
- Creates a shared temporary storage for a collection.
Namespace
Drupal\Core\TempStoreCode
public function __construct(KeyValueExpirableFactoryInterface $storage_factory, LockBackendInterface $lock_backend, RequestStack $request_stack, AccountProxyInterface $current_user, $expire = 604800) {
$this->storageFactory = $storage_factory;
$this->lockBackend = $lock_backend;
$this->requestStack = $request_stack;
$this->currentUser = $current_user;
$this->expire = $expire;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.