public function AdminNegotiator::__construct in Drupal 8
Same name and namespace in other branches
- 9 core/modules/user/src/Theme/AdminNegotiator.php \Drupal\user\Theme\AdminNegotiator::__construct()
Creates a new AdminNegotiator instance.
Parameters
\Drupal\Core\Session\AccountInterface $user: The current user.
\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The config factory.
\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.
\Drupal\Core\Routing\AdminContext $admin_context: The route admin context to determine whether the route is an admin one.
File
- core/
modules/ user/ src/ Theme/ AdminNegotiator.php, line 64
Class
- AdminNegotiator
- Sets the active theme on admin pages.
Namespace
Drupal\user\ThemeCode
public function __construct(AccountInterface $user, ConfigFactoryInterface $config_factory, EntityTypeManagerInterface $entity_type_manager, AdminContext $admin_context) {
$this->user = $user;
$this->configFactory = $config_factory;
$this->entityTypeManager = $entity_type_manager;
$this->adminContext = $admin_context;
}