function PermissionsHashGenerator::getCacheableMetadata

Overrides PermissionsHashGeneratorInterface::getCacheableMetadata

File

core/lib/Drupal/Core/Session/PermissionsHashGenerator.php, line 80

Class

PermissionsHashGenerator
Generates and caches the permissions hash for a user.

Namespace

Drupal\Core\Session

Code

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.