public function ComponentsLoader::checkActiveTheme in Components! 8.2
Activates the proper namespaces if the active theme has changed.
@internal
Return value
string The name of the active theme.
Throws
1 call to ComponentsLoader::checkActiveTheme()
- ComponentsLoader::findTemplate in src/
Template/ Loader/ ComponentsLoader.php
File
- src/
Template/ Loader/ ComponentsLoader.php, line 84
Class
- ComponentsLoader
- Loads templates from the filesystem.
Namespace
Drupal\components\Template\LoaderCode
public function checkActiveTheme() {
$active_theme = $this->themeManager
->getActiveTheme();
// Update our namespaces if the active theme has changed.
if ($this->activeTheme !== $active_theme
->getName()) {
$this
->setActiveTheme($active_theme);
}
return $this->activeTheme;
}