function bat_unit_token_info in Booking and Availability Management Tools for Drupal 7
Implements hook_token_info().
File
- modules/
bat_unit/ bat_unit.tokens.inc, line 11 - Builds placeholder replacement tokens for unit-related data.
Code
function bat_unit_token_info() {
$bat_type = array(
'name' => t('BAT Type', array(), array(
'context' => 'a bat type',
)),
'description' => t('Tokens related to bat type.'),
'needs-data' => 'bat-type',
);
$bat_unit = array(
'name' => t('BAT Unit', array(), array(
'context' => 'a bat unit',
)),
'description' => t('Tokens related to bat unit.'),
'needs-data' => 'bat-unit',
);
$info['author'] = array(
'name' => t('Author'),
'description' => t('The author.'),
'type' => 'user',
);
return array(
'types' => array(
'bat_type' => $bat_type,
'bat_unit' => $bat_unit,
),
'tokens' => array(
'bat_type' => $info,
'bat_unit' => $info,
),
);
}