SharedTempStoreFactory::$requestStack

The request stack. Type: \Symfony\Component\HttpFoundation\RequestStack File core/modules/user/src/SharedTempStoreFactory.php, line 33 Class SharedTempStoreFactory Creates a shared temporary storage for a collection. Namespace Drupal\user Code protected $requestStack;

SharedTempStoreFactory::$lockBackend

The lock object used for this data. Type: \Drupal\Core\Lock\LockBackendInterface $lockBackend File core/modules/user/src/SharedTempStoreFactory.php, line 26 Class SharedTempStoreFactory Creates a shared temporary storage for a collection. Namespace Drupal\user Code protected $lockBackend;

SharedTempStoreFactory::$storageFactory

The storage factory creating the backend to store the data. Type: \Drupal\Core\KeyValueStore\KeyValueExpirableFactoryInterface File core/modules/user/src/SharedTempStoreFactory.php, line 19 Class SharedTempStoreFactory Creates a shared temporary storage for a collection. Namespace Drupal\user Code protected $storageFactory;

SharedTempStoreFactory

Creates a shared temporary storage for a collection. Hierarchy class \Drupal\user\SharedTempStoreFactory File core/modules/user/src/SharedTempStoreFactory.php, line 12 Namespace Drupal\user Members Name Modifiers Type Description SharedTempStoreFactory::$expire protected property The time to live for items in seconds. SharedTempStoreFactory::$lockBackend protected property The lock object used for this data. SharedTempStoreFactory::$requestStack protected p

SharedTempStoreFactory::get

SharedTempStoreFactory::get($collection, $owner = NULL) Creates a SharedTempStore for the current user or anonymous session. Parameters string $collection: The collection name to use for this key/value store. This is typically a shared namespace or module name, e.g. 'views', 'entity', etc. mixed $owner: (optional) The owner of this SharedTempStore. By default, the SharedTempStore is owned by the currently authenticated user, or by the active anonymous session if no user is logged in. Return va

SharedTempStore::setIfNotExists

public SharedTempStore::setIfNotExists($key, $value) Stores a particular key/value pair only if the key doesn't already exist. Parameters string $key: The key of the data to check and store. mixed $value: The data to store. Return value bool TRUE if the data was set, or FALSE if it already existed. File core/modules/user/src/SharedTempStore.php, line 144 Class SharedTempStore Stores and retrieves temporary data for a given owner. Namespace Drupal\user Code public function setIfNotExi

SharedTempStore::setIfOwner

public SharedTempStore::setIfOwner($key, $value) Stores a particular key/value pair in this SharedTempStore. Only stores the given key/value pair if it does not exist yet or is owned by $this->owner. Parameters string $key: The key of the data to store. mixed $value: The data to store. Return value bool TRUE if the data was set, or FALSE if it already exists and is not owned by $this->user. File core/modules/user/src/SharedTempStore.php, line 168 Class SharedTempStore Stores and re

SharedTempStore::set

public SharedTempStore::set($key, $value) Stores a particular key/value pair in this SharedTempStore. Parameters string $key: The key of the data to store. mixed $value: The data to store. File core/modules/user/src/SharedTempStore.php, line 189 Class SharedTempStore Stores and retrieves temporary data for a given owner. Namespace Drupal\user Code public function set($key, $value) { if (!$this->lockBackend->acquire($key)) { $this->lockBackend->wait($key); if (!$t

SharedTempStore::__construct

public SharedTempStore::__construct(KeyValueStoreExpirableInterface $storage, LockBackendInterface $lock_backend, $owner, RequestStack $request_stack, $expire = 604800) Constructs a new object for accessing data from a key/value store. Parameters 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 $lock_back

SharedTempStore::deleteIfOwner

public SharedTempStore::deleteIfOwner($key) Deletes data from the store for a given key and releases the lock on it. Only delete the given key if it is owned by $this->owner. Parameters string $key: The key of the data to delete. Return value bool TRUE if the object was deleted or does not exist, FALSE if it exists but is not owned by $this->owner. File core/modules/user/src/SharedTempStore.php, line 255 Class SharedTempStore Stores and retrieves temporary data for a given owner.