You are here

public function File::init in Views (for Drupal 7) 8.3

Constructor to provide additional field to add.

Overrides FieldPluginBase::init

File

lib/Views/file/Plugin/views/field/File.php, line 29
Definition of Views\file\Plugin\views\field\File.

Class

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

Namespace

Views\file\Plugin\views\field

Code

public function init(ViewExecutable $view, &$options) {
  parent::init($view, $options);
  if (!empty($options['link_to_file'])) {
    $this->additional_fields['uri'] = 'uri';
  }
}