You are here

public function ConfigFormBase::submitForm in Zoom API 8

Same name and namespace in other branches
  1. 2.0.x src/Form/ConfigFormBase.php \Drupal\zoomapi\Form\ConfigFormBase::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/ConfigFormBase.php, line 32

Class

ConfigFormBase
Config form base for our config form.

Namespace

Drupal\zoomapi\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $config = $this
    ->getConfig();
  $values = $form_state
    ->getValues();
  foreach ($values as $key => $value) {
    $config
      ->set($key, $value);
  }
  $config
    ->save();
}