function hook_module_preinstall
Same name and namespace in other branches
- 8.9.x core/lib/Drupal/Core/Extension/module.api.php \hook_module_preinstall()
- 10 core/lib/Drupal/Core/Extension/module.api.php \hook_module_preinstall()
- 11.x core/lib/Drupal/Core/Extension/module.api.php \hook_module_preinstall()
Perform necessary actions before a module is installed.
Parameters
string $module: The name of the module about to be installed.
Related topics
9 functions implement hook_module_preinstall()
Note: the procedural functions in this list are found by pattern matching, so the list may include some functions that are not actually implementations of this hook.
- DemoUmamiContentHooks::modulePreinstall in core/
profiles/ demo_umami/ modules/ demo_umami_content/ src/ Hook/ DemoUmamiContentHooks.php - Implements hook_module_preinstall().
- demo_umami_content_module_preinstall in core/
profiles/ demo_umami/ modules/ demo_umami_content/ demo_umami_content.install - Implements hook_module_preinstall().
- LanguageTestHooks::modulePreinstall in core/
modules/ language/ tests/ language_test/ src/ Hook/ LanguageTestHooks.php - Implements hook_module_preinstall().
- language_test_module_preinstall in core/
modules/ language/ tests/ language_test/ language_test.module - Implements hook_module_preinstall().
- OtherModuleInstalledHooks::modulePreinstall in core/
modules/ system/ tests/ modules/ respond_install_uninstall_hook_test/ src/ Hook/ OtherModuleInstalledHooks.php - Implements hook_module_preinstall().
1 invocation of hook_module_preinstall()
- ModuleInstaller::install in core/
lib/ Drupal/ Core/ Extension/ ModuleInstaller.php - Installs a given list of modules.
File
-
core/
lib/ Drupal/ Core/ Extension/ module.api.php, line 165
Code
function hook_module_preinstall($module) {
mymodule_cache_clear();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.