function DevelCommands::event

Same name in this branch
  1. 5.x src/Commands/DevelCommands.php \Drupal\devel\Commands\DevelCommands::event()
Same name in other branches
  1. 4.x src/Commands/DevelCommands.php \Drupal\devel\Commands\DevelCommands::event()

List implementations of a given event and optionally edit one.

File

src/Drush/Commands/DevelCommands.php, line 160

Class

DevelCommands

Namespace

Drupal\devel\Drush\Commands

Code

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();
}