function file_link_test_entity_insert in File Link 2.0.x
Implements hook_entity_insert().
1 call to file_link_test_entity_insert()
- file_link_test_entity_update in tests/
modules/ file_link_test/ file_link_test.module - Implements hook_entity_update().
File
- tests/
modules/ file_link_test/ file_link_test.module, line 28
Code
function file_link_test_entity_insert(EntityInterface $entity) {
global $entity_save_counter;
$key = $entity
->getEntityTypeId() . $entity
->id();
if (!isset($entity_save_counter[$key])) {
$entity_save_counter[$key] = 0;
}
$entity_save_counter[$key]++;
}