You are here

public function SearchByPageAdminForm::submitForm in Search by Page 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/SearchByPageAdminForm.php, line 123
Contains \Drupal\search_by_page\src\Form\SearchByPageAdminForm.

Class

SearchByPageAdminForm
Class SearchByPageAdminForm.

Namespace

Drupal\search_by_page\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $this
    ->config('search_by_page.settings')
    ->set('search_by_page_number_of_items', $form_state
    ->getValue('search_by_page_number_of_items'))
    ->set('search_by_page_env', $form_state
    ->getValue('search_by_page_env'))
    ->set('search_by_page_tab', $form_state
    ->getValue('search_by_page_tab'))
    ->save();
  parent::submitForm($form, $form_state);
}