Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. MaintenanceModeInterface.php

interface MaintenanceModeInterface

Defines the interface for the maintenance mode service.

Hierarchy

  • interface \Drupal\Core\Site\MaintenanceModeInterface

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

Title Sort descending Modifiers Object type Summary 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
MaintenanceModeInterface::getSiteMaintenanceMessage public function Gets the site maintenance message. 1

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal