function SiteMaintenanceModeForm::submitForm
Same name in other branches
- 9 core/modules/system/src/Form/SiteMaintenanceModeForm.php \Drupal\system\Form\SiteMaintenanceModeForm::submitForm()
- 8.9.x core/modules/system/src/Form/SiteMaintenanceModeForm.php \Drupal\system\Form\SiteMaintenanceModeForm::submitForm()
- 11.x core/modules/system/src/Form/SiteMaintenanceModeForm.php \Drupal\system\Form\SiteMaintenanceModeForm::submitForm()
Overrides ConfigFormBase::submitForm
File
-
core/
modules/ system/ src/ Form/ SiteMaintenanceModeForm.php, line 103
Class
- SiteMaintenanceModeForm
- Configure maintenance settings for this site.
Namespace
Drupal\system\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$this->state
->set('system.maintenance_mode', $form_state->getValue('maintenance_mode'));
parent::submitForm($form, $form_state);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.