ThemeNegotiator.php in Style Switcher 8.2
Same filename and directory in other branches
File
tests/modules/styleswitcher_test_theme_per_page/src/Theme/ThemeNegotiator.phpView source
<?php
namespace Drupal\styleswitcher_test_theme_per_page\Theme;
use Drupal\Core\Routing\RouteMatchInterface;
use Drupal\Core\Theme\ThemeNegotiatorInterface;
/**
* Defines a theme negotiator that deals with the active theme on the demo page.
*/
class ThemeNegotiator implements ThemeNegotiatorInterface {
/**
* {@inheritdoc}
*/
public function applies(RouteMatchInterface $route_match) {
return $route_match
->getRouteName() === 'styleswitcher_test_theme_per_page.demo';
}
/**
* {@inheritdoc}
*/
public function determineActiveTheme(RouteMatchInterface $route_match) {
return $route_match
->getParameter('theme');
}
}
Classes
Name![]() |
Description |
---|---|
ThemeNegotiator | Defines a theme negotiator that deals with the active theme on the demo page. |