function drush_devel_fn_hook

Same name in other branches
  1. 6.x-1.x devel.drush.inc \drush_devel_fn_hook()
  2. 8.x-1.x drush/devel.drush8.inc \drush_devel_fn_hook()

A command handler for showing hook implementations.

File

./devel.drush.inc, line 119

Code

function drush_devel_fn_hook($hook) {
    // Get implementations in the .install files as well.
    include_once './includes/install.inc';
    drupal_load_updates();
    if ($hook_implementations = module_implements($hook)) {
        if ($choice = drush_choice(array_combine($hook_implementations, $hook_implementations), 'Enter the number of the hook implementation you wish to view.')) {
            return drush_devel_fn_view($choice . "_{$hook}");
        }
    }
    else {
        drush_log(dt('No implementations.'), 'ok');
    }
}