You are here

interface MaintenanceModeInterface in Drupal 9

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Site/MaintenanceModeInterface.php \Drupal\Core\Site\MaintenanceModeInterface

Defines the interface for the maintenance mode service.

Hierarchy

Expanded class hierarchy of MaintenanceModeInterface

All classes that implement MaintenanceModeInterface

2 files declare their use of MaintenanceModeInterface
MaintenanceModeSubscriber.php in core/lib/Drupal/Core/EventSubscriber/MaintenanceModeSubscriber.php
MaintenanceModeSubscriber.php in core/modules/user/src/EventSubscriber/MaintenanceModeSubscriber.php

File

core/lib/Drupal/Core/Site/MaintenanceModeInterface.php, line 11

Namespace

Drupal\Core\Site
View source
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);

}

Members

Namesort descending Modifiers Type Description Overrides
MaintenanceModeInterface::applies public function Returns whether the site is in maintenance mode. 1
MaintenanceModeInterface::exempt public function Determines whether a user has access to the site in maintenance mode. 1