function EntityTestHooks::entityTestAccess
Implements hook_ENTITY_TYPE_access() for 'entity_test'.
File
-
core/
modules/ system/ tests/ modules/ entity_test/ src/ Hook/ EntityTestHooks.php, line 653
Class
- EntityTestHooks
- Hook implementations for entity_test.
Namespace
Drupal\entity_test\HookCode
public function entityTestAccess(EntityInterface $entity, $operation, AccountInterface $account) : AccessResultInterface {
\Drupal::state()->set('entity_test_entity_test_access', TRUE);
// No opinion.
return AccessResult::neutral();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.