function hook_modules_enabled

Perform necessary actions after modules are enabled.

This function differs from hook_enable() in that it gives all other modules a chance to perform actions when modules are enabled, whereas hook_enable() is only called on the module actually being enabled. See module_enable() for a detailed description of the order in which install and enable hooks are invoked.

Parameters

$modules: An array of the modules that were enabled.

See also

hook_enable()

hook_modules_installed()

module_enable()

Related topics

8 functions implement hook_modules_enabled()

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

breakpoint_modules_enabled in drupal/core/modules/breakpoint/breakpoint.module
Implements hook_modules_enabled().
comment_modules_enabled in drupal/core/modules/comment/comment.install
Implements hook_modules_enabled().
field_modules_enabled in drupal/core/modules/field/field.module
Implements hook_modules_enabled().
filter_modules_enabled in drupal/core/modules/filter/filter.module
Implements hook_modules_enabled().
language_modules_enabled in drupal/core/modules/language/language.module
Implements hook_modules_enabled().

... See full list

1 invocation of hook_modules_enabled()
module_enable in drupal/core/includes/module.inc
Enables or installs a given list of modules.

File

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

Code

function hook_modules_enabled($modules) {
  if (in_array('lousy_module', $modules)) {
    drupal_set_message(t('mymodule is not compatible with lousy_module'), 'error');
    mymodule_disable_functionality();
  }
}