module_invoke_all

  1. drupal
    1. 4.7 module.inc
    2. 5 module.inc
    3. 6
    4. 7
Versions
4.7 – 7 module_invoke_all()

Invoke a hook in all enabled modules that implement it.

Parameters

$hook The name of the hook to invoke.

... Arguments to pass to the hook.

Return value

An array of return values of the hook implementations. If modules return arrays from their implementations, those are merged into one array.

Related topics

▾ 135 functions call module_invoke_all()

actions_delete in drupal/includes/actions.inc
Deletes a single action from the database.
actions_list in drupal/includes/actions.inc
Discovers all available actions by invoking hook_action_info().
aggregator_remove in drupal/modules/aggregator/aggregator.module
Removes all items from a feed.
ajax_footer in drupal/includes/ajax.inc
Perform end-of-Ajax-request tasks.
archiver_get_info in drupal/includes/common.inc
Retrieves a list of all available archivers.
comment_build_content in drupal/modules/comment/comment.module
Builds a structured array representing the comment's content.
comment_delete_multiple in drupal/modules/comment/comment.module
Delete comments and all their replies.
comment_save in drupal/modules/comment/comment.module
Accepts a submission of new or changed comment content.
dashboard_region_descriptions in drupal/modules/dashboard/dashboard.module
Return an array of dashboard region descriptions, keyed by region name.
DrupalWebTestCase::checkPermissions in drupal/modules/simpletest/drupal_web_test_case.php
Check to make sure that the array of permissions are valid.
drupal_cron_run in drupal/includes/common.inc
Executes a cron run when called.
drupal_exit in drupal/includes/common.inc
Perform end-of-request tasks.
drupal_flush_all_caches in drupal/includes/common.inc
Flush all cached data on the site.
drupal_get_updaters in drupal/includes/common.inc
Drupal Updater registry.
drupal_page_footer in drupal/includes/common.inc
Perform end-of-request tasks.
drupal_retrieve_form in drupal/includes/form.inc
Retrieves the structured array that defines a given form.
drupal_uninstall_modules in drupal/includes/install.inc
Uninstalls a given list of modules.
element_info in drupal/includes/common.inc
Retrieve the default properties for the defined element type.
entity_get_info in drupal/includes/common.inc
Get the entity info array of an entity type.
entity_prepare_view in drupal/includes/common.inc
Invoke hook_entity_prepare_view().
field_attach_create_bundle in drupal/modules/field/field.attach.inc
Notify field.module that a new bundle was created.
field_attach_delete in drupal/modules/field/field.attach.inc
Delete field data for an existing entity. This deletes all revisions of field data for the entity.
field_attach_delete_bundle in drupal/modules/field/field.attach.inc
Notify field.module the a bundle was deleted.
field_attach_delete_revision in drupal/modules/field/field.attach.inc
Delete field data for a single revision of an existing entity. The passed entity must have a revision id attribute.
field_attach_insert in drupal/modules/field/field.attach.inc
Save field data for a new entity.
field_attach_load in drupal/modules/field/field.attach.inc
Loads fields for the current revisions of a group of entities.
field_attach_presave in drupal/modules/field/field.attach.inc
Perform necessary operations just before fields data get saved.
field_attach_rename_bundle in drupal/modules/field/field.attach.inc
Notify field.module that a bundle was renamed.
field_attach_update in drupal/modules/field/field.attach.inc
Save field data for an existing entity.
field_create_field in drupal/modules/field/field.crud.inc
Creates a field.
field_create_instance in drupal/modules/field/field.crud.inc
Creates an instance of a field, binding it to a bundle.
field_delete_field in drupal/modules/field/field.crud.inc
Marks a field and its instances and data for deletion.
field_delete_instance in drupal/modules/field/field.crud.inc
Marks a field instance and its data for deletion.
field_info_max_weight in drupal/modules/field/field.info.inc
Returns the maximum weight of all the components in an entity.
field_purge_field in drupal/modules/field/field.crud.inc
Purges a field record from the database.
field_purge_instance in drupal/modules/field/field.crud.inc
Purges a field instance record from the database.
field_read_fields in drupal/modules/field/field.crud.inc
Reads in fields that match an array of conditions.
field_read_instances in drupal/modules/field/field.crud.inc
Reads in field instances that match an array of conditions.
field_update_field in drupal/modules/field/field.crud.inc
Updates a field.
field_update_instance in drupal/modules/field/field.crud.inc
Updates an instance of a field.
file_copy in drupal/includes/file.inc
Copies a file to a new location and adds a file record to the database.
file_delete in drupal/includes/file.inc
Delete a file and its database record.
file_get_stream_wrappers in drupal/includes/file.inc
Drupal stream wrapper registry.
file_move in drupal/includes/file.inc
Move a file to a new location and update the file's database entry.
file_save in drupal/includes/file.inc
Save a file object to the database.
file_validate in drupal/includes/file.inc
Check that a file meets the criteria specified by the validators.
filter_format_disable in drupal/modules/filter/filter.module
Disable a text format.
filter_format_save in drupal/modules/filter/filter.module
Save a text format object to the database.
hook_search_admin in drupal/modules/search/search.api.php
Add elements to the search settings form.
hook_search_execute in drupal/modules/search/search.api.php
Execute a search for a set of key words.
hook_update_index in drupal/modules/search/search.api.php
Update the search index for this module.
image_file_download in drupal/modules/image/image.module
Implements hook_file_download().
image_get_available_toolkits in drupal/includes/image.inc
Return a list of available toolkits.
image_style_delete in drupal/modules/image/image.module
Delete an image style.
image_style_deliver in drupal/modules/image/image.module
Menu callback; Given a style and image path, generate a derivative.
image_style_flush in drupal/modules/image/image.module
Flush cached media for a style.
image_style_save in drupal/modules/image/image.module
Save an image style.
language_negotiation_info in drupal/includes/language.inc
Return all the defined language providers.
language_types_info in drupal/includes/language.inc
Return all the defined language types.
locale_add_language in drupal/includes/locale.inc
API function to add a language.
locale_languages_delete_form_submit in drupal/modules/locale/locale.admin.inc
Process language deletion submissions.
locale_languages_overview_form_submit in drupal/modules/locale/locale.admin.inc
Process language overview form submissions, updating existing languages.
locale_translate_export_pot_form in drupal/modules/locale/locale.admin.inc
Translation template export form.
locale_translate_export_po_form in drupal/modules/locale/locale.admin.inc
Form to export PO files for the languages provided.
locale_translate_import_form in drupal/modules/locale/locale.admin.inc
User interface for the translation import screen.
locale_translate_overview_screen in drupal/modules/locale/locale.admin.inc
Overview screen for translations.
locale_translation_filters in drupal/modules/locale/locale.admin.inc
List locale translation filters that can be applied.
menu_delete in drupal/modules/menu/menu.module
Delete a custom menu and all contained links.
menu_get_custom_theme in drupal/includes/menu.inc
Gets the custom theme for the current page, if there is one.
menu_link_save in drupal/includes/menu.inc
Save a menu link.
menu_save in drupal/modules/menu/menu.module
Save a custom menu.
module_disable in drupal/includes/module.inc
Disable a given set of modules.
module_enable in drupal/includes/module.inc
Enables or installs a given list of modules.
module_test_hook_dynamic_loading_invoke_all in drupal/modules/simpletest/tests/module_test.module
Page callback for 'hook dynamic loading' test.
node_access in drupal/modules/node/node.module
Determine whether the current user may perform the given operation on the specified node.
node_access_acquire_grants in drupal/modules/node/node.module
Gets the list of node access grants and writes them to the database.
node_access_grants in drupal/modules/node/node.module
Fetch an array of permission IDs granted to the given user ID.
node_admin_nodes in drupal/modules/node/node.admin.inc
Form builder: Builds the node administration overview.
node_admin_nodes_submit in drupal/modules/node/node.admin.inc
Process node_admin_nodes form submissions.
node_build_content in drupal/modules/node/node.module
Builds a structured array representing the node's content.
node_delete_multiple in drupal/modules/node/node.module
Delete multiple nodes.
node_object_prepare in drupal/modules/node/node.module
Prepares a node object for editing.
node_revision_delete in drupal/modules/node/node.module
Delete a node revision.
node_save in drupal/modules/node/node.module
Save changes to a node or add a new node.
node_search_admin in drupal/modules/node/node.module
Implements hook_search_admin().
node_search_execute in drupal/modules/node/node.module
Implements hook_search_execute().
node_type_delete in drupal/modules/node/node.module
Deletes a node type from the database.
node_type_reset in drupal/modules/node/content_types.inc
Resets all of the relevant fields of a module-defined node type to their default values.
node_type_save in drupal/modules/node/node.module
Saves a node type to the database.
openid_authentication in drupal/modules/openid/openid.module
Authenticate a user or attempt registration.
openid_authentication_request in drupal/modules/openid/openid.module
openid_discovery in drupal/modules/openid/openid.module
Perform discovery on a claimed ID to determine the OpenID provider endpoint.
openid_normalize in drupal/modules/openid/openid.inc
Normalize the given identifier.
overlay_set_mode in drupal/modules/overlay/overlay.module
Sets the overlay mode and adds proper JavaScript and styles to the page.
path_delete in drupal/includes/path.inc
Delete a URL alias.
path_get_admin_paths in drupal/includes/path.inc
Get a list of administrative and non-administrative paths.
path_save in drupal/includes/path.inc
Save a path alias to the database.
rdf_get_namespaces in drupal/modules/rdf/rdf.module
Returns an array of RDF namespaces defined in modules that implement hook_rdf_namespaces().
search_reindex in drupal/modules/search/search.module
Clears a part of or the entire search index.
shortcut_default_set in drupal/modules/shortcut/shortcut.module
Returns the default shortcut set for a given user account.
simpletest_run_tests in drupal/modules/simpletest/simpletest.module
Actually runs tests.
standard_install in drupal/profiles/standard/standard.install
Implements hook_install().
system_cron in drupal/modules/system/system.module
Implements hook_cron().
system_status in drupal/modules/system/system.admin.inc
Menu callback: displays the site status report. Can also be used as a pure check.
taxonomy_term_delete in drupal/modules/taxonomy/taxonomy.module
Delete a term.
taxonomy_term_save in drupal/modules/taxonomy/taxonomy.module
Save a term object to the database.
taxonomy_vocabulary_delete in drupal/modules/taxonomy/taxonomy.module
Delete a vocabulary.
taxonomy_vocabulary_save in drupal/modules/taxonomy/taxonomy.module
Save a vocabulary given a vocabulary object.
theme_disable in drupal/includes/theme.inc
Disable a given list of themes.
theme_enable in drupal/includes/theme.inc
Enable a given list of themes.
token_generate in drupal/includes/token.inc
Generate replacement values for a list of tokens.
token_info in drupal/includes/token.inc
Returns metadata describing supported tokens.
trigger_assign in drupal/modules/trigger/trigger.admin.inc
Builds the form that allows users to assign actions to triggers.
update_check_requirements in drupal/update.php
Check update requirements and report any errors.
update_manager_archive_verify in drupal/modules/update/update.manager.inc
Verify an archive after it has been downloaded and extracted.
user_admin_account in drupal/modules/user/user.admin.inc
Form builder; User administration page.
user_admin_account_submit in drupal/modules/user/user.admin.inc
Submit the user administration update form.
user_build_content in drupal/modules/user/user.module
Builds a structured array representing the profile content.
user_cancel in drupal/modules/user/user.module
Cancel a user account.
user_delete_multiple in drupal/modules/user/user.module
Delete multiple user accounts.
user_logout in drupal/modules/user/user.pages.inc
Menu callback; logs the current user out, and redirects to the home page.
user_role_delete in drupal/modules/user/user.module
Delete a user role from database.
user_role_save in drupal/modules/user/user.module
Save a user role to the database.
user_save in drupal/modules/user/user.module
Save changes to a user account or add a new user.
_drupal_bootstrap_full in drupal/includes/common.inc
_field_info_collate_fields in drupal/modules/field/field.info.inc
Collates all information on existing fields and instances.
_locale_translate_seek in drupal/includes/locale.inc
Perform a string search and display results in a table
_menu_delete_item in drupal/includes/menu.inc
Helper function for menu_link_delete; deletes a single menu link.
_node_index_node in drupal/modules/node/node.module
Index a single node.
_node_rankings in drupal/modules/node/node.module
Gather the rankings from the the hook_ranking implementations.
_simpletest_batch_finished in drupal/modules/simpletest/simpletest.module
_simpletest_batch_operation in drupal/modules/simpletest/simpletest.module
Batch operation callback.
_system_date_formats_build in drupal/modules/system/system.module
Builds and returns information about available date formats.
_trigger_get_all_info in drupal/modules/trigger/trigger.module
Retrieves and caches information from hook_trigger_info() implementations.
_user_categories in drupal/modules/user/user.module
Retrieve a list of all user setting/information categories and sort them by weight.

Code

drupal/includes/module.inc, line 812

<?php
function module_invoke_all() {
  $args = func_get_args();
  $hook = $args[0];
  unset($args[0]);
  $return = array();
  foreach (module_implements($hook) as $module) {
    $function = $module . '_' . $hook;
    if (function_exists($function)) {
      $result = call_user_func_array($function, $args);
      if (isset($result) && is_array($result)) {
        $return = array_merge_recursive($return, $result);
      }
      elseif (isset($result)) {
        $return[] = $result;
      }
    }
  }

  return $return;
}
?>