public AdminContext::isAdminRoute(Route $route = NULL)
Determines whether the active route is an admin one.
\Symfony\Component\Routing\Route $route: (optional) The route to determine whether it is an admin one. Per default this falls back to the route object on the active request.
bool Returns TRUE if the route is an admin one, otherwise FALSE.
public function isAdminRoute(Route $route = NULL) { if (!$route) { $route = $this->routeMatch->getRouteObject(); if (!$route) { return FALSE; } } return (bool) $route->getOption('_admin_route'); }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Routing!AdminContext.php/function/AdminContext::isAdminRoute/8.1.x