function money_token_values in Money field 5
Implementation of hook_token_values().
File
- ./
money.module, line 390 - This module defines the "money" CCK field. It uses the Currency API, which is included in the Currency module, to get a list of valid currencies.
Code
function money_token_values($type, $object = NULL) {
if ($type == 'field') {
$tokens = array();
$first = $object[0];
$tokens['money'] = $first['view'];
$tokens['currency'] = $first['currency'];
$tokens['amount'] = $first['amount'];
return $tokens;
}
}