[FrameworkBundle] Fixed TextDescriptor::describeEventDispatcherListeners()
This commit is contained in:
parent
92706399c3
commit
1b25018208
@ -310,6 +310,8 @@ class TextDescriptor extends Descriptor
|
||||
foreach ($registeredListeners as $order => $listener) {
|
||||
$table->addRow(array(sprintf('#%d', $order + 1), $this->formatCallable($listener)));
|
||||
}
|
||||
|
||||
$table->render();
|
||||
} else {
|
||||
ksort($registeredListeners);
|
||||
foreach ($registeredListeners as $eventListened => $eventListeners) {
|
||||
@ -320,11 +322,10 @@ class TextDescriptor extends Descriptor
|
||||
foreach ($eventListeners as $order => $eventListener) {
|
||||
$table->addRow(array(sprintf('#%d', $order + 1), $this->formatCallable($eventListener)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$table->render();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
|
@ -1,6 +1,12 @@
|
||||
<info>[event_dispatcher]</info> Registered listeners by event
|
||||
|
||||
<info>[Event]</info> event1
|
||||
+-------+-------------------+
|
||||
|[32m Order [39m|[32m Callable [39m|
|
||||
+-------+-------------------+
|
||||
| #1 | global_function() |
|
||||
| #2 | \Closure() |
|
||||
+-------+-------------------+
|
||||
|
||||
<info>[Event]</info> event2
|
||||
+-------+-----------------------------------------------------------------------------------+
|
||||
|
Reference in New Issue
Block a user