You are here

function filefield_handler_field_data::render in FileField 6.3

File

views/filefield_handler_field_data.inc, line 43
filefield_handler_field_data.inc

Class

filefield_handler_field_data
@file filefield_handler_field_data.inc

Code

function render($values) {
  $values = drupal_clone($values);

  // Prevent affecting the original.
  $data = unserialize($values->{$this->field_alias});
  $values->{$this->field_alias} = filefield_data_value($this->options['data_key'], $data[$this->options['data_key']]);

  // Copied from views_handler_field_node(). We just remove the call to
  // sanitize_value() from the original call, becaue our value has already
  // been cleaned by filefield_data_value().
  return $this
    ->render_link($values->{$this->field_alias}, $values);
}