function entity_test_entity_test_access in Drupal 9
Same name and namespace in other branches
- 8 core/modules/system/tests/modules/entity_test/entity_test.module \entity_test_entity_test_access()
Implements hook_ENTITY_TYPE_access() for 'entity_test'.
1 string reference to 'entity_test_entity_test_access'
- EntityAccessControlHandlerTest::testHooks in core/
tests/ Drupal/ KernelTests/ Core/ Entity/ EntityAccessControlHandlerTest.php - Tests hook invocations.
File
- core/
modules/ system/ tests/ modules/ entity_test/ entity_test.module, line 762 - Test module for the entity API providing several entity types for testing.
Code
function entity_test_entity_test_access(EntityInterface $entity, $operation, AccountInterface $account) {
\Drupal::state()
->set('entity_test_entity_test_access', TRUE);
// No opinion.
return AccessResult::neutral();
}