class AdminContext (View source)

Provides a helper class to determine whether the route is an admin one.

Properties

protected RouteMatchInterface $routeMatch

The route match.

Methods

__construct(RouteMatchInterface $route_match)

Construct a new admin context helper instance.

bool
isAdminRoute(Route $route = NULL)

Determines whether the active route is an admin one.

Details

__construct(RouteMatchInterface $route_match)

Construct a new admin context helper instance.

Parameters

RouteMatchInterface $route_match

The route match.

bool isAdminRoute(Route $route = NULL)

Determines whether the active route is an admin one.

Parameters

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.

Return Value

bool

Returns TRUE if the route is an admin one, otherwise FALSE.