function rooms_booking_form_wrapper in Rooms - Drupal Booking for Hotels, B&Bs and Vacation Rentals 7
Form callback wrapper: edit a Booking.
Parameters
$booking: The RoomsBooking object being edited by this form.
See also
1 string reference to 'rooms_booking_form_wrapper'
- RoomsBookingUIController::hook_menu in modules/
rooms_booking/ rooms_booking.admin.inc - Overrides hook_menu() defaults.
File
- modules/
rooms_booking/ rooms_booking.admin.inc, line 139 - Rooms editing UI.
Code
function rooms_booking_form_wrapper($booking) {
// Add the breadcrumb for the form's location.
rooms_booking_set_breadcrumb();
// Set the page title.
$type = rooms_booking_get_types($booking->type);
drupal_set_title(t('#@booking_id - @booking_type', array(
'@booking_type' => $type->label,
'@booking_id' => $booking->booking_id,
)));
$booking->date = format_date($booking->created, 'custom', 'Y-m-d H:i:s O');
$account = user_load($booking->uid);
$booking->owner_name = $account->name;
return drupal_get_form('rooms_booking_edit_form', $booking);
}