function PermissionsHashGenerator::getCacheableMetadata
Gets the cacheability metadata for the generated hash.
Parameters
\Drupal\Core\Session\AccountInterface $account: The user account for which to get the permissions hash.
Return value
\Drupal\Core\Cache\CacheableMetadata A cacheable metadata object.
Overrides PermissionsHashGeneratorInterface::getCacheableMetadata
File
-
core/
lib/ Drupal/ Core/ Session/ PermissionsHashGenerator.php, line 125
Class
- PermissionsHashGenerator
- Generates and caches the permissions hash for a user.
Namespace
Drupal\Core\SessionCode
public function getCacheableMetadata(AccountInterface $account) : CacheableMetadata {
return CacheableMetadata::createFromObject($this->processor
->processAccessPolicies($account));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.