Mercurial > hg > cmmr2012-drupal-site
diff core/lib/Drupal/Core/Site/MaintenanceModeInterface.php @ 0:c75dbcec494b
Initial commit from drush-created site
author | Chris Cannam |
---|---|
date | Thu, 05 Jul 2018 14:24:15 +0000 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/lib/Drupal/Core/Site/MaintenanceModeInterface.php Thu Jul 05 14:24:15 2018 +0000 @@ -0,0 +1,35 @@ +<?php + +namespace Drupal\Core\Site; + +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Session\AccountInterface; + +/** + * Defines the interface for the maintenance mode service. + */ +interface MaintenanceModeInterface { + + /** + * Returns whether the site is in maintenance mode. + * + * @param \Drupal\Core\Routing\RouteMatchInterface $route_match + * The current route match. + * + * @return bool + * TRUE if the site is in maintenance mode. + */ + public function applies(RouteMatchInterface $route_match); + + /** + * Determines whether a user has access to the site in maintenance mode. + * + * @param \Drupal\Core\Session\AccountInterface $account + * The logged in user. + * + * @return bool + * TRUE if the user should be exempted from maintenance mode. + */ + public function exempt(AccountInterface $account); + +}