You are here

public function PrevnextSettingsForm::submitForm in Prevnext 8

Same name and namespace in other branches
  1. 2.x 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 63
Contains \Drupal\prevnext\Form\PrevnextSettingsForm.

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);
}