You are here

public function PrevnextSettingsForm::submitForm in Prevnext 2.x

Same name and namespace in other branches
  1. 8 src/Form/PrevnextSettingsForm.php \Drupal\prevnext\Form\PrevnextSettingsForm::submitForm()
  2. 2.0.x src/Form/PrevnextSettingsForm.php \Drupal\prevnext\Form\PrevnextSettingsForm::submitForm()

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/PrevnextSettingsForm.php, line 56

Class

PrevnextSettingsForm
Class PrevnextSettingsForm.

Namespace

Drupal\prevnext\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {

  // Save the config values.
  $this
    ->config('prevnext.settings')
    ->set('prevnext_enabled_nodetypes', $form_state
    ->getValue('prevnext_enabled_nodetypes'))
    ->save();
  parent::submitForm($form, $form_state);
}