You are here

public function LoqateApiKeyConfigForm::submitForm in Loqate 8

Same name and namespace in other branches
  1. 2.x src/Form/LoqateApiKeyConfigForm.php \Drupal\loqate\Form\LoqateApiKeyConfigForm::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/LoqateApiKeyConfigForm.php, line 67

Class

LoqateApiKeyConfigForm
Class LoqateApiKeyConfigForm.

Namespace

Drupal\loqate\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  parent::submitForm($form, $form_state);
  $this
    ->config('loqate.loqateapikeyconfig')
    ->set(self::DEFAULT_API_KEY, $form_state
    ->getValue(self::DEFAULT_API_KEY))
    ->save();
}