hook_modules_uninstalled

  1. drupal
    1. drupal7
Versionen
drupal7 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.

Übergabeparameter

$modules The name of the uninstalled module.

See also

hook_uninstall()

Verwandte Themen

Code

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

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

Kommentare

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen