function ThemeInitialization::loadActiveTheme
Same name and namespace in other branches
- 11.x core/lib/Drupal/Core/Theme/ThemeInitialization.php \Drupal\Core\Theme\ThemeInitialization::loadActiveTheme()
- 10 core/lib/Drupal/Core/Theme/ThemeInitialization.php \Drupal\Core\Theme\ThemeInitialization::loadActiveTheme()
- 9 core/lib/Drupal/Core/Theme/ThemeInitialization.php \Drupal\Core\Theme\ThemeInitialization::loadActiveTheme()
- 8.9.x core/lib/Drupal/Core/Theme/ThemeInitialization.php \Drupal\Core\Theme\ThemeInitialization::loadActiveTheme()
Loads a theme, so it is ready to be used.
Loading a theme includes loading and initializing the engine, each base theme and its engines.
Parameters
\Drupal\Core\Theme\ActiveTheme $active_theme: The theme to load.
Overrides ThemeInitializationInterface::loadActiveTheme
1 call to ThemeInitialization::loadActiveTheme()
- ThemeInitialization::initTheme in core/
lib/ Drupal/ Core/ Theme/ ThemeInitialization.php
File
-
core/
lib/ Drupal/ Core/ Theme/ ThemeInitialization.php, line 143
Class
- ThemeInitialization
- Provides the theme initialization logic.
Namespace
Drupal\Core\ThemeCode
public function loadActiveTheme(ActiveTheme $active_theme) {
// Initialize the theme.
foreach (array_reverse($active_theme->getBaseThemeExtensions()) as $base) {
$base->load();
}
$active_theme->getExtension()
->load();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.