You are here

public function AccessControlTrait::entityAccess in Group 2.0.x

1 method overrides AccessControlTrait::entityAccess()
AccessControl::entityAccess in src/Plugin/Group/RelationHandlerDefault/AccessControl.php
Checks access to an operation on the entity.

File

src/Plugin/Group/RelationHandler/AccessControlTrait.php, line 63

Class

AccessControlTrait
Trait for group relation permission providers.

Namespace

Drupal\group\Plugin\Group\RelationHandler

Code

public function entityAccess(EntityInterface $entity, $operation, AccountInterface $account, $return_as_object = FALSE) {
  if (!isset($this->parent)) {
    throw new \LogicException('Using AccessControlTrait without assigning a parent or overwriting the methods.');
  }
  return $this->parent
    ->entityAccess($entity, $operation, $account, $return_as_object);
}