interface ChainGroupPermissionCalculatorInterface in Group 2.0.x
Same name and namespace in other branches
- 8 src/Access/ChainGroupPermissionCalculatorInterface.php \Drupal\group\Access\ChainGroupPermissionCalculatorInterface
Runs the added calculators one by one until the full permissions are built.
Each calculator in the chain can be another chain, which is why this interface extends the permission calculator one.
Hierarchy
- interface \Drupal\group\Access\GroupPermissionCalculatorInterface
- interface \Drupal\group\Access\ChainGroupPermissionCalculatorInterface
Expanded class hierarchy of ChainGroupPermissionCalculatorInterface
All classes that implement ChainGroupPermissionCalculatorInterface
4 files declare their use of ChainGroupPermissionCalculatorInterface
- EntityQueryAlter.php in src/
QueryAccess/ EntityQueryAlter.php - GroupPermissionCheckerTest.php in tests/
src/ Unit/ GroupPermissionCheckerTest.php - GroupPermissionHashGeneratorTest.php in tests/
src/ Unit/ GroupPermissionHashGeneratorTest.php - QueryAccessHandlerBase.php in src/
Entity/ Access/ QueryAccessHandlerBase.php
File
- src/
Access/ ChainGroupPermissionCalculatorInterface.php, line 13
Namespace
Drupal\group\AccessView source
interface ChainGroupPermissionCalculatorInterface extends GroupPermissionCalculatorInterface {
/**
* Adds a calculator.
*
* @param \Drupal\group\Access\GroupPermissionCalculatorInterface $calculator
* The calculator.
*
* @return mixed
*/
public function addCalculator(GroupPermissionCalculatorInterface $calculator);
/**
* Gets all added calculators.
*
* @return \Drupal\group\Access\GroupPermissionCalculatorInterface[]
* The calculators.
*/
public function getCalculators();
/**
* Calculates the full group permissions for an authenticated account.
*
* This includes both outsider and member permissions.
*
* @param \Drupal\Core\Session\AccountInterface $account
* The user account for which to retrieve the permissions.
*
* @return \Drupal\group\Access\CalculatedGroupPermissionsInterface
* An object representing the full authenticated group permissions.
*/
public function calculateAuthenticatedPermissions(AccountInterface $account);
/**
* Calculates the full group permissions for an account.
*
* This could either include anonymous permissions or both outsider and member
* permissions, depending on the account's anonymous status.
*
* @param \Drupal\Core\Session\AccountInterface $account
* The user account for which to retrieve the permissions.
*
* @return \Drupal\group\Access\CalculatedGroupPermissionsInterface
* An object representing the full group permissions.
*/
public function calculatePermissions(AccountInterface $account);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ChainGroupPermissionCalculatorInterface:: |
public | function | Adds a calculator. | 1 |
ChainGroupPermissionCalculatorInterface:: |
public | function | Calculates the full group permissions for an authenticated account. | 1 |
ChainGroupPermissionCalculatorInterface:: |
public | function | Calculates the full group permissions for an account. | 1 |
ChainGroupPermissionCalculatorInterface:: |
public | function | Gets all added calculators. | 1 |
GroupPermissionCalculatorInterface:: |
constant | The cache contexts that should always be present on anonymous permissions. | ||
GroupPermissionCalculatorInterface:: |
public | function | Calculates the anonymous group permissions. | 2 |
GroupPermissionCalculatorInterface:: |
public | function | Calculates the member group permissions for an account. | 2 |
GroupPermissionCalculatorInterface:: |
public | function | Calculates the outsider group permissions for an account. | 2 |
GroupPermissionCalculatorInterface:: |
constant | The cache contexts that should always be present on member permissions. | 1 | |
GroupPermissionCalculatorInterface:: |
constant | The cache contexts that should always be present on outsider permissions. | 1 |