1 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

core/modules/views/handlers/views_handler_field.inc, line 1658
@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 '';
  }
}