public function EventSettingsForm::submitForm in RNG - Events and Registrations 8
Same name and namespace in other branches
- 8.2 src/Form/EventSettingsForm.php \Drupal\rng\Form\EventSettingsForm::submitForm()
- 3.x src/Form/EventSettingsForm.php \Drupal\rng\Form\EventSettingsForm::submitForm()
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/ EventSettingsForm.php, line 76
Class
- EventSettingsForm
- Configure event settings.
Namespace
Drupal\rng\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
/** @var \Drupal\Core\Entity\EntityInterface $event */
$event = $form_state
->get('event');
$form_state
->get('form_display')
->extractFormValues($event, $form, $form_state);
$event
->save();
$t_args = [
'%event_label' => $event
->label(),
];
drupal_set_message(t('Event settings updated.', $t_args));
}