public function ThemeManager::getActiveTheme

public ThemeManager::getActiveTheme(RouteMatchInterface $route_match = NULL)

Returns the active theme object.

Return value

\Drupal\Core\Theme\ActiveTheme

Overrides ThemeManagerInterface::getActiveTheme

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;
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Theme!ThemeManager.php/function/ThemeManager::getActiveTheme/8.1.x