You are here

public function DomainSettingsForm::submitForm in Domain Access 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

domain/src/Form/DomainSettingsForm.php, line 76

Class

DomainSettingsForm
Class DomainSettingsForm.

Namespace

Drupal\domain\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $config = $this
    ->config('domain.settings');
  foreach ($this
    ->settingsKeys() as $key) {
    $config
      ->set($key, $form_state
      ->getValue($key));
  }
  $config
    ->save();
  parent::submitForm($form, $form_state);
}