function hook_event_dispatcher_path_delete in Hook Event Dispatcher 8
Implements hook_path_delete().
2 calls to hook_event_dispatcher_path_delete()
- PathEventTest::testPathDeleteEvent in tests/
src/ Unit/ Path/ PathEventTest.php - Test PathDeleteEvent.
- PathEventTest::testWithEmptyPath in tests/
src/ Unit/ Path/ PathEventTest.php - Test with empty path array.
File
- ./
hook_event_dispatcher.module, line 417 - Hook event dispatcher module.
Code
function hook_event_dispatcher_path_delete($path) {
if (empty($path)) {
return;
}
/** @var \Drupal\hook_event_dispatcher\Manager\HookEventDispatcherManagerInterface $manager */
$manager = \Drupal::service('hook_event_dispatcher.manager');
$event = new PathDeleteEvent($path);
$manager
->register($event);
}