public function MaintenanceModeSubscriber::__construct in Drupal 10
Same name in this branch
- 10 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()
Same name and namespace in other branches
- 8 core/modules/user/src/EventSubscriber/MaintenanceModeSubscriber.php \Drupal\user\EventSubscriber\MaintenanceModeSubscriber::__construct()
- 9 core/modules/user/src/EventSubscriber/MaintenanceModeSubscriber.php \Drupal\user\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 40
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;
}