You are here

public function RoleThemeSwitcherNegotiator::__construct in Role Theme Switcher 8

Creates a new RoleThemeSwitcherNegotiator instance.

Parameters

\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The config factory.

\Drupal\Core\Session\AccountInterface $current_user: The current user.

\Drupal\Core\Routing\AdminContext $admin_context: The route admin context to determine whether the route is an admin one.

File

src/Theme/RoleThemeSwitcherNegotiator.php, line 54

Class

RoleThemeSwitcherNegotiator
Class RoleThemeSwitcherNegotiator.

Namespace

Drupal\role_theme_switcher\Theme

Code

public function __construct(ConfigFactoryInterface $config_factory, AccountInterface $current_user, AdminContext $admin_context) {
  $this->configFactory = $config_factory;
  $this->currentUser = $current_user;
  $this->adminContext = $admin_context;
}