You are here

protected function SessionBasedTempStore::createkey in Session Based Temporary Storage 8

Ensures that the key is unique for a user.

Parameters

string $key: The key.

Return value

string The unique key for the user.

Throws

\Drupal\Core\TempStore\TempStoreException

5 calls to SessionBasedTempStore::createkey()
SessionBasedTempStore::delete in src/SessionBasedTempStore.php
Deletes data from the store for a given key and releases the lock on it.
SessionBasedTempStore::deleteAll in src/SessionBasedTempStore.php
Deletes all data from the store for the current collection and owner.
SessionBasedTempStore::get in src/SessionBasedTempStore.php
Retrieves a value from this PrivateTempStore for a given key.
SessionBasedTempStore::getMetadata in src/SessionBasedTempStore.php
Returns the metadata associated with a particular key/value pair.
SessionBasedTempStore::set in src/SessionBasedTempStore.php
Stores a particular key/value pair in this PrivateTempStore.

File

src/SessionBasedTempStore.php, line 324

Class

SessionBasedTempStore
Stores and retrieves temporary data for a given owner.

Namespace

Drupal\session_based_temp_store

Code

protected function createkey($key) {
  return $this
    ->getOwner() . ':' . $key;
}