function MaintenanceModeSubscriber::__construct
Same name in this branch
- main core/lib/Drupal/Core/EventSubscriber/MaintenanceModeSubscriber.php \Drupal\Core\EventSubscriber\MaintenanceModeSubscriber::__construct()
Same name and namespace in other branches
- 11.x core/modules/user/src/EventSubscriber/MaintenanceModeSubscriber.php \Drupal\user\EventSubscriber\MaintenanceModeSubscriber::__construct()
- 11.x core/lib/Drupal/Core/EventSubscriber/MaintenanceModeSubscriber.php \Drupal\Core\EventSubscriber\MaintenanceModeSubscriber::__construct()
- 10 core/modules/user/src/EventSubscriber/MaintenanceModeSubscriber.php \Drupal\user\EventSubscriber\MaintenanceModeSubscriber::__construct()
- 10 core/lib/Drupal/Core/EventSubscriber/MaintenanceModeSubscriber.php \Drupal\Core\EventSubscriber\MaintenanceModeSubscriber::__construct()
- 9 core/modules/user/src/EventSubscriber/MaintenanceModeSubscriber.php \Drupal\user\EventSubscriber\MaintenanceModeSubscriber::__construct()
- 9 core/lib/Drupal/Core/EventSubscriber/MaintenanceModeSubscriber.php \Drupal\Core\EventSubscriber\MaintenanceModeSubscriber::__construct()
- 8.9.x core/modules/user/src/EventSubscriber/MaintenanceModeSubscriber.php \Drupal\user\EventSubscriber\MaintenanceModeSubscriber::__construct()
- 8.9.x core/lib/Drupal/Core/EventSubscriber/MaintenanceModeSubscriber.php \Drupal\Core\EventSubscriber\MaintenanceModeSubscriber::__construct()
File
-
core/
modules/ user/ src/ EventSubscriber/ MaintenanceModeSubscriber.php, line 37
Class
- MaintenanceModeSubscriber
- Maintenance mode subscriber to log out users.
Namespace
Drupal\user\EventSubscriberCode
public function __construct(MaintenanceModeInterface $maintenance_mode, AccountInterface $account, #[AutowireServiceClosure(LogoutFinalizer::class)] ?\Closure $logoutFinalizer = NULL) {
$this->maintenanceMode = $maintenance_mode;
$this->account = $account;
if ($logoutFinalizer === NULL) {
@trigger_error('Calling ' . __METHOD__ . '() without the $logoutFinalizer argument is deprecated in drupal:11.5.0 and is removed from drupal:12.0.0. See https://www.drupal.org/node/3379194', E_USER_DEPRECATED);
$logoutFinalizer = fn() => \Drupal::service(LogoutFinalizer::class);
}
$this->logoutFinalizer = $logoutFinalizer;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.