function _entity_events_dispatch in Entity Events 8
Same name and namespace in other branches
- 2.0.x entity_events.module \_entity_events_dispatch()
Helper method to dispatch an event.
Parameters
string $event_type: The event type.
\Symfony\Component\EventDispatcher\Event $event: The event to dispatch.
3 calls to _entity_events_dispatch()
- entity_events_entity_delete in ./
entity_events.module - Implements hook_entity_delete().
- entity_events_entity_insert in ./
entity_events.module - Implements hook_entity_insert().
- entity_events_entity_update in ./
entity_events.module - Implements hook_entity_update().
File
- ./
entity_events.module, line 54 - This module holds functions for entity events.
Code
function _entity_events_dispatch($event_type, Event $event) {
/** @var \Symfony\Component\EventDispatcher\EventDispatcher $dispatcher */
$dispatcher = \Drupal::service('event_dispatcher');
$dispatcher
->dispatch($event_type, $event);
}