@api
Overrides EventDispatcherInterface::addListener
See also
EventDispatcherInterface::addListener
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]);
}