function entity_test_entity_test_create_access in Drupal 10
Same name and namespace in other branches
- 8 core/modules/system/tests/modules/entity_test/entity_test.module \entity_test_entity_test_create_access()
- 9 core/modules/system/tests/modules/entity_test/entity_test.module \entity_test_entity_test_create_access()
Implements hook_ENTITY_TYPE_create_access() for 'entity_test'.
1 string reference to 'entity_test_entity_test_create_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 783 - Test module for the entity API providing several entity types for testing.
Code
function entity_test_entity_test_create_access(AccountInterface $account, $context, $entity_bundle) {
\Drupal::state()
->set('entity_test_entity_test_create_access', TRUE);
// No opinion.
return AccessResult::neutral();
}