You are here

public function WebformSanitizeConfigForm::submitForm in Webform Scheduled Tasks 8

Parameters

array $form: The parameters to use to work out the value.

\Drupal\Core\Form\FormStateInterface $form_state: The parameters to use to work out the value.

Overrides ConfigFormBase::submitForm

File

src/Form/WebformSanitizeConfigForm.php, line 103

Class

WebformSanitizeConfigForm
Webform Sanitize config form.

Namespace

Drupal\webform_scheduled_tasks\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $values = $form_state
    ->getValues();
  $field_name = $values['settings']['field_name'];
  $sanitized_value = $values['settings']['sanitized_value'];
  $run_interval = $values['settings']['run_interval'];
  webform_scheduled_tasks_set_config('field_name', $field_name);
  webform_scheduled_tasks_set_config('sanitized_value', $sanitized_value);
  webform_scheduled_tasks_set_config('run_interval', $run_interval);
  parent::submitForm($form, $form_state);
}