function TwigExtension::getActiveTheme
Same name in other branches
- 9 core/lib/Drupal/Core/Template/TwigExtension.php \Drupal\Core\Template\TwigExtension::getActiveTheme()
- 8.9.x core/lib/Drupal/Core/Template/TwigExtension.php \Drupal\Core\Template\TwigExtension::getActiveTheme()
- 10 core/lib/Drupal/Core/Template/TwigExtension.php \Drupal\Core\Template\TwigExtension::getActiveTheme()
Gets the name of the active theme.
Return value
string The name of the active theme.
File
-
core/
lib/ Drupal/ Core/ Template/ TwigExtension.php, line 299
Class
- TwigExtension
- A class providing Drupal Twig extensions.
Namespace
Drupal\Core\TemplateCode
public function getActiveTheme() {
return $this->themeManager
->getActiveTheme()
->getName();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.