interface GroupPermissionsHashGeneratorInterface in Group 8
Same name and namespace in other branches
- 2.0.x src/Access/GroupPermissionsHashGeneratorInterface.php \Drupal\group\Access\GroupPermissionsHashGeneratorInterface
Defines the group permissions hash generator interface.
@todo Should return a GroupPermissionsHash value object with cache metadata.
Hierarchy
- interface \Drupal\group\Access\GroupPermissionsHashGeneratorInterface
Expanded class hierarchy of GroupPermissionsHashGeneratorInterface
All classes that implement GroupPermissionsHashGeneratorInterface
2 files declare their use of GroupPermissionsHashGeneratorInterface
- GroupPermissionsCacheContext.php in src/
Cache/ Context/ GroupPermissionsCacheContext.php - GroupPermissionsCacheContextTest.php in tests/
src/ Unit/ GroupPermissionsCacheContextTest.php
File
- src/
Access/ GroupPermissionsHashGeneratorInterface.php, line 12
Namespace
Drupal\group\AccessView source
interface GroupPermissionsHashGeneratorInterface {
/**
* Generates a hash for an account's complete group permissions.
*
* @param \Drupal\Core\Session\AccountInterface $account
* The user account for which to get the permissions hash.
*
* @return string
* A permissions hash.
*/
public function generateHash(AccountInterface $account);
/**
* Gets the cacheability metadata for the generated hash.
*
* @param \Drupal\Core\Session\AccountInterface $account
* The user account for which to get the permissions hash.
*
* @return \Drupal\Core\Cache\CacheableMetadata
* A cacheable metadata object.
*/
public function getCacheableMetadata(AccountInterface $account);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
GroupPermissionsHashGeneratorInterface:: |
public | function | Generates a hash for an account's complete group permissions. | 1 |
GroupPermissionsHashGeneratorInterface:: |
public | function | Gets the cacheability metadata for the generated hash. | 1 |