function hook_event_dispatcher_entity_predelete in Hook Event Dispatcher 8
Implements hook_entity_predelete().
1 call to hook_event_dispatcher_entity_predelete()
- EntityEventTest::testEntityPredeleteEvent in tests/
src/ Unit/ Entity/ EntityEventTest.php - Test EntityPredeleteEvent.
File
- ./
hook_event_dispatcher.module, line 127 - Hook event dispatcher module.
Code
function hook_event_dispatcher_entity_predelete(EntityInterface $entity) {
/** @var \Drupal\hook_event_dispatcher\Manager\HookEventDispatcherManagerInterface $manager */
$manager = \Drupal::service('hook_event_dispatcher.manager');
$manager
->register(new EntityPredeleteEvent($entity));
}