1. drupal
    1. 5
    2. 6
    3. 7
    4. 8
5 – 6 module_invoke()
8 – 7 module_invoke($module, $hook)

Invoke a hook in a particular module.


$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

▾ 70 functions call module_invoke()

aggregator_admin_form in modules/aggregator/
Form builder; Configure the aggregator system.
aggregator_form_aggregator_admin_form_alter in modules/aggregator/
Implements hook_form_aggregator_admin_form_alter().
aggregator_refresh in modules/aggregator/aggregator.module
Checks a news feed for new items.
block_admin_configure in modules/block/
Form builder for the block configuration form.
block_admin_configure_submit in modules/block/
Form submission handler for the block configuration form.
block_form_user_profile_form_alter in modules/block/block.module
Implements hook_form_FORM_ID_alter().
bootstrap_invoke_all in includes/
Invoke a bootstrap hook in all bootstrap modules that implement it.
dashboard_page_build in modules/dashboard/dashboard.module
Implements hook_page_build().
drupal_check_module in includes/
Check a module's requirements.
drupal_cron_run in includes/
Executes a cron run when called.
drupal_get_complete_schema in includes/
Get the whole database schema.
drupal_get_library in includes/
Retrieves information for a JavaScript/CSS library.
drupal_get_schema_unprocessed in includes/
Returns the unprocessed and unaltered version of a module's schema.
drupal_install_system in includes/
Callback to install the system module.
drupal_uninstall_modules in includes/
Uninstalls a given list of modules.
field_associate_fields in modules/field/field.module
Allows a module to update the database for fields and columns it controls.
field_attach_delete in modules/field/
Delete field data for an existing entity. This deletes all revisions of field data for the entity.
field_attach_delete_revision in modules/field/
Delete field data for a single revision of an existing entity. The passed entity must have a revision id attribute.
field_attach_insert in modules/field/
Save field data for a new entity.
field_attach_load in modules/field/
Loads fields for the current revisions of a group of entities.
field_attach_update in modules/field/
Save field data for an existing entity.
field_create_field in modules/field/
Creates a field.
field_delete_field in modules/field/
Marks a field and its instances and data for deletion.
field_delete_instance in modules/field/
Marks a field instance and its data for deletion.
field_purge_data in modules/field/
Purges the field data for a single field on a single pseudo-entity.
field_purge_field in modules/field/
Purges a field record from the database.
field_purge_instance in modules/field/
Purges a field instance record from the database.
field_read_fields in modules/field/
Reads in fields that match an array of conditions.
field_ui_display_overview_form in modules/field_ui/
Menu callback; presents field display settings for a given view mode.
field_ui_field_edit_form in modules/field_ui/
Menu callback; presents the field instance edit page.
field_ui_field_settings_form in modules/field_ui/
Menu callback; presents the field settings edit page.
field_update_7001 in modules/field/field.install
Fix fields definitions created during the d6 to d7 upgrade path.
field_update_field in modules/field/
Updates a field.
file_file_download in modules/file/file.module
Implements hook_file_download().
filter_get_filters in modules/filter/filter.module
Return a list of all filters provided by modules.
help_links_as_list in modules/help/
help_page in modules/help/
Menu callback; prints a page listing general help for a module.
hook_search_execute in modules/search/search.api.php
Execute a search for a set of key words.
image_effect_definitions in modules/image/image.module
Pull in image effects exposed by modules implementing hook_image_effect_info().
image_styles in modules/image/image.module
Get an array of all styles and their settings.
module_disable in includes/
Disable a given set of modules.
module_enable in includes/
Enables or installs a given list of modules.
module_test_hook_dynamic_loading_invoke in modules/simpletest/tests/module_test.module
Page callback for 'hook dynamic loading' test.
node_filters in modules/node/
List node administration filters that can be applied.
node_filter_form in modules/node/
Return form for node administration filters.
node_search_execute in modules/node/node.module
Implements hook_search_execute().
path_admin_overview in modules/path/
Return a listing of all defined URL aliases.
search_admin_settings in modules/search/
Menu callback: displays the search module settings page.
search_cron in modules/search/search.module
Implements hook_cron().
search_data in modules/search/search.module
Performs a search by calling hook_search_execute().
search_invoke_preprocess in modules/search/search.module
Invokes hook_search_preprocess() in modules.
StatisticsReportsTestCase::testPopularContentBlock in modules/statistics/statistics.test
Tests the "popular content" block.
system_get_module_admin_tasks in modules/system/system.module
Generate a list of tasks offered by a specified module.
system_modules in modules/system/
Menu callback; provides module enable/disable interface.
update_get_update_list in includes/
Return a list of all the pending database updates.
user_admin_permissions in modules/user/
Menu callback: administer permissions.
user_modules_installed in modules/user/user.module
Implements hook_modules_installed().
user_permission_get_modules in modules/user/user.module
Determine the modules that permissions belong to.
watchdog in includes/
Log a system message.
watchdog_skip_semaphore in modules/simpletest/tests/actions_loop_test.module
Replacement of the watchdog() function that eliminates the use of semaphores so that we can test the abortion of an action loop.
_block_rehash in modules/block/block.module
Update the 'block' DB table with the blocks currently exported by modules.
_block_render_blocks in modules/block/block.module
Render the content and subject for a set of blocks.
_field_info_collate_types in modules/field/
Collates all information on field types, widget types and related structures.
_field_info_prepare_field in modules/field/
Prepares a field definition for the current run-time context.
_node_types_build in modules/node/node.module
Builds and returns the list of available node types.
_options_get_options in modules/field/modules/options/options.module
Collects the options for a field.
_rdf_get_default_mapping in modules/rdf/rdf.module
Helper function to get the default RDF mapping for a given entity type.
_search_menu_access in modules/search/search.module
Access callback for search tabs.
_system_date_format_types_build in modules/system/system.module
Builds and returns information about available date types.
_update_7000_field_create_field in modules/field/field.install
Utility function: create a field by writing directly to the database.


includes/, line 789

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