You are here

public function ChainGroupPermissionCalculator::calculateMemberPermissions in Group 8

Same name and namespace in other branches
  1. 2.0.x src/Access/ChainGroupPermissionCalculator.php \Drupal\group\Access\ChainGroupPermissionCalculator::calculateMemberPermissions()

Calculates the member group permissions for an account.

Parameters

\Drupal\Core\Session\AccountInterface $account: The user account for which to calculate the member permissions.

Return value

\Drupal\group\Access\CalculatedGroupPermissionsInterface An object representing the member group permissions.

Overrides GroupPermissionCalculatorInterface::calculateMemberPermissions

1 call to ChainGroupPermissionCalculator::calculateMemberPermissions()
ChainGroupPermissionCalculator::calculateAuthenticatedPermissions in src/Access/ChainGroupPermissionCalculator.php
Calculates the full group permissions for an authenticated account.

File

src/Access/ChainGroupPermissionCalculator.php, line 201

Class

ChainGroupPermissionCalculator
Collects group permissions for an account.

Namespace

Drupal\group\Access

Code

public function calculateMemberPermissions(AccountInterface $account) {
  return $this
    ->doCacheableCalculation([
    'group_permissions',
    'member',
  ], $this
    ->getPersistentMemberCacheContexts(), __FUNCTION__, [
    $account,
  ]);
}