function currency_token_info in Currency 7.2
Same name and namespace in other branches
- 8.3 currency.tokens.inc \currency_token_info()
Implements hook_token_info().
File
- currency/
currency.tokens.inc, line 11 - Contains Token API hook implementations.
Code
function currency_token_info() {
// Token groups.
$types['currency'] = array(
'description' => t('ISO 4217 currencies.'),
'name' => t('Currencies'),
'needs-data' => 'currency',
);
// Tokens.
$tokens['currency']['code'] = array(
'description' => t('The ISO 4217 currency code.'),
'name' => t('Currency code'),
'type' => 'text',
);
$tokens['currency']['number'] = array(
'description' => t('The ISO 4217 currency number.'),
'name' => t('Currency number'),
'type' => 'text',
);
$tokens['currency']['subunits'] = array(
'description' => t('The number of subunits.'),
'name' => t('Subunits'),
'type' => 'text',
);
$tokens['currency']['sign'] = array(
'description' => '',
'name' => t('Sign'),
'type' => 'text',
);
$tokens['currency']['title'] = array(
'description' => '',
'name' => t('Name'),
'type' => 'text',
);
return array(
'tokens' => $tokens,
'types' => $types,
);
}