hook_modules_enabled
- Versions
- 7
hook_modules_enabled($modules)
Perform necessary actions after modules are enabled.
This function differs from hook_enable() as it gives all other modules a chance to perform actions when modules are enabled, whereas hook_enable() will only be called on the module actually being enabled.
See also
Parameters
$modules An array of the enabled modules.
Related topics
Code
modules/system/system.api.php, line 1363
<?php
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();
}
}
?>Login or register to post comments 