You are here

public function ParagraphsGridConfigForm::submitForm in Paragraphs grid 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/ParagraphsGridConfigForm.php, line 168

Class

ParagraphsGridConfigForm
Class ParagraphsGridConfigForm.

Namespace

Drupal\paragraphs_grid\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  parent::submitForm($form, $form_state);
  $this
    ->config('paragraphs_grid.settings')
    ->set('gridtype', $form_state
    ->getValue('gridtype'))
    ->set('uselibrary', $form_state
    ->getValue('uselibrary'))
    ->set('use_lib_admin_pages', $form_state
    ->getValue('use_lib_admin_pages'))
    ->save();
}