| 5 module.inc | module_invoke() |
| 6 module.inc | module_invoke() |
| 7 module.inc | module_invoke($module, $hook) |
| 8 module.inc | module_invoke($module, $hook) |
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
66 calls to module_invoke()
File
- core/
includes/ module.inc, line 831 - API for loading and interacting with Drupal modules.
Code
function module_invoke($module, $hook) {
$args = func_get_args();
// Remove $module and $hook from the arguments.
unset($args[0], $args[1]);
if (module_hook($module, $hook)) {
return call_user_func_array($module . '_' . $hook, $args);
}
}
Login or register to post comments