You are here

public function PageThemeNegotiator::__construct in Switch Page Theme 8.3

Same name and namespace in other branches
  1. 8 src/Theme/PageThemeNegotiator.php \Drupal\switch_page_theme\Theme\PageThemeNegotiator::__construct()
  2. 8.2 src/Theme/PageThemeNegotiator.php \Drupal\switch_page_theme\Theme\PageThemeNegotiator::__construct()

File

src/Theme/PageThemeNegotiator.php, line 88

Class

PageThemeNegotiator
Sets the selected theme on specified pages.

Namespace

Drupal\switch_page_theme\Theme

Code

public function __construct(ConfigFactoryInterface $config_factory, CurrentPathStack $currentPath, AliasManagerInterface $pathAlias, PathMatcherInterface $pathMatcher, AccountProxyInterface $account, ModuleHandlerInterface $module_handler, RequestStack $request, DomainNegotiatorInterface $negotiator = NULL, LanguageManagerInterface $language_manager = NULL) {
  $this->configFactory = $config_factory;
  $this->currentPath = $currentPath;
  $this->pathAlias = $pathAlias;
  $this->pathMatcher = $pathMatcher;
  $this->account = $account;
  $this->moduleHandler = $module_handler;
  $this->request = $request;
  if ($negotiator) {
    $this->negotiator = $negotiator;
  }
  if ($language_manager) {
    $this->languageManager = $language_manager;
  }
}