You are here

function bat_type_form_wrapper in Booking and Availability Management Tools for Drupal 7

Form callback wrapper: edit a type.

Parameters

$type: The Battype object being edited by this form.

See also

bat_type_edit_form()

1 string reference to 'bat_type_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 352
BatType editing UI.

Code

function bat_type_form_wrapper($type) {

  // Add the breadcrumb for the form's location.
  bat_type_set_breadcrumb();
  drupal_set_title(t('Edit !type_name', array(
    '!type_name' => $type->name,
  )));
  $type->date = format_date($type->created, 'custom', 'Y-m-d H:i:s O');
  $account = user_load($type->uid);
  $type->author_name = isset($account->name) ? $account->name : '';
  return drupal_get_form('bat_type_edit_form', $type);
}