Same name and namespace in other branches
- 4.6.x includes/module.inc \module_invoke()
- 4.7.x includes/module.inc \module_invoke()
- 5.x includes/module.inc \module_invoke()
- 7.x includes/module.inc \module_invoke()
Invoke a hook in a particular module.
Parameters
$module: The name of the module (without the .module extension).
$hook: The name of the hook to invoke.
...: Arguments to pass to the hook implementation.
Return value
The return value of the hook implementation.
Related topics
37 calls to module_invoke()
- block_admin_configure in modules/
block/ block.admin.inc - Menu callback; displays the block configuration form.
- block_admin_configure_submit in modules/
block/ block.admin.inc - blogapi_metaweblog_get_category_list in modules/
blogapi/ blogapi.module - Blogging API callback. Returns a list of the taxonomy terms that can be associated with a blog node.
- blogapi_mt_get_post_categories in modules/
blogapi/ blogapi.module - Blogging API callback. Returns a list of the taxonomy terms that are assigned to a particular node.
- bootstrap_invoke_all in includes/
bootstrap.inc - Call all init or exit hooks without including all modules.
1 string reference to 'module_invoke'
- search_menu in modules/
search/ search.module - Implementation of hook_menu().
File
- includes/
module.inc, line 469 - API for loading and interacting with Drupal modules.
Code
function module_invoke() {
$args = func_get_args();
$module = $args[0];
$hook = $args[1];
unset($args[0], $args[1]);
$function = $module . '_' . $hook;
if (module_hook($module, $hook)) {
return call_user_func_array($function, $args);
}
}