HighPriorityThemeNegotiator.php in Drupal 9
File
core/modules/system/tests/modules/theme_test/src/Theme/HighPriorityThemeNegotiator.php
View source
<?php
namespace Drupal\theme_test\Theme;
use Drupal\Core\Routing\RouteMatchInterface;
use Drupal\Core\Theme\ThemeNegotiatorInterface;
class HighPriorityThemeNegotiator implements ThemeNegotiatorInterface {
public function applies(RouteMatchInterface $route_match) {
return $route_match
->getRouteName() == 'theme_test.priority';
}
public function determineActiveTheme(RouteMatchInterface $route_match) {
return 'classy';
}
}