8.5.x EventDispatcher.php EventDispatcher::sortListeners($eventName)
8.0.x EventDispatcher.php EventDispatcher::sortListeners($eventName)
8.1.x EventDispatcher.php EventDispatcher::sortListeners($eventName)
8.2.x EventDispatcher.php EventDispatcher::sortListeners($eventName)
8.3.x EventDispatcher.php EventDispatcher::sortListeners($eventName)
8.4.x EventDispatcher.php EventDispatcher::sortListeners($eventName)
8.6.x EventDispatcher.php EventDispatcher::sortListeners($eventName)

Sorts the internal list of listeners for the given event by priority.

Parameters

string $eventName The name of the event:

1 call to EventDispatcher::sortListeners()
EventDispatcher::getListeners in vendor/symfony/event-dispatcher/EventDispatcher.php
Gets the listeners of a specific event or all listeners sorted by descending priority.

File

vendor/symfony/event-dispatcher/EventDispatcher.php, line 193

Class

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

Namespace

Symfony\Component\EventDispatcher

Code

private function sortListeners($eventName) {
  krsort($this->listeners[$eventName]);
  $this->sorted[$eventName] = call_user_func_array('array_merge', $this->listeners[$eventName]);
}