function number_token_values in Content Construction Kit (CCK) 6.3
Same name and namespace in other branches
- 6.2 modules/number/number.token.inc \number_token_values()
Implementation of hook_token_values().
File
- modules/
number/ number.token.inc, line 25 - Provides tokens for number fields.
Code
function number_token_values($type, $object = NULL, $options = array()) {
if ($type == 'field') {
$item = $object[0];
$tokens['raw'] = $item['value'];
$tokens['formatted'] = isset($item['view']) ? $item['view'] : '';
return $tokens;
}
}