interface MaintenanceModeInterface (View source)

Defines the interface for the maintenance mode service.

Methods

bool
applies(RouteMatchInterface $route_match)

Returns whether the site is in maintenance mode.

bool
exempt(AccountInterface $account)

Determines whether a user has access to the site in maintenance mode.

Details

bool applies(RouteMatchInterface $route_match)

Returns whether the site is in maintenance mode.

Parameters

RouteMatchInterface $route_match

The current route match.

Return Value

bool

TRUE if the site is in maintenance mode.

bool exempt(AccountInterface $account)

Determines whether a user has access to the site in maintenance mode.

Parameters

AccountInterface $account

The logged in user.

Return Value

bool

TRUE if the user should be exempted from maintenance mode.