public PrivateTempStore::getMetadata($key)
Returns the metadata associated with a particular key/value pair.
Parameters
string $key: The key of the data to store.
Return value
mixed An object with the owner and updated time if the key has a value, or NULL otherwise.
File
- core/modules/user/src/PrivateTempStore.php, line 144
Class
- PrivateTempStore
- Stores and retrieves temporary data for a given owner.
Namespace
Drupal\user
Code
1 2 3 4 5 6 7 8 9 10 | public function getMetadata( $key ) { $key = $this ->createkey( $key ); // Fetch the key/value pair and its metadata. $object = $this ->storage->get( $key ); if ( $object ) { // Don't keep the data itself in memory. unset( $object ->data); return $object ; } } |
Please login to continue.