function bat_type_create_form_wrapper in Booking and Availability Management Tools for Drupal 7
Form callback wrapper: create a type.
Parameters
$type: The type type for the type to be created.
1 string reference to 'bat_type_create_form_wrapper'
- BatTypeUIController::hook_menu in modules/
bat_unit/ bat_type.admin.inc - Overrides hook_menu() defaults.
File
- modules/
bat_unit/ bat_type.admin.inc, line 370 - BatType editing UI.
Code
function bat_type_create_form_wrapper($type) {
global $user;
// Add the breadcrumb for the form's location.
bat_type_set_breadcrumb();
$type = bat_type_create(array(
'type' => $type,
'uid' => $user->uid,
));
$type->created = REQUEST_TIME;
$type->author_name = $user->name;
$type->status = 1;
return drupal_get_form('bat_type_edit_form', $type);
}