public function EventSeriesController::add in Booking and Availability Management Tools for Drupal 8
Provides the event submission form.
Parameters
\Drupal\bat_event_series\EventSeriesTypeInterface $event_series_type: The event series type entity for the event.
Return value
array An event submission form.
1 string reference to 'EventSeriesController::add'
- bat_event_series.routing.yml in modules/
bat_event_series/ bat_event_series.routing.yml - modules/bat_event_series/bat_event_series.routing.yml
File
- modules/
bat_event_series/ src/ Controller/ EventSeriesController.php, line 76 - Contains \Drupal\bat_event_series\Controller\EventSeriesController.
Class
- EventSeriesController
- Returns responses for Type routes.
Namespace
Drupal\bat_event_series\ControllerCode
public function add(EventSeriesTypeInterface $event_series_type) {
$type = $this
->entityTypeManager()
->getStorage('bat_event_series')
->create([
'type' => $event_series_type
->id(),
]);
$form = $this
->entityFormBuilder()
->getForm($type);
return $form;
}