You are here

public function SchedulerAdminForm::submitForm in Scheduler 8

Same name and namespace in other branches
  1. 2.x src/Form/SchedulerAdminForm.php \Drupal\scheduler\Form\SchedulerAdminForm::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

src/Form/SchedulerAdminForm.php, line 126

Class

SchedulerAdminForm
Main administration form for the Scheduler module.

Namespace

Drupal\scheduler\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $this
    ->config('scheduler.settings')
    ->set('allow_date_only', $form_state
    ->getValue([
    'allow_date_only',
  ]))
    ->set('default_time', $form_state
    ->getValue('default_time'))
    ->set('hide_seconds', $form_state
    ->getValue('hide_seconds'))
    ->save();
  parent::submitForm($form, $form_state);
}