class JsonapiMaintenanceModeSubscriber implements EventSubscriberInterface (View source)

internal  JSON:API maintains no PHP API. The API is the HTTP API. This class may change at any time and could break any dependencies on it.
 

Maintenance mode subscriber for JSON:API requests.

Properties

protected MaintenanceMode $maintenanceMode

The maintenance mode.

protected ConfigFactoryInterface $config

The configuration factory.

Methods

__construct(MaintenanceModeInterface $maintenance_mode, ConfigFactoryInterface $config_factory)

Constructs a new JsonapiMaintenanceModeSubscriber.

static 
getSubscribedEvents()

{@inheritdoc}

onMaintenanceModeRequest(RequestEvent $event)

Returns response when site is in maintenance mode and user is not exempt.

Details

__construct(MaintenanceModeInterface $maintenance_mode, ConfigFactoryInterface $config_factory)

Constructs a new JsonapiMaintenanceModeSubscriber.

Parameters

MaintenanceModeInterface $maintenance_mode

The maintenance mode.

ConfigFactoryInterface $config_factory

The config factory.

static getSubscribedEvents()

{@inheritdoc}

onMaintenanceModeRequest(RequestEvent $event)

Returns response when site is in maintenance mode and user is not exempt.

Parameters

RequestEvent $event

The event to process.