function DevelEventCommand::getImplementations
Finds the listeners of an event.
Return value
array<string, array{name: string, file: string, line: int}> The listeners, keyed by function or Class::method name.
2 calls to DevelEventCommand::getImplementations()
- DevelEventCommand::askForImplementation in src/
Command/ DevelEventCommand.php - Prompts for an event, and for an implementation, when not given.
- DevelEventCommand::__invoke in src/
Command/ DevelEventCommand.php - Lists the listeners of an event, or opens one of them in an editor.
File
-
src/
Command/ DevelEventCommand.php, line 110
Class
- DevelEventCommand
- Lists the listeners of an event and opens one in an editor.
Namespace
Drupal\devel\CommandCode
protected function getImplementations(string $event) : array {
$implementations = [];
foreach ($this->eventDispatcher
->getListeners($event) as $listener) {
$location = $this->locate($listener);
$implementations[$location['name']] ??= $location;
}
return $implementations;
}