function Uri::render

Render the field.

Parameters

$values: The values retrieved from the database.

Overrides File::render

File

drupal/core/modules/file/lib/Drupal/file/Plugin/views/field/Uri.php, line 35
Definition of Drupal\file\Plugin\views\field\Uri.

Class

Uri
Field handler to add rendering file paths as file URLs instead of as internal file URIs.

Namespace

Drupal\file\Plugin\views\field

Code

function render($values) {
  $data = $values->{$this->field_alias};
  if (!empty($this->options['file_download_path']) && $data !== NULL && $data !== '') {
    $data = file_create_url($data);
  }
  return $this
    ->render_link($data, $values);
}