protected function EventDispatcher::doDispatch

Triggers the listeners of an event.

This method can be overridden to add functionality that is executed for each listener.

Parameters

array[callback] $listeners The event listeners.:

string $eventName The name of the event to dispatch.:

Event $event The event object to pass to the event handlers/listeners.:

1 call to EventDispatcher::doDispatch()
EventDispatcher::dispatch in drupal/core/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/EventDispatcher.php
@api

File

drupal/core/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/EventDispatcher.php, line 161

Class

EventDispatcher
The EventDispatcherInterface is the central point of Symfony's event listener system.

Namespace

Symfony\Component\EventDispatcher

Code

protected function doDispatch($listeners, $eventName, Event $event) {
  foreach ($listeners as $listener) {
    call_user_func($listener, $event);
    if ($event
      ->isPropagationStopped()) {
      break;
    }
  }
}