You are here

public function QueueMailSettingsForm::submitForm in Queue Mail 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/QueueMailSettingsForm.php, line 185

Class

QueueMailSettingsForm
Configures module's settings.

Namespace

Drupal\queue_mail\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $this
    ->config('queue_mail.settings')
    ->set('queue_mail_keys', $form_state
    ->getValue('queue_mail_keys'))
    ->set('queue_mail_queue_time', $form_state
    ->getValue('queue_mail_queue_time'))
    ->set('threshold', $form_state
    ->getValue('threshold'))
    ->set('requeue_interval', $form_state
    ->getValue('requeue_interval'))
    ->set('queue_mail_queue_wait_time', $form_state
    ->getValue('queue_mail_queue_wait_time'))
    ->save();
  parent::submitForm($form, $form_state);
}