Drupal 8  8.0.2
SharedTempStoreFactory Class Reference

Public Member Functions

 __construct (KeyValueExpirableFactoryInterface $storage_factory, LockBackendInterface $lock_backend, RequestStack $request_stack, $expire=604800)
 get ($collection, $owner=NULL)

Protected Attributes


Detailed Description

Creates a shared temporary storage for a collection.

Constructor & Destructor Documentation

__construct ( KeyValueExpirableFactoryInterface  $storage_factory,
LockBackendInterface  $lock_backend,
RequestStack  $request_stack,
  $expire = 604800 

Constructs a Drupal object.

\Drupal\Core\KeyValueStore\KeyValueExpirableFactoryInterface$storage_factoryThe key/value store factory.
\Drupal\Core\Lock\LockBackendInterface$lock_backendThe lock object used for this data.
\Symfony\Component\HttpFoundation\RequestStack$request_stackThe request stack.
int$expireThe time to live for items, in seconds.

References Drupal\requestStack().

Here is the call graph for this function:

Member Function Documentation

get (   $collection,
  $owner = NULL 

Creates a SharedTempStore for the current user or anonymous session.

string$collectionThe 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.
An instance of the key/value store.

References Drupal\currentUser(), and Drupal\requestStack().

Referenced by BreakLockForm\__construct(), and ViewEditForm\__construct().

Here is the call graph for this function:

Here is the caller graph for this function:

Field Documentation

Drupal Core Lock LockBackendInterface $lockBackend

The lock object used for this data.

The documentation for this class was generated from the following file: