public function ContainerAwareEventDispatcher::dispatch

Lazily loads listeners for this event from the dependency injection container.

Throws

\InvalidArgumentException if the service is not defined

Overrides EventDispatcher::dispatch

File

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

Class

ContainerAwareEventDispatcher
Lazily loads listeners and subscribers from the dependency injection container

Namespace

Symfony\Component\EventDispatcher

Code

public function dispatch($eventName, Event $event = null) {
  $this
    ->lazyLoad($eventName);
  return parent::dispatch($eventName, $event);
}