function drush_command_invoke_all

8.0.x command.inc drush_command_invoke_all()
6.x command.inc drush_command_invoke_all()
7.x command.inc drush_command_invoke_all()
3.x command.inc drush_command_invoke_all()
4.x command.inc drush_command_invoke_all()
5.x command.inc drush_command_invoke_all()
master command.inc drush_command_invoke_all()

Invoke a hook in all available command files that implement it.

Parameters

$hook: The name of the hook to invoke.

...: Arguments to pass to the hook.

Return value

An array of return values of the hook implementations. If commands return arrays from their implementations, those are merged into one array.

See also

drush_command_invoke_all_ref()

12 calls to drush_command_invoke_all()
drush_cache_get_bins in includes/cache.inc
Return drush cache bins and any bins added by hook_drush_flush_caches().
drush_commands_categorize in includes/command.inc
Organize commands into categories. Used by help listing and core-cli.
drush_complete_rebuild_arguments in includes/complete.inc
Rebuild and cache completions for command arguments.
drush_engine_topic_command in includes/engines.inc
Implementation of command hook for docs-output-formats
drush_get_bootstrap_candidate_classnames in includes/bootstrap.inc
Find the list of bootstrap classnames available for initializing a CMS with Drush.

... See full list

File

includes/command.inc, line 1384
The drush command engine.

Code

function drush_command_invoke_all() {
  $args = func_get_args();
  if (count($args) == 1) {
    $args[] = NULL;
  }
  $reference_value = $args[1];
  $args[1] = &$reference_value;

  return call_user_func_array('drush_command_invoke_all_ref', $args);
}