class UserContextAccessPolicy
Same name in other branches
- 11.x core/tests/Drupal/Tests/Core/Session/AccessPolicyProcessorTest.php \Drupal\Tests\Core\Session\UserContextAccessPolicy
Hierarchy
- class \Drupal\Core\Session\AccessPolicyBase implements \Drupal\Core\Session\AccessPolicyInterface
- class \Drupal\Tests\Core\Session\UserContextAccessPolicy extends \Drupal\Core\Session\AccessPolicyBase
Expanded class hierarchy of UserContextAccessPolicy
File
-
core/
tests/ Drupal/ Tests/ Core/ Session/ AccessPolicyProcessorTest.php, line 539
Namespace
Drupal\Tests\Core\SessionView source
class UserContextAccessPolicy extends AccessPolicyBase {
public function applies(string $scope) : bool {
return TRUE;
}
public function getPersistentCacheContexts() : array {
return [
'user',
];
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title | Overrides |
---|---|---|---|---|---|
AccessPolicyBase::alterPermissions | public | function | Alter the permissions after all policies have finished building them. | Overrides AccessPolicyInterface::alterPermissions | 2 |
AccessPolicyBase::calculatePermissions | public | function | Calculates the permissions for an account within a given scope. | Overrides AccessPolicyInterface::calculatePermissions | 7 |
AccessPolicyInterface::SCOPE_DRUPAL | constant | Scope ID for general Drupal access. | |||
UserContextAccessPolicy::applies | public | function | Checks whether this access policy applies to a given scope. | Overrides AccessPolicyBase::applies | |
UserContextAccessPolicy::getPersistentCacheContexts | public | function | Gets the persistent cache contexts. | Overrides AccessPolicyBase::getPersistentCacheContexts |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.