public function ThemeNegotiator::determineActiveTheme in Style Switcher 8.2
Same name and namespace in other branches
- 3.0.x tests/modules/styleswitcher_test_theme_per_page/src/Theme/ThemeNegotiator.php \Drupal\styleswitcher_test_theme_per_page\Theme\ThemeNegotiator::determineActiveTheme()
Determine the active theme for the request.
Parameters
\Drupal\Core\Routing\RouteMatchInterface $route_match: The current route match object.
Return value
string|null The name of the theme, or NULL if other negotiators, like the configured default one, should be used instead.
Overrides ThemeNegotiatorInterface::determineActiveTheme
File
- tests/
modules/ styleswitcher_test_theme_per_page/ src/ Theme/ ThemeNegotiator.php, line 23
Class
- ThemeNegotiator
- Defines a theme negotiator that deals with the active theme on the demo page.
Namespace
Drupal\styleswitcher_test_theme_per_page\ThemeCode
public function determineActiveTheme(RouteMatchInterface $route_match) {
return $route_match
->getParameter('theme');
}