You are here

function views_handler_field_file_extension::render in Views (for Drupal 7) 6.3

Same name and namespace in other branches
  1. 7.3 modules/system/views_handler_field_file_extension.inc \views_handler_field_file_extension::render()

Render the field.

Parameters

$values: The values retrieved from the database.

Overrides views_handler_field::render

File

modules/system/views_handler_field_file_extension.inc, line 8

Class

views_handler_field_file_extension
Returns a pure file extension of the file, for example 'module'.

Code

function render($values) {
  $value = $this
    ->get_value($values);
  if (preg_match('/\\.([^\\.]+)$/', $value, $match)) {
    return $this
      ->sanitize_value($match[1]);
  }
}