function drush_command_hook

8.0.x drush_command_hook($commandfile, $hook)
6.x drush_command_hook($commandfile, $hook)
7.x drush_command_hook($commandfile, $hook)
3.x drush_command_hook($commandfile, $hook)
4.x drush_command_hook($commandfile, $hook)
5.x drush_command_hook($commandfile, $hook)
master drush_command_hook($commandfile, $hook)

Determine whether a command file implements a hook.


$module: The name of the module (without the .module extension).

$hook: The name of the hook (e.g. "help" or "menu").

Return value

TRUE if the the hook is implemented.

3 calls to drush_command_hook()
drush_command_implements in includes/
Determine which command files are implementing a hook.
drush_get_commands in includes/
Get a list of all implemented commands. This invokes hook_drush_command().
drush_get_engines in includes/
Return a structured array of engines of a specific type from commandfiles implementing hook_drush_engine_$type.


includes/, line 682
The drush command engine.


function drush_command_hook($commandfile, $hook) {
  return function_exists($commandfile . '_' . $hook);