protected function PrivateTempStore::getOwner in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/user/src/PrivateTempStore.php \Drupal\user\PrivateTempStore::getOwner()
Gets the current owner based on the current user or the session ID.
Return value
string The owner.
4 calls to PrivateTempStore::getOwner()
- PrivateTempStore::createkey in core/
modules/ user/ src/ PrivateTempStore.php - Ensures that the key is unique for a user.
- PrivateTempStore::delete in core/
modules/ user/ src/ PrivateTempStore.php - Deletes data from the store for a given key and releases the lock on it.
- PrivateTempStore::get in core/
modules/ user/ src/ PrivateTempStore.php - Retrieves a value from this PrivateTempStore for a given key.
- PrivateTempStore::set in core/
modules/ user/ src/ PrivateTempStore.php - Stores a particular key/value pair in this PrivateTempStore.
File
- core/
modules/ user/ src/ PrivateTempStore.php, line 206 - Contains \Drupal\user\PrivateTempStore.
Class
- PrivateTempStore
- Stores and retrieves temporary data for a given owner.
Namespace
Drupal\userCode
protected function getOwner() {
return $this->currentUser
->id() ?: $this->requestStack
->getCurrentRequest()
->getSession()
->getId();
}