You are here

interface RefinableCalculatedGroupPermissionsInterface in Group 8

Same name and namespace in other branches
  1. 2.0.x src/Access/RefinableCalculatedGroupPermissionsInterface.php \Drupal\group\Access\RefinableCalculatedGroupPermissionsInterface

Defines the calculated group permissions interface.

Hierarchy

Expanded class hierarchy of RefinableCalculatedGroupPermissionsInterface

All classes that implement RefinableCalculatedGroupPermissionsInterface

File

src/Access/RefinableCalculatedGroupPermissionsInterface.php, line 10

Namespace

Drupal\group\Access
View source
interface RefinableCalculatedGroupPermissionsInterface extends RefinableCacheableDependencyInterface, CalculatedGroupPermissionsInterface {

  /**
   * Adds a calculated permission item.
   *
   * @param \Drupal\group\Access\CalculatedGroupPermissionsItemInterface $item
   *   The calculated permission item.
   * @param bool $overwrite
   *   (optional) Whether to overwrite an item if there already is one for the
   *   given identifier within the scope. Defaults to FALSE, meaning a merge
   *   will take place instead.
   *
   * @return $this
   */
  public function addItem(CalculatedGroupPermissionsItemInterface $item, $overwrite = FALSE);

  /**
   * Removes a single calculated permission item from a given scope.
   *
   * @param $scope
   *   The scope name to remove the item from.
   * @param $identifier
   *   The scope identifier to remove the item from.
   *
   * @return $this
   */
  public function removeItem($scope, $identifier);

  /**
   * Removes all of the calculated permission items, regardless of scope.
   *
   * @return $this
   */
  public function removeItems();

  /**
   * Removes all of the calculated permission items for the given scope.
   *
   * @param string $scope
   *   The scope name to remove the items for.
   *
   * @return $this
   */
  public function removeItemsByScope($scope);

  /**
   * Merge another calculated group permissions object into this one.
   *
   * This merges (not replaces) all permissions and cacheable metadata.
   *
   * @param \Drupal\group\Access\CalculatedGroupPermissionsInterface $other
   *   The other calculated group permissions object to merge into this one.
   *
   * @return $this
   */
  public function merge(CalculatedGroupPermissionsInterface $other);

}

Members

Namesort descending Modifiers Type Description 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
CalculatedGroupPermissionsInterface::getItem public function Retrieves a single calculated permission item from a given scope.
CalculatedGroupPermissionsInterface::getItems public function Retrieves all of the calculated permission items, regardless of scope.
CalculatedGroupPermissionsInterface::getItemsByScope public function Retrieves all of the calculated permission items for the given scope.
RefinableCacheableDependencyInterface::addCacheableDependency public function Adds a dependency on an object: merges its cacheability metadata. 1
RefinableCacheableDependencyInterface::addCacheContexts public function Adds cache contexts. 1
RefinableCacheableDependencyInterface::addCacheTags public function Adds cache tags. 1
RefinableCacheableDependencyInterface::mergeCacheMaxAge public function Merges the maximum age (in seconds) with the existing maximum age. 1
RefinableCalculatedGroupPermissionsInterface::addItem public function Adds a calculated permission item. 1
RefinableCalculatedGroupPermissionsInterface::merge public function Merge another calculated group permissions object into this one. 1
RefinableCalculatedGroupPermissionsInterface::removeItem public function Removes a single calculated permission item from a given scope. 1
RefinableCalculatedGroupPermissionsInterface::removeItems public function Removes all of the calculated permission items, regardless of scope. 1
RefinableCalculatedGroupPermissionsInterface::removeItemsByScope public function Removes all of the calculated permission items for the given scope. 1