function ContainerAwareEventDispatcher::addListener
Same name in other branches
- 9 core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php \Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher::addListener()
- 8.9.x core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php \Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher::addListener()
- 10 core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php \Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher::addListener()
1 call to ContainerAwareEventDispatcher::addListener()
- ContainerAwareEventDispatcher::addSubscriber in core/
lib/ Drupal/ Component/ EventDispatcher/ ContainerAwareEventDispatcher.php
File
-
core/
lib/ Drupal/ Component/ EventDispatcher/ ContainerAwareEventDispatcher.php, line 214
Class
- ContainerAwareEventDispatcher
- A performance optimized container aware event dispatcher.
Namespace
Drupal\Component\EventDispatcherCode
public function addListener($event_name, $listener, $priority = 0) : void {
$this->listeners[$event_name][$priority][] = [
'callable' => $listener,
];
$this->unsorted[$event_name] = TRUE;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.