function InstallerServiceProvider::alter
Same name in other branches
- 9 core/lib/Drupal/Core/Installer/InstallerServiceProvider.php \Drupal\Core\Installer\InstallerServiceProvider::alter()
- 8.9.x core/lib/Drupal/Core/Installer/InstallerServiceProvider.php \Drupal\Core\Installer\InstallerServiceProvider::alter()
- 10 core/lib/Drupal/Core/Installer/InstallerServiceProvider.php \Drupal\Core\Installer\InstallerServiceProvider::alter()
Overrides ServiceModifierInterface::alter
File
-
core/
lib/ Drupal/ Core/ Installer/ InstallerServiceProvider.php, line 57
Class
- InstallerServiceProvider
- Service provider for the early installer environment.
Namespace
Drupal\Core\InstallerCode
public function alter(ContainerBuilder $container) {
// Disable Twig cache (php storage does not exist yet).
$twig_config = $container->getParameter('twig.config');
$twig_config['cache'] = FALSE;
$container->setParameter('twig.config', $twig_config);
// No service may persist when the early installer kernel is rebooted into
// the production environment.
// @todo The DrupalKernel reboot performed by drupal_install_system() is
// actually not a "regular" reboot (like ModuleInstaller::install()), so
// services are not actually persisted.
foreach ($container->findTaggedServiceIds('persist') as $id => $tags) {
$definition = $container->getDefinition($id);
$definition->clearTag('persist');
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.