themeAccess = $theme_access; $this->negotiators = $negotiators; $this->classResolver = $class_resolver; } /** * {@inheritdoc} */ public function applies(RouteMatchInterface $route_match) { return TRUE; } /** * {@inheritdoc} */ public function determineActiveTheme(RouteMatchInterface $route_match) { foreach ($this->negotiators as $negotiator_id) { $negotiator = $this->classResolver->getInstanceFromDefinition($negotiator_id); if ($negotiator->applies($route_match)) { $theme = $negotiator->determineActiveTheme($route_match); if ($theme !== NULL && $this->themeAccess->checkAccess($theme)) { return $theme; } } } } }