public function TraceableEventDispatcher::addListener

Adds an event listener that listens on the specified events.

@api

Parameters

string $eventName The event to listen on:

callable $listener The listener:

integer $priority The higher this value, the earlier an event: listener will be triggered in the chain (defaults to 0)

Overrides EventDispatcherInterface::addListener

File

drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php, line 73

Class

TraceableEventDispatcher
Collects some data about event listeners.

Namespace

Symfony\Component\HttpKernel\Debug

Code

public function addListener($eventName, $listener, $priority = 0) {
  $this->dispatcher
    ->addListener($eventName, $listener, $priority);
}