class MaintenanceModeSubscriber implements EventSubscriberInterface (View source)

Maintenance mode subscriber to log out users.

Properties

protected MaintenanceMode $maintenanceMode

The maintenance mode.

protected AccountInterface $account

The current account.

Methods

__construct(MaintenanceModeInterface $maintenance_mode, AccountInterface $account)

Constructs a new MaintenanceModeSubscriber.

onKernelRequestMaintenance(RequestEvent $event)

Logout users if site is in maintenance mode.

static 
getSubscribedEvents()

{@inheritdoc}

Details

__construct(MaintenanceModeInterface $maintenance_mode, AccountInterface $account)

Constructs a new MaintenanceModeSubscriber.

Parameters

MaintenanceModeInterface $maintenance_mode

The maintenance mode.

AccountInterface $account

The current user.

onKernelRequestMaintenance(RequestEvent $event)

Logout users if site is in maintenance mode.

Parameters

RequestEvent $event

The event to process.

static getSubscribedEvents()

{@inheritdoc}