You are here

public function ThemeManager::getActiveTheme in Drupal 8

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Theme/ThemeManager.php \Drupal\Core\Theme\ThemeManager::getActiveTheme()
  2. 10 core/lib/Drupal/Core/Theme/ThemeManager.php \Drupal\Core\Theme\ThemeManager::getActiveTheme()

Returns the active theme object.

Return value

\Drupal\Core\Theme\ActiveTheme

Overrides ThemeManagerInterface::getActiveTheme

2 calls to ThemeManager::getActiveTheme()
ThemeManager::alter in core/lib/Drupal/Core/Theme/ThemeManager.php
Passes alterable variables to specific $theme_TYPE_alter() implementations.
ThemeManager::render in core/lib/Drupal/Core/Theme/ThemeManager.php
Generates themed output.

File

core/lib/Drupal/Core/Theme/ThemeManager.php, line 94

Class

ThemeManager
Provides the default implementation of a theme manager.

Namespace

Drupal\Core\Theme

Code

public function getActiveTheme(RouteMatchInterface $route_match = NULL) {
  if (!isset($this->activeTheme)) {
    $this
      ->initTheme($route_match);
  }
  return $this->activeTheme;
}