public function EventDispatcherInterface::dispatch

Dispatches an event to all registered listeners.

@api

Parameters

string $eventName The name of the event to dispatch. The name of: the event is the name of the method that is invoked on listeners.

Event $event The event to pass to the event handlers/listeners.: If not supplied, an empty Event instance is created.

Return value

Event

3 methods override EventDispatcherInterface::dispatch()
EventDispatcher::dispatch in drupal/core/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/EventDispatcher.php
@api
ImmutableEventDispatcher::dispatch in drupal/core/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/ImmutableEventDispatcher.php
Dispatches an event to all registered listeners.
TraceableEventDispatcher::dispatch in drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php
Dispatches an event to all registered listeners.

File

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

Class

EventDispatcherInterface
The EventDispatcherInterface is the central point of Symfony's event listener system. Listeners are registered on the manager and events are dispatched through the manager.

Namespace

Symfony\Component\EventDispatcher

Code

public function dispatch($eventName, Event $event = null);