public function DevelCommands::hookInteract in Devel 8.3
Same name and namespace in other branches
- 8 src/Commands/DevelCommands.php \Drupal\devel\Commands\DevelCommands::hookInteract()
- 8.2 src/Commands/DevelCommands.php \Drupal\devel\Commands\DevelCommands::hookInteract()
- 4.x src/Commands/DevelCommands.php \Drupal\devel\Commands\DevelCommands::hookInteract()
@hook interact hook
File
- src/
Commands/ DevelCommands.php, line 133
Class
- DevelCommands
- Class DevelCommands.
Namespace
Drupal\devel\CommandsCode
public function hookInteract(Input $input, Output $output) {
if (!$input
->getArgument('implementation')) {
if ($hook_implementations = $this
->getModuleHandler()
->getImplementations($input
->getArgument('hook'))) {
if (!($choice = $this
->io()
->choice('Enter the number of the hook implementation you wish to view.', array_combine($hook_implementations, $hook_implementations)))) {
throw new UserAbortException();
}
$input
->setArgument('implementation', $choice);
}
else {
throw new \Exception(dt('No implementations'));
}
}
}