You are here

protected function ModuleInstaller::updateKernel in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Extension/ModuleInstaller.php \Drupal\Core\Extension\ModuleInstaller::updateKernel()

Updates the kernel module list.

Parameters

string $module_filenames: The list of installed modules.

2 calls to ModuleInstaller::updateKernel()
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 520
Contains \Drupal\Core\Extension\ModuleInstaller.

Class

ModuleInstaller
Default implementation of the module installer.

Namespace

Drupal\Core\Extension

Code

protected function updateKernel($module_filenames) {

  // This reboots the kernel to register the module's bundle and its services
  // in the service container. The $module_filenames argument is taken over as
  // %container.modules% parameter, which is passed to a fresh ModuleHandler
  // instance upon first retrieval.
  $this->kernel
    ->updateModules($module_filenames, $module_filenames);

  // After rebuilding the container we need to update the injected
  // dependencies.
  $container = $this->kernel
    ->getContainer();
  $this->moduleHandler = $container
    ->get('module_handler');
}