You are here

interface AccessEventInterface in Organic groups 8

Interface for events that determine access in Organic Groups.

Hierarchy

Expanded class hierarchy of AccessEventInterface

All classes that implement AccessEventInterface

File

src/Event/AccessEventInterface.php, line 15

Namespace

Drupal\og\Event
View source
interface AccessEventInterface extends RefinableCacheableDependencyInterface {

  /**
   * Declare that access is being granted.
   *
   * Calling this method will cause access to be granted for the action that is
   * being checked, unless another event listener denies access.
   *
   * @return \Drupal\Core\Access\AccessResultInterface
   *   The updated access result.
   */
  public function grantAccess() : AccessResultInterface;

  /**
   * Declare that access is being denied.
   *
   * Calling this method will cause access to be denied for the action that is
   * being checked. This takes precedence over any other event listeners that
   * might grant access.
   *
   * @return \Drupal\Core\Access\AccessResultInterface
   *   The updated access result.
   */
  public function denyAccess() : AccessResultInterface;

  /**
   * Merges the given access result with the existing access result.
   *
   * @return \Drupal\Core\Access\AccessResultInterface
   *   The updated access result.
   */
  public function mergeAccessResult(AccessResultInterface $access_result) : AccessResultInterface;

  /**
   * Returns the group that provides the context for the access check.
   *
   * @return \Drupal\Core\Entity\ContentEntityInterface
   *   The group entity.
   */
  public function getGroup() : ContentEntityInterface;

  /**
   * Returns the user for which access is being determined.
   *
   * @return \Drupal\Core\Session\AccountInterface
   *   The user.
   */
  public function getUser() : AccountInterface;

  /**
   * Returns the current access result object.
   *
   * @return \Drupal\Core\Access\AccessResultInterface
   *   The access result object.
   */
  public function getAccessResult() : AccessResultInterface;

}

Members

Namesort descending Modifiers Type Description Overrides
AccessEventInterface::denyAccess public function Declare that access is being denied. 1
AccessEventInterface::getAccessResult public function Returns the current access result object. 1
AccessEventInterface::getGroup public function Returns the group that provides the context for the access check. 1
AccessEventInterface::getUser public function Returns the user for which access is being determined. 1
AccessEventInterface::grantAccess public function Declare that access is being granted. 1
AccessEventInterface::mergeAccessResult public function Merges the given access result with the existing access result. 1
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
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