function annotationcommand_adapter_run_console_command

master annotationcommand_adapter.inc annotationcommand_adapter_run_console_command()

This function is set as the $command['callback'] for Symfony Console commands e.g. those provided by Drupal 8 modules. When the DRUSH_SYMFONY environment variable is set, these will be called via Symfony's Application::run() method. Otherwise, the legacy Drush command dispatcher will be used for all commands.

Return value

bool false if command failed (expect drush_set_error was called in this case)

1 string reference to 'annotationcommand_adapter_run_console_command'
annotationcommand_adapter_get_command_for_console_command in includes/annotationcommand_adapter.inc
Convert a Symfony Console command into a Drush $command record

File

includes/annotationcommand_adapter.inc, line 134
annotationcommand_adapter.inc

Code

function annotationcommand_adapter_run_console_command() {
  $args = func_get_args();
  $command = drush_get_command();

  $console_command = $command['drush-console-command'];
  // TODO: Build an appropriate input object
  $input = annotationcommand_adapter_build_input($console_command, $args);
  $output = new ConsoleOutput();
  $result = $console_command->run($input, $output);

  return $result;
}