function AdminNegotiator::__construct
Same name in other branches
- 9 core/modules/user/src/Theme/AdminNegotiator.php \Drupal\user\Theme\AdminNegotiator::__construct()
- 10 core/modules/user/src/Theme/AdminNegotiator.php \Drupal\user\Theme\AdminNegotiator::__construct()
- 11.x 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;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.