function hook_module_preuninstall

Same name in other branches
  1. 9 core/lib/Drupal/Core/Extension/module.api.php \hook_module_preuninstall()
  2. 10 core/lib/Drupal/Core/Extension/module.api.php \hook_module_preuninstall()
  3. 11.x core/lib/Drupal/Core/Extension/module.api.php \hook_module_preuninstall()

Perform necessary actions before a module is uninstalled.

Parameters

string $module: The name of the module about to be uninstalled.

Related topics

2 functions implement hook_module_preuninstall()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

locale_module_preuninstall in core/modules/locale/locale.module
Implements hook_module_preuninstall().
system_test_module_preuninstall in core/modules/system/tests/modules/system_test/system_test.module
Implements hook_module_preuninstall().
1 invocation of hook_module_preuninstall()
ModuleInstaller::uninstall in core/lib/Drupal/Core/Extension/ModuleInstaller.php
Uninstalls a given list of modules.

File

core/lib/Drupal/Core/Extension/module.api.php, line 253

Code

function hook_module_preuninstall($module) {
    mymodule_cache_clear();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.