You are here

public function AppAnalyticsFormBase::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 FormInterface::submitForm

File

src/Form/AppAnalyticsFormBase.php, line 466

Class

AppAnalyticsFormBase
App analytics form builder for developer- and team apps.

Namespace

Drupal\apigee_edge\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $options = [
    'query' => [
      'metric' => $form_state
        ->getValue('metrics'),
      'since' => $form_state
        ->getValue('since')
        ->getTimeStamp(),
      'until' => $form_state
        ->getValue('until')
        ->getTimeStamp(),
      'environment' => $form_state
        ->getValue('environment'),
    ],
  ];
  $form_state
    ->setRedirect('<current>', [], $options);
}