function AdminNegotiator::applies
Same name in other branches
- 9 core/modules/user/src/Theme/AdminNegotiator.php \Drupal\user\Theme\AdminNegotiator::applies()
- 8.9.x 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()
File
-
core/
modules/ user/ src/ Theme/ AdminNegotiator.php, line 67
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.