function MaintenanceModeSubscriber::__construct

Same name in this branch
  1. 11.x core/modules/user/src/EventSubscriber/MaintenanceModeSubscriber.php \Drupal\user\EventSubscriber\MaintenanceModeSubscriber::__construct()
Same name and namespace in other branches
  1. 10 core/modules/user/src/EventSubscriber/MaintenanceModeSubscriber.php \Drupal\user\EventSubscriber\MaintenanceModeSubscriber::__construct()
  2. 10 core/lib/Drupal/Core/EventSubscriber/MaintenanceModeSubscriber.php \Drupal\Core\EventSubscriber\MaintenanceModeSubscriber::__construct()
  3. 9 core/modules/user/src/EventSubscriber/MaintenanceModeSubscriber.php \Drupal\user\EventSubscriber\MaintenanceModeSubscriber::__construct()
  4. 9 core/lib/Drupal/Core/EventSubscriber/MaintenanceModeSubscriber.php \Drupal\Core\EventSubscriber\MaintenanceModeSubscriber::__construct()
  5. 8.9.x core/modules/user/src/EventSubscriber/MaintenanceModeSubscriber.php \Drupal\user\EventSubscriber\MaintenanceModeSubscriber::__construct()
  6. 8.9.x core/lib/Drupal/Core/EventSubscriber/MaintenanceModeSubscriber.php \Drupal\Core\EventSubscriber\MaintenanceModeSubscriber::__construct()

File

core/lib/Drupal/Core/EventSubscriber/MaintenanceModeSubscriber.php, line 32

Class

MaintenanceModeSubscriber
Maintenance mode subscriber for controller requests.

Namespace

Drupal\Core\EventSubscriber

Code

public function __construct(protected readonly MaintenanceModeInterface $maintenanceMode, protected readonly ConfigFactoryInterface $configFactory, TranslationInterface $translation, protected readonly UrlGeneratorInterface $urlGenerator, protected readonly AccountInterface $account, protected readonly BareHtmlPageRendererInterface $bareHtmlPageRenderer, protected readonly MessengerInterface $messenger, protected readonly EventDispatcherInterface $eventDispatcher, protected readonly StateInterface $state, #[AutowireServiceClosure('logger.channel.default')] private readonly \Closure $logger) {
  $this->stringTranslation = $translation;
}

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