You are here

public function TraceableEventDispatcher::addListener in Devel 8

Same name and namespace in other branches
  1. 8.3 webprofiler/src/EventDispatcher/TraceableEventDispatcher.php \Drupal\webprofiler\EventDispatcher\TraceableEventDispatcher::addListener()
  2. 8.2 webprofiler/src/EventDispatcher/TraceableEventDispatcher.php \Drupal\webprofiler\EventDispatcher\TraceableEventDispatcher::addListener()
  3. 4.x webprofiler/src/EventDispatcher/TraceableEventDispatcher.php \Drupal\webprofiler\EventDispatcher\TraceableEventDispatcher::addListener()

Overrides ContainerAwareEventDispatcher::addListener

File

webprofiler/src/EventDispatcher/TraceableEventDispatcher.php, line 43

Class

TraceableEventDispatcher
Class TraceableEventDispatcher

Namespace

Drupal\webprofiler\EventDispatcher

Code

public function addListener($event_name, $listener, $priority = 0) {
  parent::addListener($event_name, $listener, $priority);
  $this->notCalledListeners[$event_name][$priority][] = [
    'callable' => $listener,
  ];
}