hook_ENTITY_TYPE_access(\Drupal\Core\Entity\EntityInterface $entity, $operation, \Drupal\Core\Session\AccountInterface $account)
Control entity operation access for a specific entity type.
\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.
\Drupal\Core\Access\AccessResultInterface The access result. hook_entity_access() has detailed documentation.
\Drupal\Core\Entity\EntityAccessControlHandler
hook_ENTITY_TYPE_create_access()
function hook_ENTITY_TYPE_access(\Drupal\Core\Entity\EntityInterface $entity, $operation, \Drupal\Core\Session\AccountInterface $account) { // No opinion. return AccessResult::neutral(); }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Entity!entity.api.php/function/hook_ENTITY_TYPE_access/8.1.x