You are here

public function BatEventUiEventTypeForm::submitForm in Booking and Availability Management Tools for Drupal 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

modules/bat_event_ui/src/Form/BatEventUiEventTypeForm.php, line 100
Contains \Drupal\bat_event_ui\Form\BatEventUiEventTypeForm.

Class

BatEventUiEventTypeForm

Namespace

Drupal\bat_event_ui\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $type = $form_state
    ->getValue('unit_type');
  $event_type = $form_state
    ->getValue('event_types');
  $form_state
    ->setRedirectUrl(Url::fromRoute('bat_event_ui.calendar', [
    'unit_type' => $type,
    'event_type' => $event_type,
  ]));
}