Same name and namespace in other branches
  1. 8.9.x core/modules/system/tests/modules/entity_test/entity_test.module \entity_test_entity_test_access()
  2. 9 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 775
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();
}