interface AccessPolicyProcessorInterface

Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Core/Session/AccessPolicyProcessorInterface.php \Drupal\Core\Session\AccessPolicyProcessorInterface

Processes all added access policies until the full permissions are built.

Hierarchy

Expanded class hierarchy of AccessPolicyProcessorInterface

All classes that implement AccessPolicyProcessorInterface

2 files declare their use of AccessPolicyProcessorInterface
PermissionCheckerTest.php in core/tests/Drupal/Tests/Core/Session/PermissionCheckerTest.php
PermissionsHashGeneratorTest.php in core/tests/Drupal/Tests/Core/Session/PermissionsHashGeneratorTest.php

File

core/lib/Drupal/Core/Session/AccessPolicyProcessorInterface.php, line 8

Namespace

Drupal\Core\Session
View source
interface AccessPolicyProcessorInterface {
  
  /**
   * Adds an access policy.
   *
   * @param \Drupal\Core\Session\AccessPolicyInterface $access_policy
   *   The access policy.
   */
  public function addAccessPolicy(AccessPolicyInterface $access_policy) : void;
  
  /**
   * Processes the access policies for an account within a given scope.
   *
   * @param \Drupal\Core\Session\AccountInterface $account
   *   The user account for which to calculate the permissions.
   * @param string $scope
   *   (optional) The scope to calculate the permissions, defaults to 'drupal'.
   *
   * @return \Drupal\Core\Session\CalculatedPermissionsInterface
   *   The access policies' permissions within the given scope.
   */
  public function processAccessPolicies(AccountInterface $account, string $scope = AccessPolicyInterface::SCOPE_DRUPAL) : CalculatedPermissionsInterface;

}

Members

Title Sort descending Modifiers Object type Summary Overrides
AccessPolicyProcessorInterface::addAccessPolicy public function Adds an access policy. 1
AccessPolicyProcessorInterface::processAccessPolicies public function Processes the access policies for an account within a given scope. 1

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