function drush_command_hook

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

Determine whether a command file implements a hook.

Parameters

$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/command.inc
Determine which command files are implementing a hook.
drush_get_commands in includes/command.inc
Get a list of all implemented commands. This invokes hook_drush_command().
drush_get_engines in includes/engines.inc
Return a structured array of engines of a specific type.

File

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

Code

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