hook_entity_create_access(\Drupal\Core\Session\AccountInterface $account, array $context, $entity_bundle)
Control entity create access.
\Drupal\Core\Session\AccountInterface $account: The account trying to access the entity.
array $context: An associative array of additional context values. By default it contains language and the entity type ID:
string $entity_bundle: The entity bundle name.
\Drupal\Core\Access\AccessResultInterface The access result.
\Drupal\Core\Entity\EntityAccessControlHandler
hook_ENTITY_TYPE_create_access()
function hook_entity_create_access(\Drupal\Core\Session\AccountInterface $account, array $context, $entity_bundle) { // 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_create_access/8.1.x