function ModuleInstaller::invokeAll
Call procedural hooks in all installed modules during installation.
Hooks called during install will remain procedural.
- hook_install()
- hook_module_preinstall()
- hook_module_preuninstall()
- hook_modules_installed()
- hook_modules_uninstalled()
- hook_post_update_NAME()
- hook_schema()
- hook_uninstall()
- hook_update_last_removed()
- hook_update_N()
Parameters
string $hook: The name of the hook to invoke.
array $args: Arguments to pass to the hook.
Return value
void
2 calls to ModuleInstaller::invokeAll()
- ModuleInstaller::install in core/
lib/ Drupal/ Core/ Extension/ ModuleInstaller.php - Installs a given list of modules.
- ModuleInstaller::uninstall in core/
lib/ Drupal/ Core/ Extension/ ModuleInstaller.php - Uninstalls a given list of modules.
File
-
core/
lib/ Drupal/ Core/ Extension/ ModuleInstaller.php, line 725
Class
- ModuleInstaller
- Default implementation of the module installer.
Namespace
Drupal\Core\ExtensionCode
protected function invokeAll($hook, $args = []) : void {
$this->moduleHandler
->loadAll();
foreach ($this->moduleHandler
->getModuleList() as $module => $extension) {
$this->moduleHandler
->invoke($module, $hook, $args);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.