function bat_unit_form_wrapper in Booking and Availability Management Tools for Drupal 7
Form callback wrapper: edit a Unit.
Parameters
BatUnit $unit: The BatUnit object being edited by this form.
See also
1 string reference to 'bat_unit_form_wrapper'
- BatUnitUIController::hook_menu in modules/
bat_unit/ bat_unit.admin.inc - Overrides hook_menu() defaults.
File
- modules/
bat_unit/ bat_unit.admin.inc, line 158 - BatUnit editing UI.
Code
function bat_unit_form_wrapper(BatUnit $unit) {
// Add the breadcrumb for the form's location.
bat_unit_set_breadcrumb();
drupal_set_title(t('Edit !unit_name', array(
'!unit_name' => $unit->name,
)));
$unit->date = format_date($unit->created, 'custom', 'Y-m-d H:i:s O');
$account = user_load($unit->uid);
$unit->author_name = isset($account->name) ? $account->name : '';
return drupal_get_form('bat_unit_edit_form', $unit);
}