You are here

public function SiteInformationForm::submitForm in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/system/src/Form/SiteInformationForm.php \Drupal\system\Form\SiteInformationForm::submitForm()

Form submission handler.

Parameters

array $form: An associative array containing the structure of the form.

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.

Overrides ConfigFormBase::submitForm

File

core/modules/system/src/Form/SiteInformationForm.php, line 210
Contains \Drupal\system\Form\SiteInformationForm.

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);
}