module_invoke
- Versions
- 4.6 – 7
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
Code
includes/module.inc, line 176
<?php
function module_invoke() {
$args = func_get_args();
$module = array_shift($args);
$hook = array_shift($args);
$function = $module .'_'. $hook;
if (module_hook($module, $hook)) {
return call_user_func_array($function, $args);
}
}
?>Login or register to post comments 