PermissionsHashGeneratorInterface

Defines the user permissions hash generator interface. Hierarchy interface \Drupal\Core\Session\PermissionsHashGeneratorInterface File core/lib/Drupal/Core/Session/PermissionsHashGeneratorInterface.php, line 8 Namespace Drupal\Core\Session Members Name Modifiers Type Description PermissionsHashGeneratorInterface::generate public function Generates a hash that uniquely identifies a user's permissions.

PermissionsHashGenerator::__construct

public PermissionsHashGenerator::__construct(PrivateKey $private_key, CacheBackendInterface $cache, CacheBackendInterface $static) Constructs a PermissionsHashGenerator object. Parameters \Drupal\Core\PrivateKey $private_key: The private key service. \Drupal\Core\Cache\CacheBackendInterface $cache: The cache backend interface to use for the persistent cache. \Drupal\Core\Cache\CacheBackendInterface $static: The cache backend interface to use for the static cache. File core/lib/Drupal/Core/Sess

PermissionsHashGenerator::hash

protected PermissionsHashGenerator::hash($identifier) Hashes the given string. Parameters string $identifier: The string to be hashed. Return value string The hash. File core/lib/Drupal/Core/Session/PermissionsHashGenerator.php, line 121 Class PermissionsHashGenerator Generates and caches the permissions hash for a user. Namespace Drupal\Core\Session Code protected function hash($identifier) { return hash('sha256', $this->privateKey->get() . Settings::getHashSalt() . $identif

PermissionsHashGenerator::generate

public PermissionsHashGenerator::generate(AccountInterface $account) Cached by role, invalidated whenever permissions change. Overrides PermissionsHashGeneratorInterface::generate File core/lib/Drupal/Core/Session/PermissionsHashGenerator.php, line 57 Class PermissionsHashGenerator Generates and caches the permissions hash for a user. Namespace Drupal\Core\Session Code public function generate(AccountInterface $account) { // User 1 is the super user, and can always access all permis

PermissionsHashGenerator::doGenerate

protected PermissionsHashGenerator::doGenerate(array $roles) Generates a hash that uniquely identifies the user's permissions. Parameters string[] $roles: The user's roles. Return value string The permissions hash. File core/lib/Drupal/Core/Session/PermissionsHashGenerator.php, line 95 Class PermissionsHashGenerator Generates and caches the permissions hash for a user. Namespace Drupal\Core\Session Code protected function doGenerate(array $roles) { // @todo Once Drupal gets rid of

PermissionsHashGenerator::$static

The cache backend interface to use for the static cache. Type: \Drupal\Core\Cache\CacheBackendInterface File core/lib/Drupal/Core/Session/PermissionsHashGenerator.php, line 34 Class PermissionsHashGenerator Generates and caches the permissions hash for a user. Namespace Drupal\Core\Session Code protected $static;

PermissionsHashGenerator::$privateKey

The private key service. Type: \Drupal\Core\PrivateKey File core/lib/Drupal/Core/Session/PermissionsHashGenerator.php, line 20 Class PermissionsHashGenerator Generates and caches the permissions hash for a user. Namespace Drupal\Core\Session Code protected $privateKey;

PermissionsHashGenerator::$cache

The cache backend interface to use for the persistent cache. Type: \Drupal\Core\Cache\CacheBackendInterface File core/lib/Drupal/Core/Session/PermissionsHashGenerator.php, line 27 Class PermissionsHashGenerator Generates and caches the permissions hash for a user. Namespace Drupal\Core\Session Code protected $cache;

PermissionsHashGenerator

Generates and caches the permissions hash for a user. Hierarchy class \Drupal\Core\Session\PermissionsHashGenerator implements PermissionsHashGeneratorInterface File core/lib/Drupal/Core/Session/PermissionsHashGenerator.php, line 13 Namespace Drupal\Core\Session Members Name Modifiers Type Description PermissionsHashGenerator::$cache protected property The cache backend interface to use for the persistent cache. PermissionsHashGenerator::$privateKey protected prope

PermissionHandlerInterface::moduleProvidesPermissions

public PermissionHandlerInterface::moduleProvidesPermissions($module_name) Determines whether a module provides some permissions. Parameters string $module_name: The module name. Return value bool Returns TRUE if the module provides some permissions, otherwise FALSE. File core/modules/user/src/PermissionHandlerInterface.php, line 50 Class PermissionHandlerInterface Defines an interface to list available permissions. Namespace Drupal\user Code public function moduleProvidesPermissions