createkey example

/** * Retrieves a value from this PrivateTempStore for a given key. * * @param string $key * The key of the data to retrieve. * * @return mixed * The data associated with the key, or NULL if the key does not exist. */
  public function get($key) {
    $key = $this->createkey($key);
    if (($object = $this->storage->get($key)) && ($object->owner == $this->getOwner())) {
      return $object->data;
    }
  }

  /** * Stores a particular key/value pair in this PrivateTempStore. * * @param string $key * The key of the data to store. * @param mixed $value * The data to store. * * @throws \Drupal\Core\TempStore\TempStoreException * Thrown when a lock for the backend storage could not be acquired. */
Home | Imprint | This part of the site doesn't use cookies.