function ThemeManager::getThemeChain
Gets theme and base themes in reverse order.
Parameters
\Drupal\Core\Theme\ActiveTheme $active_theme: A manually specified theme.
Return value
list<string> The list of theme keys with the active theme last.
File
-
core/
lib/ Drupal/ Core/ Theme/ ThemeManager.php, line 609
Class
- ThemeManager
- Provides the default implementation of a theme manager.
Namespace
Drupal\Core\ThemeCode
protected function getThemeChain(ActiveTheme $active_theme) : array {
$theme_keys = array_reverse(array_keys($active_theme->getBaseThemeExtensions()));
$theme_keys[] = $active_theme->getName();
return $theme_keys;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.