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