function SiteInformationForm::submitForm

Same name and namespace in other branches
  1. 9 core/modules/system/src/Form/SiteInformationForm.php \Drupal\system\Form\SiteInformationForm::submitForm()
  2. 8.9.x core/modules/system/src/Form/SiteInformationForm.php \Drupal\system\Form\SiteInformationForm::submitForm()
  3. 10 core/modules/system/src/Form/SiteInformationForm.php \Drupal\system\Form\SiteInformationForm::submitForm()

Overrides ConfigFormBase::submitForm

File

core/modules/system/src/Form/SiteInformationForm.php, line 204

Class

SiteInformationForm
Configure site information settings for this site.

Namespace

Drupal\system\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
    $this->config('system.site')
        ->set('name', $form_state->getValue('site_name'))
        ->set('mail', $form_state->getValue('site_mail'))
        ->set('slogan', $form_state->getValue('site_slogan'))
        ->set('page.front', $form_state->getValue('site_frontpage'))
        ->set('page.403', $form_state->getValue('site_403'))
        ->set('page.404', $form_state->getValue('site_404'))
        ->save();
    parent::submitForm($form, $form_state);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.