public function RegionalForm::submitForm in Zircon Profile 8
Same name and namespace in other branches
- 8.0 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 152 - Contains \Drupal\system\Form\RegionalForm.
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'))
->set('timezone.user.configurable', $form_state
->getValue('configurable_timezones'))
->set('timezone.user.warn', $form_state
->getValue('empty_timezone_message'))
->set('timezone.user.default', $form_state
->getValue('user_default_timezone'))
->save();
parent::submitForm($form, $form_state);
}