Drupal 8  8.0.2
MaintenanceMode Class Reference
Inheritance diagram for MaintenanceMode:

Public Member Functions

 __construct (StateInterface $state)
 
 applies (RouteMatchInterface $route_match)
 
 exempt (AccountInterface $account)
 

Protected Attributes

 $state
 

Detailed Description

Provides the default implementation of the maintenance mode service.

Constructor & Destructor Documentation

__construct ( StateInterface  $state)

Constructs a new maintenance mode service.

Parameters
\Drupal\Core\State\StateInterface$stateThe state.

References Drupal\state().

Here is the call graph for this function:

Member Function Documentation

applies ( RouteMatchInterface  $route_match)

{Returns whether the site is in maintenance mode.

Parameters
\Drupal\Core\Routing\RouteMatchInterface$route_matchThe current route match.
Returns
bool TRUE if the site is in maintenance mode.
}

Implements MaintenanceModeInterface.

References RouteMatchInterface\getRouteObject(), and Drupal\state().

Here is the call graph for this function:

exempt ( AccountInterface  $account)

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

Parameters
\Drupal\Core\Session\AccountInterface$accountThe logged in user.
Returns
bool TRUE if the user should be exempted from maintenance mode.
}

Implements MaintenanceModeInterface.

References AccountInterface\hasPermission().

Here is the call graph for this function:


The documentation for this class was generated from the following file: