function InstallerKernel::updateThemes
Same name and namespace in other branches
- 11.x core/lib/Drupal/Core/Installer/InstallerKernel.php \Drupal\Core\Installer\InstallerKernel::updateThemes()
Overrides DrupalKernel::updateThemes
File
-
core/
lib/ Drupal/ Core/ Installer/ InstallerKernel.php, line 159
Class
- InstallerKernel
- Extend DrupalKernel to handle force some kernel behaviors.
Namespace
Drupal\Core\InstallerCode
public function updateThemes(array $register_themes = []) : void {
if (static::installationAttempted()) {
// Installing a profile or a recipe replaces the theme list with the
// themes that were just installed, which do not include the install
// theme. Theme hook implementations are collected from the
// container.themes parameter, so dropping the install theme from the
// list removes its hooks while it is still rendering the remaining
// installer pages. Keep it registered until the installation is done.
// @see \Drupal\Core\Hook\ThemeHookCollectorPass
// @see _drupal_maintenance_theme()
foreach ($this->getInstallThemes($this->installGetProfile()) as $theme) {
if (isset($register_themes[$theme])) {
continue;
}
$extension = $this->themeExtensions($theme);
if ($extension) {
$register_themes[$theme] = $extension;
}
}
}
parent::updateThemes($register_themes);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.