You are here

public function SettingsForm::submitForm in FullCalendar 8

Same name in this branch
  1. 8 src/Form/SettingsForm.php \Drupal\fullcalendar\Form\SettingsForm::submitForm()
  2. 8 fullcalendar_options/src/Form/SettingsForm.php \Drupal\fullcalendar_options\Form\SettingsForm::submitForm()
Same name and namespace in other branches
  1. 8.3 fullcalendar_options/src/Form/SettingsForm.php \Drupal\fullcalendar_options\Form\SettingsForm::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

fullcalendar_options/src/Form/SettingsForm.php, line 86

Class

SettingsForm
TODO

Namespace

Drupal\fullcalendar_options\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $config = $this
    ->config('fullcalendar_options.settings');
  foreach ($this->options as $key => $info) {
    $config
      ->set($key, $form_state
      ->getValue($key));
  }
  $config
    ->save();
  parent::submitForm($form, $form_state);
}