function module_invoke

×

Error message

User warning: The following module is missing from the file system: theme/theme. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1156 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
cis7 module.inc module_invoke($module, $hook)
cle7 module.inc module_invoke($module, $hook)
elmsmedia7 module.inc module_invoke($module, $hook)
icor7 module.inc module_invoke($module, $hook)
meedjum_blog7 module.inc module_invoke($module, $hook)
mooc7 module.inc module_invoke($module, $hook)

Invokes a hook in a particular module.

All arguments are passed by value. Use drupal_alter() if you need to pass arguments by reference.

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.

See also

drupal_alter()

Related topics

146 calls to module_invoke()
accessibility_test_features_rebuild in sites/all/modules/ulmus/accessibility/accessibility.features.inc
Implements hook[component]_features_rebuild().
admin_menu_links_account in sites/all/modules/ulmus/admin_menu/admin_menu.inc
Builds the account links.
admin_theme_custom_theme in sites/all/modules/ulmus/admin_theme/admin_theme.module
Implementation of hook_custom_theme().
admin_theme_list in sites/all/modules/ulmus/admin_theme/admin_theme.module
Get all module defined options.
advanced_help_index_page in sites/all/modules/ulmus/advanced_help/advanced_help.module
Page callback to view the advanced help topic index.

... See full list

File

includes/module.inc, line 861
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);
  }
}