function hook_module_preinstall in Drupal 8
Same name and namespace in other branches
- 9 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
3 functions implement hook_module_preinstall()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- language_test_module_preinstall in core/
modules/ language/ tests/ language_test/ language_test.module - Implements hook_module_preinstall().
- system_test_module_preinstall in core/
modules/ system/ tests/ modules/ system_test/ system_test.module - Implements hook_module_preinstall().
- workspaces_module_preinstall in core/
modules/ workspaces/ workspaces.install - 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 - Hooks related to module and update systems.
Code
function hook_module_preinstall($module) {
mymodule_cache_clear();
}