public function EventSeriesUpdateConfirmForm::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_series/ src/ Entity/ Form/ EventSeriesUpdateConfirmForm.php, line 94 - Contains \Drupal\bat_event_series\Entity\Form\EventSeriesUpdateConfirmForm.
Class
Namespace
Drupal\bat_event_series\Entity\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
if ($form_state
->getValue('confirm')) {
$this->bat_event_series
->save();
$this
->messenger()
->addMessage($this
->t('Saved the %label Event series.', [
'%label' => $this->bat_event_series
->label(),
]));
$form_state
->setRedirect('entity.bat_event_series.edit_form', [
'bat_event_series' => $this->bat_event_series
->id(),
]);
}
}