You are here

public function ReportsForm::submitForm in Matomo Reports 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/ReportsForm.php, line 172

Class

ReportsForm
Class ReportsForm.

Namespace

Drupal\matomo_reports\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $session = $this
    ->getRequest()
    ->getSession();
  $session
    ->set('matomo_reports_period', $form_state
    ->getValue('period'));
  $session
    ->set('matomo_reports_site', $form_state
    ->getValue('site'));
}