function annotationcommand_adapter_command_names

master annotationcommand_adapter_command_names($command)

Build all of the name variants for a Drush $command record


array $command Drush command record:

Return value


3 calls to annotationcommand_adapter_command_names()
annotationcommand_adapter_add_hook_options in includes/
Modify a $command record, adding option definitions defined by any command hook.
annotationcommand_adapter_process_command in includes/
This function is set as the $command['callback'] for commands that have been converted to annotated commands. When the DRUSH_SYMFONY environment variable is set, these will be called via Symfony's Application::run() method. Otherwise,…
_drush_invoke_hooks in includes/
Invoke Drush API calls, including all hooks.


includes/, line 498


function annotationcommand_adapter_command_names($command) {
  $names = array_merge([$command['command']], $command['aliases']);
  if (!empty($command['annotated-command-callback'])) {
    $commandHandler = $command['annotated-command-callback'][0];
    $reflectionClass = new \ReflectionClass($commandHandler);
    $commandFileClass = $reflectionClass->getName();
    $names[] = $commandFileClass;
  return $names;