You are here

public function PagererUrlConfigForm::submitForm in Pagerer 8.2

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/PagererUrlConfigForm.php, line 85

Class

PagererUrlConfigForm
Main Pagerer URL settings admin form.

Namespace

Drupal\pagerer\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $config = $this
    ->config('pagerer.settings');
  $config
    ->set('url_querystring.core_override', (bool) $form_state
    ->getValue('core_override_querystring'));
  $config
    ->set('url_querystring.index_base', (int) $form_state
    ->getValue('index_base'));
  $config
    ->set('url_querystring.querystring_key', (string) $form_state
    ->getValue('querystring_key'));
  $config
    ->save();
  parent::submitForm($form, $form_state);
}