You are here

public function File::render in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/file/src/Plugin/views/field/File.php \Drupal\file\Plugin\views\field\File::render()
  2. 9 core/modules/file/src/Plugin/views/field/File.php \Drupal\file\Plugin\views\field\File::render()

File

core/modules/file/src/Plugin/views/field/File.php, line 109

Class

File
Field handler to provide simple renderer that allows linking to a file.

Namespace

Drupal\file\Plugin\views\field

Code

public function render(ResultRow $values) {
  $value = $this
    ->getValue($values);
  return $this
    ->renderLink($this
    ->sanitizeValue($value), $values);
}