function DevelCommands::event
Same name in this branch
- 5.x src/Commands/DevelCommands.php \Drupal\devel\Commands\DevelCommands::event()
Same name and namespace in other branches
- 4.x src/Commands/DevelCommands.php \Drupal\devel\Commands\DevelCommands::event()
List implementations of a given event and optionally edit one.
Attributes
#[CLI\Command(name: self::EVENT, aliases: [
'fne',
'fn-event',
'event',
])]
#[CLI\Argument(name: 'event', description: 'The name of the event to explore. If omitted, a list of events is shown.')]
#[CLI\Argument(name: 'implementation', description: 'The name of the implementation to show. Usually omitted.')]
#[CLI\Usage(name: 'drush devel:event', description: 'Pick a Kernel event, then pick an implementation, and then view its source code')]
#[CLI\Usage(name: 'devel-event kernel.terminate', description: 'Pick a terminate subscribers implementation and view its source code.')]
File
-
src/
Drush/ Commands/ DevelCommands.php, line 160
Class
Namespace
Drupal\devel\Drush\CommandsCode
public function event($event, $implementation) : void {
$info = $this->codeLocate($implementation);
$exec = self::getEditor('');
$cmd = sprintf($exec, Escape::shellArg($info['file']));
$process = $this->processManager()
->shell($cmd);
$process->setTty(TRUE);
$process->mustRun();
}