protected ThemeManager::initTheme(RouteMatchInterface $route_match = NULL)
Initializes the active theme for a given route match.
\Drupal\Core\Routing\RouteMatchInterface $route_match: The current route match.
protected function initTheme(RouteMatchInterface $route_match = NULL) { // Determine the active theme for the theme negotiator service. This includes // the default theme as well as really specific ones like the ajax base theme. if (!$route_match) { $route_match = \Drupal::routeMatch(); } if ($route_match instanceof StackedRouteMatchInterface) { $route_match = $route_match->getMasterRouteMatch(); } $theme = $this->themeNegotiator->determineActiveTheme($route_match); $this->activeTheme = $this->themeInitialization->initTheme($theme); }
© 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::initTheme/8.1.x