PrivateTempStore::$currentUser

The current user. Type: \Drupal\Core\Session\AccountProxyInterface File core/modules/user/src/PrivateTempStore.php, line 50 Class PrivateTempStore Stores and retrieves temporary data for a given owner. Namespace Drupal\user Code protected $currentUser;

PrivateTempStore

Stores and retrieves temporary data for a given owner. A PrivateTempStore can be used to make temporary, non-cache data available across requests. The data for the PrivateTempStore is stored in one key/value collection. PrivateTempStore data expires automatically after a given timeframe. The PrivateTempStore is different from a cache, because the data in it is not yet saved permanently and so it cannot be rebuilt. Typically, the PrivateTempStore might be used to store work in progress that is l

PrivateKey::__construct

PrivateKey::__construct(StateInterface $state) Constructs the token generator. Parameters \Drupal\Core\State\StateInterface $state: The state service. File core/lib/Drupal/Core/PrivateKey.php, line 26 Class PrivateKey Manages the Drupal private key. Namespace Drupal\Core Code function __construct(StateInterface $state) { $this->state = $state; }

PrivateKey::set

public PrivateKey::set($key) Sets the private key. Parameters string $key: The private key to set. File core/lib/Drupal/Core/PrivateKey.php, line 51 Class PrivateKey Manages the Drupal private key. Namespace Drupal\Core Code public function set($key) { return $this->state->set('system.private_key', $key); }

PrivateKey::get

public PrivateKey::get() Gets the private key. Return value string The private key. File core/lib/Drupal/Core/PrivateKey.php, line 36 Class PrivateKey Manages the Drupal private key. Namespace Drupal\Core Code public function get() { if (!$key = $this->state->get('system.private_key')) { $key = $this->create(); $this->set($key); } return $key; }

PrivateKey::create

protected PrivateKey::create() Creates a new private key. Return value string The private key. File core/lib/Drupal/Core/PrivateKey.php, line 61 Class PrivateKey Manages the Drupal private key. Namespace Drupal\Core Code protected function create() { return Crypt::randomBytesBase64(55); }

PrivateKey::$state

The state service. Type: \Drupal\Core\State\StateInterface File core/lib/Drupal/Core/PrivateKey.php, line 18 Class PrivateKey Manages the Drupal private key. Namespace Drupal\Core Code protected $state;

PrivateKey

Manages the Drupal private key. Hierarchy class \Drupal\Core\PrivateKey File core/lib/Drupal/Core/PrivateKey.php, line 11 Namespace Drupal\Core Members Name Modifiers Type Description PrivateKey::$state protected property The state service. PrivateKey::create protected function Creates a new private key. PrivateKey::get public function Gets the private key. PrivateKey::set public function Sets the private key. PrivateKey::__construct functio

PrimitiveInterface::setValue

public PrimitiveInterface::setValue($value) Sets the primitive data value. Parameters mixed|null $value: The value to set in the format as documented for the data type or NULL to unset the data value. File core/lib/Drupal/Core/TypedData/PrimitiveInterface.php, line 26 Class PrimitiveInterface Interface for primitive data. Namespace Drupal\Core\TypedData Code public function setValue($value);

PrimitiveInterface::getValue

public PrimitiveInterface::getValue() Gets the primitive data value. Return value mixed File core/lib/Drupal/Core/TypedData/PrimitiveInterface.php, line 17 Class PrimitiveInterface Interface for primitive data. Namespace Drupal\Core\TypedData Code public function getValue();