You are here

public function AppAnalyticsSettingsForm::submitForm in Apigee Edge 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/AppAnalyticsSettingsForm.php, line 130

Class

AppAnalyticsSettingsForm
Provides a form for app analytics related configuration.

Namespace

Drupal\apigee_edge\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $this
    ->config('apigee_edge.common_app_settings')
    ->set('analytics_environment', $form_state
    ->getValue('environment'))
    ->set('analytics_available_environments', array_values(array_filter($form_state
    ->getValue('available_environments'))))
    ->save();
  parent::submitForm($form, $form_state);
}