You are here

public function AdminSettings::submitForm in Calendar Systems 8.2

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/AdminSettings.php, line 109
Contains Drupal\CalendarSystems\Form\AdminSettings.

Class

AdminSettings

Namespace

Drupal\calendar_systems\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {

  // Retrieve the configuration
  $this->configFactory
    ->getEditable('calendar_systems.settings')
    ->set('js_date_picker_core_text_date_fields', $form_state
    ->getValue('js_date_picker_core_text_date_fields', 0))
    ->save();
  Helpers::calendar_systems_profiles_update($form_state
    ->getValue('profiles', []));
  parent::submitForm($form, $form_state);
}