You are here

public function TaxonomyViewsIntegratorSettingsForm::submitForm in Taxonomy Views Integrator 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/TaxonomyViewsIntegratorSettingsForm.php, line 190

Class

TaxonomyViewsIntegratorSettingsForm
TVI global settings form.

Namespace

Drupal\tvi\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $this
    ->config('tvi.global_settings')
    ->set('disable_default_view', $form_state
    ->getValue('disable_default_view'))
    ->set('enable_override', $form_state
    ->getValue('enable_override'))
    ->set('view', $form_state
    ->getValue('view'))
    ->set('view_display', $form_state
    ->getValue('view_display'))
    ->save();
  parent::submitForm($form, $form_state);
}