1.20.x system.api.php hook_modules_installed($modules)

Perform necessary actions after modules are installed.

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

This hook should be implemented in a .module file, not in an .install file.

Parameters

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

See also

module_enable()

hook_modules_enabled()

hook_install()

Related topics

File

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

Code

function hook_modules_installed($modules) {
  if (in_array('other_module', $modules)) {
    backdrop_set_message(t('My module works together with Other Module. See the settings page for new options.'));
  }
}