You are here

public function CalendarSettingsForm::submitForm in Calendar 8

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

src/Form/CalendarSettingsForm.php, line 72

Class

CalendarSettingsForm
Defines the admin configuration form for the calendar module.

Namespace

Drupal\calendar\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  parent::submitForm($form, $form_state);
  $this
    ->config('calendar.settings')
    ->set('track_date', $form_state
    ->getValue('track_date'))
    ->set('add_colorbox', $form_state
    ->getValue('add_colorbox'))
    ->save();
}