function JsonapiMaintenanceModeSubscriber::__construct

Same name in other branches
  1. 10 core/modules/jsonapi/src/EventSubscriber/JsonapiMaintenanceModeSubscriber.php \Drupal\jsonapi\EventSubscriber\JsonapiMaintenanceModeSubscriber::__construct()
  2. 11.x core/modules/jsonapi/src/EventSubscriber/JsonapiMaintenanceModeSubscriber.php \Drupal\jsonapi\EventSubscriber\JsonapiMaintenanceModeSubscriber::__construct()

Constructs a new JsonapiMaintenanceModeSubscriber.

Parameters

\Drupal\Core\Site\MaintenanceModeInterface $maintenance_mode: The maintenance mode.

\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The config factory.

File

core/modules/jsonapi/src/EventSubscriber/JsonapiMaintenanceModeSubscriber.php, line 47

Class

JsonapiMaintenanceModeSubscriber
Maintenance mode subscriber for JSON:API requests.

Namespace

Drupal\jsonapi\EventSubscriber

Code

public function __construct(MaintenanceModeInterface $maintenance_mode, ConfigFactoryInterface $config_factory) {
    $this->maintenanceMode = $maintenance_mode;
    $this->config = $config_factory;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.