HighPriorityThemeNegotiator.php

Same filename and directory in other branches
  1. 9 core/modules/system/tests/modules/theme_test/src/Theme/HighPriorityThemeNegotiator.php
  2. 8.9.x core/modules/system/tests/modules/theme_test/src/Theme/HighPriorityThemeNegotiator.php
  3. 10 core/modules/system/tests/modules/theme_test/src/Theme/HighPriorityThemeNegotiator.php

Namespace

Drupal\theme_test\Theme

File

core/modules/system/tests/modules/theme_test/src/Theme/HighPriorityThemeNegotiator.php

View source
<?php

declare (strict_types=1);
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 'starterkit_theme';
  }

}

Classes

Title Deprecated Summary
HighPriorityThemeNegotiator Implements a test theme negotiator which was configured with a high priority.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.