hook_modules_uninstalled

Versions
7
hook_modules_uninstalled($modules)

Perform necessary actions after modules are uninstalled.

This function differs from hook_uninstall() as it gives all other modules a chance to perform actions when a module is uninstalled, whereas hook_uninstall() will only be called on the module actually being uninstalled.

It is recommended that you implement this module if your module stores data that may have been set by other modules.

See also

hook_uninstall()

Parameters

$modules The name of the uninstalled module.

Related topics

Code

modules/system/system.api.php, line 1319

<?php
function hook_modules_uninstalled($modules) {
  foreach ($modules as $module) {
    db_delete('mymodule_table')
      ->condition('module', $module)
      ->execute();
  }
  mymodule_cache_rebuild();
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.