1 views_handler_field_file_type.inc views_handler_field_file_type::render_name($data, $values)

Render file type as human readable name, unless using machine_name option.

File

core/modules/file/views/views_handler_field_file_type.inc, line 37
Definition of views_handler_field_file_type.

Class

views_handler_field_file_type
Field handler to translate a file type into its readable form.

Code

function render_name($data, $values) {
  if ($this->options['machine_name'] != 1 && $data !== NULL && $data !== '') {
    return t($this->sanitize_value(file_type_get_name($data)));
  }
  return $this->sanitize_value($data);
}