diff -u b/core/lib/Drupal/Core/Theme/ThemeNegotiatorInterface.php b/core/lib/Drupal/Core/Theme/ThemeNegotiatorInterface.php --- b/core/lib/Drupal/Core/Theme/ThemeNegotiatorInterface.php +++ b/core/lib/Drupal/Core/Theme/ThemeNegotiatorInterface.php @@ -11,6 +11,12 @@ /** * Defines an interface for classes which determine the active theme. + * + * In order to set the active theme you have to create a new service tagged + * with 'theme_negotiator', see user.services.yml as example. The only method + * this service has to implement is determineActiveTheme. Return the name of the + * theme or NULL, if other negotiators like the configured default one should + * kick in instead. */ interface ThemeNegotiatorInterface { only in patch2: unchanged: --- /dev/null +++ b/core/modules/system/tests/modules/theme_test/lib/Drupal/theme_test/Theme/HighPriorityThemeNegotiator.php @@ -0,0 +1,28 @@ +attributes->get(RouteObjectInterface::ROUTE_NAME)) && $route_name == 'theme_test.priority') { + return 'stark'; + } + } + +}