You are here

public function SettingsForm::submitForm in Lightning Scheduler 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/SettingsForm.php, line 58

Class

SettingsForm
The settings form for controlling Lightning Scheduler's behavior.

Namespace

Drupal\lightning_scheduler\Form

Code

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