SharedTempStore::get

public SharedTempStore::get($key)

Retrieves a value from this SharedTempStore for a given key.

Parameters

string $key: The key of the data to retrieve.

Return value

mixed The data associated with the key, or NULL if the key does not exist.

File

core/modules/user/src/SharedTempStore.php, line 110

Class

SharedTempStore
Stores and retrieves temporary data for a given owner.

Namespace

Drupal\user

Code

public function get($key) {
  if ($object = $this->storage->get($key)) {
    return $object->data;
  }
}
doc_Drupal
2016-10-29 09:42:17
Comments
Leave a Comment

Please login to continue.