06cca02afc00a1fbfd7217e126ed973bdefc4d93
[yaffs-website] / Theme / HighPriorityThemeNegotiator.php
1 <?php
2
3 namespace Drupal\theme_test\Theme;
4
5 use Drupal\Core\Routing\RouteMatchInterface;
6 use Drupal\Core\Theme\ThemeNegotiatorInterface;
7
8 /**
9  * Implements a test theme negotiator which was configured with a high priority.
10  */
11 class HighPriorityThemeNegotiator implements ThemeNegotiatorInterface {
12
13   /**
14    * {@inheritdoc}
15    */
16   public function applies(RouteMatchInterface $route_match) {
17     return ($route_match->getRouteName() == 'theme_test.priority');
18   }
19
20   /**
21    * {@inheritdoc}
22    */
23   public function determineActiveTheme(RouteMatchInterface $route_match) {
24     return 'classy';
25   }
26
27 }