You are here

public function SettingsForm::submitForm in Instagram Feeds 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/SettingsForm.php, line 332

Class

SettingsForm
Defines an Instagram Feeds configuration form.

Namespace

Drupal\instagram_feeds\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $form_state
    ->cleanValues();
  $this
    ->config(self::SETTINGS)
    ->setData(array_filter($form_state
    ->getValues()))
    ->save();
  parent::submitForm($form, $form_state);
}