You are here

public function ThemeSwitcherNegotiator::__construct in Theme Switcher Rules 8

ThemeSwitcherNegotiator constructor.

Parameters

\Drupal\Core\Routing\AdminContext $admin_context: The route admin context service.

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.

\Drupal\Core\Plugin\Context\ContextHandlerInterface $context_handler: The ContextHandler for applying contexts to conditions properly.

\Drupal\Core\Plugin\Context\ContextRepositoryInterface $context_repository: The lazy context repository service.

File

src/Theme/ThemeSwitcherNegotiator.php, line 70

Class

ThemeSwitcherNegotiator
Negotiate the current theme based on theme_switcher_rules rules.

Namespace

Drupal\theme_switcher\Theme

Code

public function __construct(AdminContext $admin_context, EntityTypeManagerInterface $entity_type_manager, ContextHandlerInterface $context_handler, ContextRepositoryInterface $context_repository) {
  $this->adminContext = $admin_context;
  $this->entityTypeManager = $entity_type_manager;
  $this->contextHandler = $context_handler;
  $this->contextRepository = $context_repository;
}