You are here

public function StaticPageSettingsForm::submitForm in Static 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/StaticPageSettingsForm.php, line 100

Class

StaticPageSettingsForm
Configure search settings for this site.

Namespace

Drupal\static_page\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $this
    ->config('static_page.fields')
    ->set('fields', array_filter($form_state
    ->getValue('fields')))
    ->save();
  parent::submitForm($form, $form_state);
}