public function AdminNegotiator::applies in Drupal 8
Same name and namespace in other branches
- 9 core/modules/user/src/Theme/AdminNegotiator.php \Drupal\user\Theme\AdminNegotiator::applies()
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 74
Class
- AdminNegotiator
- Sets the active theme on admin pages.
Namespace
Drupal\user\ThemeCode
public function applies(RouteMatchInterface $route_match) {
return $this->entityTypeManager
->hasHandler('user_role', 'storage') && $this->user
->hasPermission('view the administration theme') && $this->adminContext
->isAdminRoute($route_match
->getRouteObject());
}