public AdminNegotiator::applies(RouteMatchInterface $route_match)
Whether this theme negotiator should be used to set the theme.
Parameters
\Drupal\Core\Routing\RouteMatchInterface $route_match: The current route match object.
Return value
bool TRUE if this negotiator should be used or FALSE to let other negotiators decide.
Overrides ThemeNegotiatorInterface::applies
File
- core/modules/user/src/Theme/AdminNegotiator.php, line 67
Class
- AdminNegotiator
- Sets the active theme on admin pages.
Namespace
Drupal\user\Theme
Code
1 2 3 | public function applies(RouteMatchInterface $route_match ) { return ( $this ->entityManager->hasHandler( 'user_role' , 'storage' ) && $this ->user->hasPermission( 'view the administration theme' ) && $this ->adminContext->isAdminRoute( $route_match ->getRouteObject())); } |
Please login to continue.