You are here

public function SchedulerCronForm::submitForm in Scheduler 8

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

Class

SchedulerCronForm
Scheduler Lightweight Cron form.

Namespace

Drupal\scheduler\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $config = $this
    ->config('scheduler.settings');
  $config
    ->set('log', $form_state
    ->getValue('lightweight_log'));
  $config
    ->set('lightweight_cron_access_key', $form_state
    ->getValue('lightweight_access_key'));
  $config
    ->save();
  parent::submitForm($form, $form_state);
}