function ModuleInstaller::invokeAll

Call procedural hooks in all installed modules during installation.

Hooks called during install will remain procedural.

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
ModuleInstaller::uninstall in core/lib/Drupal/Core/Extension/ModuleInstaller.php

File

core/lib/Drupal/Core/Extension/ModuleInstaller.php, line 725

Class

ModuleInstaller
Default implementation of the module installer.

Namespace

Drupal\Core\Extension

Code

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.