Drupal 8  8.0.2
MaintenanceModeSubscriber Class Reference
Inheritance diagram for MaintenanceModeSubscriber:

Public Member Functions

 __construct (MaintenanceModeInterface $maintenance_mode, ConfigFactoryInterface $config_factory, TranslationInterface $translation, UrlGeneratorInterface $url_generator, AccountInterface $account, BareHtmlPageRendererInterface $bare_html_page_renderer)
 
 onKernelRequestMaintenance (GetResponseEvent $event)
 

Static Public Member Functions

static getSubscribedEvents ()
 

Protected Member Functions

 drupalSetMessage ($message=NULL, $type= 'status', $repeat=FALSE)
 

Protected Attributes

 $maintenanceMode
 
 $account
 
 $config
 
 $urlGenerator
 
 $bareHtmlPageRenderer
 

Detailed Description

Maintenance mode subscriber for controller requests.

Constructor & Destructor Documentation

__construct ( MaintenanceModeInterface  $maintenance_mode,
ConfigFactoryInterface  $config_factory,
TranslationInterface  $translation,
UrlGeneratorInterface  $url_generator,
AccountInterface  $account,
BareHtmlPageRendererInterface  $bare_html_page_renderer 
)

Constructs a new MaintenanceModeSubscriber.

Parameters
\Drupal\Core\Site\MaintenanceModeInterface$maintenance_modeThe maintenance mode.
\Drupal\Core\Config\ConfigFactoryInterface$config_factoryThe config factory.
\Drupal\Core\StringTranslation\TranslationInterface$translationThe string translation.
\Drupal\Core\Routing\UrlGeneratorInterface$url_generatorThe url generator.
\Drupal\Core\Session\AccountInterface$accountThe current user.
\Drupal\Core\Render\BareHtmlPageRendererInterface$bare_html_page_rendererThe bare HTML page renderer.

References Drupal\config(), and Drupal\urlGenerator().

Here is the call graph for this function:

Member Function Documentation

drupalSetMessage (   $message = NULL,
  $type = 'status',
  $repeat = FALSE 
)
protected

Wraps the drupal_set_message function.

Referenced by MaintenanceModeSubscriber\onKernelRequestMaintenance().

Here is the caller graph for this function:

static getSubscribedEvents ( )
static

{}

onKernelRequestMaintenance ( GetResponseEvent  $event)

Returns the site maintenance page if the site is offline.

Parameters
\Symfony\Component\HttpKernel\Event\GetResponseEvent$eventThe event to process.

References Drupal\config(), RouteMatch\createFromRequest(), MaintenanceModeSubscriber\drupalSetMessage(), Xss\filterAdmin(), SafeMarkup\format(), Drupal\service(), t(), and Drupal\urlGenerator().

Here is the call graph for this function:


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