1 system.api.php | hook_modules_enabled($modules) |
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
Related topics
File
- core/
modules/ system/ system.api.php, line 2119 - Hooks provided by Backdrop core and the System module.
Code
function hook_modules_enabled($modules) {
if (in_array('lousy_module', $modules)) {
backdrop_set_message(t('my_module is not compatible with lousy_module'), 'error');
my_module_disable_functionality();
}
}