You are here

function bat_type_title_callback in Booking and Availability Management Tools for Drupal 7

Callback for the type View and Edit titles.

Parameters

object $type:

string $op:

Return value

string translatable title string

1 string reference to 'bat_type_title_callback'
BatTypeUIController::hook_menu in modules/bat_unit/bat_type.admin.inc
Overrides hook_menu() defaults.

File

modules/bat_unit/bat_unit.module, line 556

Code

function bat_type_title_callback($type, $op) {
  if ($op == 'view') {
    return bat_type_get_number_of_revisions_newer_than($type->revision_id, $type->type_id) ? t('View current') : t('View');
  }
  elseif ($op == 'edit') {
    return bat_type_get_number_of_revisions_newer_than($type->revision_id, $type->type_id) ? t('Edit current') : t('Edit');
  }
}