SharedTempStoreFactory
class SharedTempStoreFactory (View source)
Creates a shared temporary storage for a collection.
Properties
| protected KeyValueExpirableFactoryInterface | $storageFactory | The storage factory creating the backend to store the data. |
|
| protected LockBackendInterface | $lockBackend | The lock object used for this data. |
|
| protected RequestStack | $requestStack | The request stack. |
|
| protected int | $expire | The time to live for items in seconds. |
Methods
__construct(KeyValueExpirableFactoryInterface $storage_factory, LockBackendInterface $lock_backend, RequestStack $request_stack, int $expire = 604800)
Constructs a Drupal\Core\TempStore\SharedTempStoreFactory object.
get(string $collection, mixed $owner = NULL)
Creates a SharedTempStore for the current user or anonymous session.
Details
__construct(KeyValueExpirableFactoryInterface $storage_factory, LockBackendInterface $lock_backend, RequestStack $request_stack, int $expire = 604800)
Constructs a Drupal\Core\TempStore\SharedTempStoreFactory object.
SharedTempStore
get(string $collection, mixed $owner = NULL)
Creates a SharedTempStore for the current user or anonymous session.