Version 1
[yaffs-website] / web / core / modules / system / tests / modules / theme_test / src / Theme / HighPriorityThemeNegotiator.php
diff --git a/web/core/modules/system/tests/modules/theme_test/src/Theme/HighPriorityThemeNegotiator.php b/web/core/modules/system/tests/modules/theme_test/src/Theme/HighPriorityThemeNegotiator.php
new file mode 100644 (file)
index 0000000..06cca02
--- /dev/null
@@ -0,0 +1,27 @@
+<?php
+
+namespace Drupal\theme_test\Theme;
+
+use Drupal\Core\Routing\RouteMatchInterface;
+use Drupal\Core\Theme\ThemeNegotiatorInterface;
+
+/**
+ * Implements a test theme negotiator which was configured with a high priority.
+ */
+class HighPriorityThemeNegotiator implements ThemeNegotiatorInterface {
+
+  /**
+   * {@inheritdoc}
+   */
+  public function applies(RouteMatchInterface $route_match) {
+    return ($route_match->getRouteName() == 'theme_test.priority');
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function determineActiveTheme(RouteMatchInterface $route_match) {
+    return 'classy';
+  }
+
+}