interface GroupContentAccessControlHandlerInterface in Group 8
Provides a common interface for group content access control handlers.
Hierarchy
- interface \Drupal\group\Plugin\GroupContentAccessControlHandlerInterface
Expanded class hierarchy of GroupContentAccessControlHandlerInterface
All classes that implement GroupContentAccessControlHandlerInterface
File
- src/Plugin/ GroupContentAccessControlHandlerInterface.php, line 13 
Namespace
Drupal\group\PluginView source
interface GroupContentAccessControlHandlerInterface {
  /**
   * Checks access to an operation on the relation.
   *
   * @param \Drupal\group\Entity\GroupContentInterface $group_content
   *   The group content for which to check access.
   * @param string $operation
   *   The operation access should be checked for. Usually one of "view",
   *   "update" or "delete".
   * @param \Drupal\Core\Session\AccountInterface $account
   *   The user session for which to check access.
   * @param bool $return_as_object
   *   (optional) Defaults to FALSE.
   *
   * @return bool|\Drupal\Core\Access\AccessResultInterface
   *   The access result. Returns a boolean if $return_as_object is FALSE (this
   *   is the default) and otherwise an AccessResultInterface object.
   *   When a boolean is returned, the result of AccessInterface::isAllowed() is
   *   returned, i.e. TRUE means access is explicitly allowed, FALSE means
   *   access is either explicitly forbidden or "no opinion".
   */
  public function relationAccess(GroupContentInterface $group_content, $operation, AccountInterface $account, $return_as_object = FALSE);
  /**
   * Checks access to create a relation.
   *
   * @param \Drupal\group\Entity\GroupInterface $group
   *   The group to check for group content create access.
   * @param \Drupal\Core\Session\AccountInterface $account
   *   The user for which to check access.
   * @param bool $return_as_object
   *   (optional) Defaults to FALSE.
   *
   * @return bool|\Drupal\Core\Access\AccessResultInterface
   *   The access result. Returns a boolean if $return_as_object is FALSE (this
   *   is the default) and otherwise an AccessResultInterface object.
   *   When a boolean is returned, the result of AccessInterface::isAllowed() is
   *   returned, i.e. TRUE means access is explicitly allowed, FALSE means
   *   access is either explicitly forbidden or "no opinion".
   */
  public function relationCreateAccess(GroupInterface $group, AccountInterface $account, $return_as_object = FALSE);
  /**
   * Checks access to an operation on the entity.
   *
   * @param \Drupal\Core\Entity\EntityInterface $entity
   *   The entity for which to check access.
   * @param string $operation
   *   The operation access should be checked for. Usually one of "view",
   *   "update" or "delete".
   * @param \Drupal\Core\Session\AccountInterface $account
   *   The user session for which to check access.
   * @param bool $return_as_object
   *   (optional) Defaults to FALSE.
   *
   * @return bool|\Drupal\Core\Access\AccessResultInterface
   *   The access result. Returns a boolean if $return_as_object is FALSE (this
   *   is the default) and otherwise an AccessResultInterface object.
   *   When a boolean is returned, the result of AccessInterface::isAllowed() is
   *   returned, i.e. TRUE means access is explicitly allowed, FALSE means
   *   access is either explicitly forbidden or "no opinion".
   */
  public function entityAccess(EntityInterface $entity, $operation, AccountInterface $account, $return_as_object = FALSE);
  /**
   * Checks access to create an entity.
   *
   * @param \Drupal\group\Entity\GroupInterface $group
   *   The group to check for entity create access.
   * @param \Drupal\Core\Session\AccountInterface $account
   *   The user for which to check access.
   * @param bool $return_as_object
   *   (optional) Defaults to FALSE.
   *
   * @return bool|\Drupal\Core\Access\AccessResultInterface
   *   The access result. Returns a boolean if $return_as_object is FALSE (this
   *   is the default) and otherwise an AccessResultInterface object.
   *   When a boolean is returned, the result of AccessInterface::isAllowed() is
   *   returned, i.e. TRUE means access is explicitly allowed, FALSE means
   *   access is either explicitly forbidden or "no opinion".
   */
  public function entityCreateAccess(GroupInterface $group, AccountInterface $account, $return_as_object = FALSE);
}Members
| Name   | Modifiers | Type | Description | Overrides | 
|---|---|---|---|---|
| GroupContentAccessControlHandlerInterface:: | public | function | Checks access to an operation on the entity. | 1 | 
| GroupContentAccessControlHandlerInterface:: | public | function | Checks access to create an entity. | 1 | 
| GroupContentAccessControlHandlerInterface:: | public | function | Checks access to an operation on the relation. | 1 | 
| GroupContentAccessControlHandlerInterface:: | public | function | Checks access to create a relation. | 1 | 
