requestStack = $request_stack; } /** * {@inheritdoc} */ public function applies(RouteMatchInterface $route_match) { return $route_match->getRouteName() == '{{ machine_name }}.example'; } /** * {@inheritdoc} */ public function determineActiveTheme(RouteMatchInterface $route_match) { // Allow users to pass theme name through 'theme' query parameter. $theme = $this->requestStack->getCurrentRequest()->query->get('theme'); if (is_string($theme)) { return $theme; } } }