public RegionalForm::submitForm(array &$form, FormStateInterface $form_state)
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 147
Class
- RegionalForm
- Configure regional settings for this site.
Namespace
Drupal\system\Form
Code
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); }
Please login to continue.