function module_builder_callback_hook_list in Module Builder 7
Same name and namespace in other branches
- 6.2 drush/module_builder.drush.inc \module_builder_callback_hook_list()
Callback to list known hooks.
1 string reference to 'module_builder_callback_hook_list'
- module_builder_drush_command in drush/
module_builder.drush.inc - Implementation of hook_drush_command().
File
- drush/
module_builder.drush.inc, line 441 - Module builder drush commands.
Code
function module_builder_callback_hook_list() {
// Include generating component file.
module_builder_include('process');
$data = module_builder_get_hook_data();
$time = module_builder_get_hook_data_last_updated();
foreach ($data as $file => $hooks) {
drush_print("Group {$file}:", 2);
foreach ($hooks as $key => $hook) {
drush_print($hook['name'] . ': ' . $hook['description'], 4);
}
}
drush_print(t("Hook data retrieved from @dir.", array(
'@dir' => _module_builder_get_hooks_directory(),
)));
drush_print(t("Hook data was processed on @time.", array(
'@time' => $time,
)));
//print_r($data);
}