function hook_module_implements_alter

×

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 system.api.php hook_module_implements_alter(&$implementations, $hook)
cle7 system.api.php hook_module_implements_alter(&$implementations, $hook)
elmsmedia7 system.api.php hook_module_implements_alter(&$implementations, $hook)
icor7 system.api.php hook_module_implements_alter(&$implementations, $hook)
meedjum_blog7 system.api.php hook_module_implements_alter(&$implementations, $hook)
mooc7 system.api.php hook_module_implements_alter(&$implementations, $hook)

Alter the registry of modules implementing a hook.

This hook is invoked during module_implements(). A module may implement this hook in order to reorder the implementing modules, which are otherwise ordered by the module's system weight.

Note that hooks invoked using drupal_alter() can have multiple variations (such as hook_form_alter() and hook_form_FORM_ID_alter()). drupal_alter() will call all such variants defined by a single module in turn. For the purposes of hook_module_implements_alter(), these variants are treated as a single hook. Thus, to ensure that your implementation of hook_form_FORM_ID_alter() is called at the right time, you will have to change the order of hook_form_alter() implementation in hook_module_implements_alter().

Parameters

$implementations: An array keyed by the module's name. The value of each item corresponds to a $group, which is usually FALSE, unless the implementation is in a file named $module.$group.inc.

$hook: The name of the module hook being implemented.

Related topics

15 functions implement hook_module_implements_alter()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

advagg_module_implements_alter in sites/all/modules/ulmus/advagg/advagg.module
Implements hook_module_implements_alter().
book_copy_module_implements_alter in sites/all/modules/elmsln_contrib/book_copy/book_copy.module
Implements hook_module_implements_alter().
common_test_module_implements_alter in modules/simpletest/tests/common_test.module
Implements hook_module_implements_alter().
devel_themer_module_implements_alter in sites/all/modules/ulmus/devel_themer/devel_themer.module
Implements hook_module_implements_alter().
display_cache_module_implements_alter in sites/all/modules/ulmus/display_cache/display_cache.module
Implements hook_module_implements_alter().

... See full list

2 invocations of hook_module_implements_alter()
drupal_alter in includes/module.inc
Passes alterable variables to specific hook_TYPE_alter() implementations.
module_implements in includes/module.inc
Determines which modules are implementing a hook.

File

modules/system/system.api.php, line 2009
Hooks provided by Drupal core and the System module.

Code

function hook_module_implements_alter(&$implementations, $hook) {
  if ($hook == 'rdf_mapping') {
    // Move my_module_rdf_mapping() to the end of the list. module_implements()
    // iterates through $implementations with a foreach loop which PHP iterates
    // in the order that the items were added, so to move an item to the end of
    // the array, we remove it and then add it.
    $group = $implementations['my_module'];
    unset($implementations['my_module']);
    $implementations['my_module'] = $group;
  }
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.