You are here

interface MaintenanceModeInterface in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Site/MaintenanceModeInterface.php \Drupal\Core\Site\MaintenanceModeInterface
  2. 9 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

3 files declare their use of MaintenanceModeInterface
JsonapiMaintenanceModeSubscriber.php in core/modules/jsonapi/src/EventSubscriber/JsonapiMaintenanceModeSubscriber.php
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);

  /**
   * Gets the site maintenance message.
   *
   * @return \Drupal\Component\Render\MarkupInterface
   *   The formatted site maintenance message.
   */
  public function getSiteMaintenanceMessage();

}

Members