public function ReportsForm::submitForm in Piwik 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 149
Class
- ReportsForm
- Class ReportsForm.
Namespace
Drupal\piwik_reports\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$session = $this
->getRequest()
->getSession();
$session
->set('piwik_reports_period', $form_state
->getValue('period'));
$session
->set('piwik_reports_site', $form_state
->getValue('site'));
}