You are here

function PrivateTempStoreFactory::__construct in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/modules/user/src/PrivateTempStoreFactory.php \Drupal\user\PrivateTempStoreFactory::__construct()

Constructs a Drupal\user\PrivateTempStoreFactory object.

Parameters

\Drupal\Core\Database\Connection $connection: The connection object used for this data.

\Drupal\Core\Lock\LockBackendInterface $lockBackend: The lock object used for this data.

int $expire: The time to live for items, in seconds.

File

core/modules/user/src/PrivateTempStoreFactory.php, line 65
Contains \Drupal\user\PrivateTempStoreFactory.

Class

PrivateTempStoreFactory
Creates a PrivateTempStore object for a given collection.

Namespace

Drupal\user

Code

function __construct(KeyValueExpirableFactoryInterface $storage_factory, LockBackendInterface $lockBackend, AccountProxyInterface $current_user, RequestStack $request_stack, $expire = 604800) {
  $this->storageFactory = $storage_factory;
  $this->lockBackend = $lockBackend;
  $this->currentUser = $current_user;
  $this->requestStack = $request_stack;
  $this->expire = $expire;
}