You are here

function module_invoke in Drupal 4

Same name and namespace in other branches
  1. 5 includes/module.inc \module_invoke()
  2. 6 includes/module.inc \module_invoke()
  3. 7 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

48 calls to module_invoke()
block_admin_configure in modules/block.module
Menu callback; displays the block configuration form.
block_admin_configure_submit in modules/block.module
block_list in modules/block.module
Return all blocks in the specified region for the current user.
block_user in modules/block.module
Implementation of hook_user().
blogapi_metaweblog_get_category_list in modules/blogapi.module
Blogging API callback. Returns a list of the taxonomy terms that can be associated with a blog node.

... See full list

File

includes/module.inc, line 176
API for loading and interacting with Drupal modules.

Code

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);
  }
}