You are here

public function BackgroundImageSettingsForm::submitForm in Background Image 8

Same name and namespace in other branches
  1. 2.x src/Form/BackgroundImageSettingsForm.php \Drupal\background_image\Form\BackgroundImageSettingsForm::submitForm()
  2. 2.0.x src/Form/BackgroundImageSettingsForm.php \Drupal\background_image\Form\BackgroundImageSettingsForm::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/BackgroundImageSettingsForm.php, line 168

Class

BackgroundImageSettingsForm
Class BackgroundImageSettingsForm.

Namespace

Drupal\background_image\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  parent::submitForm($form, $form_state);
  $this
    ->config('background_image.settings')
    ->merge(array_filter($form_state
    ->cleanValues()
    ->getValues()))
    ->save();
}