3 namespace Drupal\theme_test\Theme;
5 use Drupal\Core\Routing\RouteMatchInterface;
6 use Drupal\Core\Theme\ThemeNegotiatorInterface;
9 * Just forces the 'test_theme' theme.
11 class CustomThemeNegotiator implements ThemeNegotiatorInterface {
16 public function applies(RouteMatchInterface $route_match) {
17 $route = $route_match->getRouteObject();
18 return ($route && $route->hasOption('_custom_theme'));
24 public function determineActiveTheme(RouteMatchInterface $route_match) {
25 return $route_match->getRouteObject()->getOption('_custom_theme');