function _entity_test_record_hooks in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/modules/system/tests/modules/entity_test/entity_test.module \_entity_test_record_hooks()
Helper function to be used to record hook invocations.
Parameters
string $hook: The hook name.
mixed $data: Arbitrary data associated with the hook invocation.
12 calls to _entity_test_record_hooks()
- entity_test_entity_test_mulrev_changed_translation_delete in core/
modules/ system/ tests/ modules/ entity_test/ entity_test.module - Implements hook_ENTITY_TYPE_translation_delete().
- entity_test_entity_test_mulrev_changed_translation_insert in core/
modules/ system/ tests/ modules/ entity_test/ entity_test.module - Implements hook_ENTITY_TYPE_translation_insert() for 'entity_test_mulrev'.
- entity_test_entity_test_mulrev_translation_delete in core/
modules/ system/ tests/ modules/ entity_test/ entity_test.module - Implements hook_ENTITY_TYPE_translation_delete() for 'entity_test_mulrev'.
- entity_test_entity_test_mulrev_translation_insert in core/
modules/ system/ tests/ modules/ entity_test/ entity_test.module - Implements hook_ENTITY_TYPE_translation_insert().
- entity_test_entity_test_mul_changed_translation_delete in core/
modules/ system/ tests/ modules/ entity_test/ entity_test.module - Implements hook_ENTITY_TYPE_translation_delete().
File
- core/
modules/ system/ tests/ modules/ entity_test/ entity_test.module, line 597 - Test module for the entity API providing several entity types for testing.
Code
function _entity_test_record_hooks($hook, $data) {
$state = \Drupal::state();
$key = 'entity_test.hooks';
$hooks = $state
->get($key);
$hooks[$hook] = $data;
$state
->set($key, $hooks);
}