Drupal 8  8.0.2
AdminNegotiator Class Reference
Inheritance diagram for AdminNegotiator:

Public Member Functions

 __construct (AccountInterface $user, ConfigFactoryInterface $config_factory, EntityManagerInterface $entity_manager, AdminContext $admin_context)
 
 applies (RouteMatchInterface $route_match)
 
 determineActiveTheme (RouteMatchInterface $route_match)
 

Protected Attributes

 $user
 
 $configFactory
 
 $entityManager
 
 $adminContext
 

Detailed Description

Sets the active theme on admin pages.

Constructor & Destructor Documentation

__construct ( AccountInterface  $user,
ConfigFactoryInterface  $config_factory,
EntityManagerInterface  $entity_manager,
AdminContext  $admin_context 
)

Creates a new AdminNegotiator instance.

Parameters
\Drupal\Core\Session\AccountInterface$userThe current user.
\Drupal\Core\Config\ConfigFactoryInterface$config_factoryThe config factory.
\Drupal\Core\Entity\EntityManagerInterface$entity_managerThe entity manager.
\Drupal\Core\Routing\AdminContext$admin_contextThe route admin context to determine whether the route is an admin one.

References Drupal\configFactory(), and Drupal\entityManager().

Here is the call graph for this function:

Member Function Documentation

applies ( RouteMatchInterface  $route_match)

{Whether this theme negotiator should be used to set the theme.

Parameters
\Drupal\Core\Routing\RouteMatchInterface$route_matchThe current route match object.
Returns
bool TRUE if this negotiator should be used or FALSE to let other negotiators decide.
}

Implements ThemeNegotiatorInterface.

References Drupal\entityManager(), and RouteMatchInterface\getRouteObject().

Here is the call graph for this function:

determineActiveTheme ( RouteMatchInterface  $route_match)

{Determine the active theme for the request.

Parameters
\Drupal\Core\Routing\RouteMatchInterface$route_matchThe current route match object.
Returns
string|null Returns the active theme name, else return NULL.
}

Implements ThemeNegotiatorInterface.

References Drupal\configFactory().

Here is the call graph for this function:


The documentation for this class was generated from the following file: