public function RegionalForm::submitForm in Drupal 8
Same name and namespace in other branches
- 9 core/modules/system/src/Form/RegionalForm.php \Drupal\system\Form\RegionalForm::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/ RegionalForm.php, line 113
Class
- RegionalForm
- Configure regional settings for this site.
Namespace
Drupal\system\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$this
->config('system.date')
->set('country.default', $form_state
->getValue('site_default_country'))
->set('first_day', $form_state
->getValue('date_first_day'))
->set('timezone.default', $form_state
->getValue('date_default_timezone'))
->save();
parent::submitForm($form, $form_state);
}