function MaintenanceModeSubscriber::__construct
Same name in this branch
- 10 core/lib/Drupal/Core/EventSubscriber/MaintenanceModeSubscriber.php \Drupal\Core\EventSubscriber\MaintenanceModeSubscriber::__construct()
Same name in other branches
- 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()
- 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()
Constructs a new MaintenanceModeSubscriber.
Parameters
\Drupal\Core\Site\MaintenanceModeInterface $maintenance_mode: The maintenance mode.
\Drupal\Core\Session\AccountInterface $account: The current user.
File
-
core/
modules/ user/ src/ EventSubscriber/ MaintenanceModeSubscriber.php, line 38
Class
- MaintenanceModeSubscriber
- Maintenance mode subscriber to log out users.
Namespace
Drupal\user\EventSubscriberCode
public function __construct(MaintenanceModeInterface $maintenance_mode, AccountInterface $account) {
$this->maintenanceMode = $maintenance_mode;
$this->account = $account;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.