You are here

public function FitvidsAdminSettingsForm::submitForm in FitVids 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/FitvidsAdminSettingsForm.php, line 78

Class

FitvidsAdminSettingsForm
Configure Fitvids settings for this site.

Namespace

Drupal\fitvids\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $config = $this
    ->config('fitvids.settings');
  $config
    ->set('selectors', $form_state
    ->getValue('fitvids_selectors'))
    ->set('custom_vendors', $form_state
    ->getValue('fitvids_custom_vendors'))
    ->set('ignore_selectors', $form_state
    ->getValue('fitvids_ignore_selectors'))
    ->save();
  parent::submitForm($form, $form_state);
}