function views_handler_field_file_size::render
Same name in other branches
- 6.x-3.x handlers/views_handler_field.inc \views_handler_field_file_size::render()
Overrides views_handler_field::render
File
-
handlers/
views_handler_field.inc, line 1719
Class
- views_handler_field_file_size
- Render a numeric value as a size.
Code
public function render($values) {
$value = $this->get_value($values);
if ($value) {
switch ($this->options['file_size_display']) {
case 'bytes':
return $value;
case 'formatted':
default:
return format_size($value);
}
}
else {
return '';
}
}