public function EventDispatcher::addListener

@api

Overrides EventDispatcherInterface::addListener

See also

EventDispatcherInterface::addListener

2 calls to EventDispatcher::addListener()
ContainerAwareEventDispatcher::lazyLoad in drupal/core/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/ContainerAwareEventDispatcher.php
Lazily loads listeners for this event from the dependency injection container.
EventDispatcher::addSubscriber 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 93

Class

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

Namespace

Symfony\Component\EventDispatcher

Code

public function addListener($eventName, $listener, $priority = 0) {
  $this->listeners[$eventName][$priority][] = $listener;
  unset($this->sorted[$eventName]);
}