W3cubDocs

/Drupal 8

protected function ModuleInstaller::updateKernel

protected ModuleInstaller::updateKernel($module_filenames)

Updates the kernel module list.

Parameters

string $module_filenames: The list of installed modules.

File

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

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');
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Extension!ModuleInstaller.php/function/ModuleInstaller::updateKernel/8.1.x