function ActiveTheme::getBaseThemes
Returns an array of base theme active theme objects keyed by name.
The order starts with the base theme of $this and ends with the root of the dependency chain.
Return value
static[]
Deprecated
in drupal:8.7.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Theme\ActiveTheme::getBaseThemeExtensions() instead.
See also
https://www.drupal.org/node/3019948
File
-
core/
lib/ Drupal/ Core/ Theme/ ActiveTheme.php, line 242
Class
- ActiveTheme
- Defines a theme and its information needed at runtime.
Namespace
Drupal\Core\ThemeCode
public function getBaseThemes() {
@trigger_error('\\Drupal\\Core\\Theme\\ActiveTheme::getBaseThemes() is deprecated in Drupal 8.7.0 and will be removed before Drupal 9.0.0. Use \\Drupal\\Core\\Theme\\ActiveTheme::getBaseThemeExtensions() instead. See https://www.drupal.org/node/3019948', E_USER_DEPRECATED);
/** @var \Drupal\Core\Theme\ThemeInitialization $theme_initialisation */
$theme_initialisation = \Drupal::service('theme.initialization');
$base_themes = array_combine(array_keys($this->baseThemeExtensions), array_keys($this->baseThemeExtensions));
return array_map([
$theme_initialisation,
'getActiveThemeByName',
], $base_themes);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.