public function ChainGroupPermissionCalculator::calculatePermissions in Group 8
Same name and namespace in other branches
- 2.0.x src/Access/ChainGroupPermissionCalculator.php \Drupal\group\Access\ChainGroupPermissionCalculator::calculatePermissions()
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.
Parameters
\Drupal\Core\Session\AccountInterface $account: The user account for which to retrieve the permissions.
Return value
\Drupal\group\Access\CalculatedGroupPermissionsInterface An object representing the full group permissions.
Overrides ChainGroupPermissionCalculatorInterface::calculatePermissions
File
- src/
Access/ ChainGroupPermissionCalculator.php, line 280
Class
- ChainGroupPermissionCalculator
- Collects group permissions for an account.
Namespace
Drupal\group\AccessCode
public function calculatePermissions(AccountInterface $account) {
return $account
->isAnonymous() ? $this
->calculateAnonymousPermissions() : $this
->calculateAuthenticatedPermissions($account);
}