function hook_modules_disabled

Perform necessary actions after modules are disabled.

This function differs from hook_disable() in that it gives all other modules a chance to perform actions when modules are disabled, whereas hook_disable() is only called on the module actually being disabled.

Parameters

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

See also

hook_disable()

hook_modules_uninstalled()

Related topics

6 functions implement hook_modules_disabled()

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

field_modules_disabled in drupal/core/modules/field/field.module
Implements hook_modules_disabled().
filter_modules_disabled in drupal/core/modules/filter/filter.module
Implements hook_modules_disabled().
language_modules_disabled in drupal/core/modules/language/language.module
Implements hook_modules_disabled().
module_test_modules_disabled in drupal/core/modules/system/tests/modules/module_test/module_test.module
Implements hook_modules_disabled().
node_modules_disabled in drupal/core/modules/node/node.module
Implements hook_modules_disabled().

... See full list

1 invocation of hook_modules_disabled()
module_disable in drupal/core/includes/module.inc
Disables a given set of modules.

File

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

Code

function hook_modules_disabled($modules) {
  if (in_array('lousy_module', $modules)) {
    mymodule_enable_functionality();
  }
}