function votingapi_views_formatter_cleaned in Voting API 5
Same name and namespace in other branches
- 6 votingapi_views.inc \votingapi_views_formatter_cleaned()
File
- ./
votingapi_views.inc, line 284
Code
function votingapi_views_formatter_cleaned($fieldinfo, $fielddata, $value, $data) {
if ($value === NULL) {
return '';
}
switch ($fieldinfo['value_type']) {
case 'percent':
return round($value, 1) . '%';
case 'points':
return round($value, 1) . ' ' . t('points');
default:
return $value;
}
}