interface CalculatedPermissionsInterface
Same name in other branches
- 10 core/lib/Drupal/Core/Session/CalculatedPermissionsInterface.php \Drupal\Core\Session\CalculatedPermissionsInterface
Defines the calculated permissions interface.
Hierarchy
- interface \Drupal\Core\Cache\CacheableDependencyInterface
- interface \Drupal\Core\Session\CalculatedPermissionsInterface extends \Drupal\Core\Cache\CacheableDependencyInterface
Expanded class hierarchy of CalculatedPermissionsInterface
All classes that implement CalculatedPermissionsInterface
1 file declares its use of CalculatedPermissionsInterface
- CalculatedPermissionsTest.php in core/
tests/ Drupal/ Tests/ Core/ Session/ CalculatedPermissionsTest.php
File
-
core/
lib/ Drupal/ Core/ Session/ CalculatedPermissionsInterface.php, line 10
Namespace
Drupal\Core\SessionView source
interface CalculatedPermissionsInterface extends CacheableDependencyInterface {
/**
* Retrieves a single calculated permission item from a given scope.
*
* @param string $scope
* (optional) The scope name to get the item for, defaults to 'drupal'.
* @param string|int $identifier
* (optional) The identifier to get the item for, defaults to 'drupal'.
*
* @return \Drupal\Core\Session\CalculatedPermissionsItemInterface|false
* The calculated permission item or FALSE if it could not be found.
*/
public function getItem(string $scope = AccessPolicyInterface::SCOPE_DRUPAL, string|int $identifier = AccessPolicyInterface::SCOPE_DRUPAL) : CalculatedPermissionsItemInterface|false;
/**
* Retrieves all of the calculated permission items, regardless of scope.
*
* @return \Drupal\Core\Session\CalculatedPermissionsItemInterface[]
* A list of calculated permission items.
*/
public function getItems() : array;
/**
* Retrieves all of the scopes that have items for them.
*
* @return string[]
* The scope names that are in use.
*/
public function getScopes() : array;
/**
* Retrieves all of the calculated permission items for the given scope.
*
* @param string $scope
* (optional) The scope name to get the item for, defaults to 'drupal'.
*
* @return \Drupal\Core\Session\CalculatedPermissionsItemInterface[]
* A list of calculated permission items for the given scope.
*/
public function getItemsByScope(string $scope = AccessPolicyInterface::SCOPE_DRUPAL) : array;
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overrides |
---|---|---|---|---|
CacheableDependencyInterface::getCacheContexts | public | function | The cache contexts associated with this object. | 34 |
CacheableDependencyInterface::getCacheMaxAge | public | function | The maximum age for which this object may be cached. | 34 |
CacheableDependencyInterface::getCacheTags | public | function | The cache tags associated with this object. | 27 |
CalculatedPermissionsInterface::getItem | public | function | Retrieves a single calculated permission item from a given scope. | |
CalculatedPermissionsInterface::getItems | public | function | Retrieves all of the calculated permission items, regardless of scope. | |
CalculatedPermissionsInterface::getItemsByScope | public | function | Retrieves all of the calculated permission items for the given scope. | |
CalculatedPermissionsInterface::getScopes | public | function | Retrieves all of the scopes that have items for them. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.