You are here

HighPriorityThemeNegotiator.php in Drupal 10

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;

/**
 * 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';
  }

}

Classes

Namesort descending Description
HighPriorityThemeNegotiator Implements a test theme negotiator which was configured with a high priority.