function AlwaysAddsAccessPolicy::calculatePermissions

Same name in other branches
  1. 11.x core/tests/Drupal/Tests/Core/Session/AccessPolicyProcessorTest.php \Drupal\Tests\Core\Session\AlwaysAddsAccessPolicy::calculatePermissions()

Overrides AccessPolicyBase::calculatePermissions

File

core/tests/Drupal/Tests/Core/Session/AccessPolicyProcessorTest.php, line 509

Class

AlwaysAddsAccessPolicy

Namespace

Drupal\Tests\Core\Session

Code

public function calculatePermissions(AccountInterface $account, string $scope) : RefinableCalculatedPermissionsInterface {
    $calculated_permissions = parent::calculatePermissions($account, $scope);
    return $calculated_permissions->addItem(new CalculatedPermissionsItem([
        'always',
    ], FALSE, 'always', 1));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.