function SiteMaintenanceModeForm::submitForm

Same name in other branches
  1. 9 core/modules/system/src/Form/SiteMaintenanceModeForm.php \Drupal\system\Form\SiteMaintenanceModeForm::submitForm()
  2. 8.9.x core/modules/system/src/Form/SiteMaintenanceModeForm.php \Drupal\system\Form\SiteMaintenanceModeForm::submitForm()
  3. 10 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\Form

Code

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.