You are here

public function SettingsForm::submitForm in AJAX Comments 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 174

Class

SettingsForm
Configure 'ajax comments' settings for this site.

Namespace

Drupal\ajax_comments\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $this
    ->config('ajax_comments.settings')
    ->set('notify', $form_state
    ->getValue('notify'))
    ->set('enable_scroll', $form_state
    ->getValue('enable_scroll'))
    ->set('reply_autoclose', $form_state
    ->getValue('reply_autoclose'))
    ->save();
  parent::submitForm($form, $form_state);
}