function views_handler_field_file_size::render

3.x views_handler_field.inc views_handler_field_file_size::render($values)
2.x views_handler_field.inc views_handler_field_file_size::render($values)

Render the field.

Parameters

$values: The values retrieved from the database.

Overrides views_handler_field::render

File

handlers/views_handler_field.inc, line 1599
@todo.

Class

views_handler_field_file_size
Render a numeric value as a size.

Code

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 '';
  }
}