public function BatFullcalendarController::fullcalendarEventManagement in Booking and Availability Management Tools for Drupal 8
The EventManager page shows when clicking on an event in the calendar - will allow a user to manipulate that event.
Parameters
$entity_id:
$event_type:
$event_id:
$start_date:
$end_date:
1 string reference to 'BatFullcalendarController::fullcalendarEventManagement'
- bat_fullcalendar.routing.yml in modules/
bat_fullcalendar/ bat_fullcalendar.routing.yml - modules/bat_fullcalendar/bat_fullcalendar.routing.yml
File
- modules/
bat_fullcalendar/ src/ Controller/ BatFullcalendarController.php, line 30 - Contains \Drupal\bat_fullcalendar\Controller\BatFullcalendarController.
Class
- BatFullcalendarController
- Returns responses for FullCalendar routes.
Namespace
Drupal\bat_fullcalendar\ControllerCode
public function fullcalendarEventManagement($entity_id, $event_type, $event_id, $start_date, $end_date) {
$modal_content = $this
->moduleHandler()
->invokeAll('bat_fullcalendar_modal_content', [
$entity_id,
$event_type,
$event_id,
$start_date,
$end_date,
]);
$modal_content = array_pop($modal_content);
$response = new AjaxResponse();
if (isset($modal_content['commands'])) {
foreach ($modal_content['commands'] as $command) {
$response
->addCommand($command);
}
}
else {
$response
->addCommand(new OpenModalDialogCommand($modal_content['title'], $modal_content['content'], []));
}
return $response;
}