function bat_event_create_form_wrapper in Booking and Availability Management Tools for Drupal 7
Form callback wrapper: create a Event.
Parameters
string $type:
1 string reference to 'bat_event_create_form_wrapper'
- BatEventUIController::hook_menu in modules/
bat_event/ bat_event.admin.inc - Overrides hook_menu() defaults.
File
- modules/
bat_event/ bat_event.admin.inc, line 161 - Unit event editing UI.
Code
function bat_event_create_form_wrapper($type) {
global $user;
// Add the breadcrumb for the form's location.
bat_event_set_breadcrumb();
// Create a event object.
$event = bat_event_create(array(
'type' => $type,
));
$event->created = REQUEST_TIME;
$event->uid = $user->uid;
return drupal_get_form('bat_event_edit_form', $event);
}