hook_entity_access

function hook_entity_access

hook_entity_access(\Drupal\Core\Entity\EntityInterface $entity, $operation, \Drupal\Core\Session\AccountInterface $account)

Control entity operation access.

Parameters

\Drupal\Core\Entity\EntityInterface $entity: The entity to check access to.

string $operation: The operation that is to be performed on $entity.

\Drupal\Core\Session\AccountInterface $account: The account trying to access the entity.

Return value