You are here

public function SettingsForm::submitForm in External Links Filter 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 97

Class

SettingsForm
Defines a form that configures external link filter settings.

Namespace

Drupal\elf\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $values = $form_state
    ->getValues();
  $this
    ->config('elf.settings')
    ->set('elf_domains', $values['elf_domains'])
    ->set('elf_window', $values['elf_window'])
    ->set('elf_redirect', $values['elf_redirect'])
    ->save();
  parent::submitForm($form, $form_state);
}