You are here

public function File::init in Zircon Profile 8

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

Initialize the plugin.

Parameters

\Drupal\views\ViewExecutable $view: The view object.

\Drupal\views\Plugin\views\display\DisplayPluginBase $display: The display handler.

array $options: The options configured for this plugin.

Overrides FieldPluginBase::init

File

core/modules/file/src/Plugin/views/field/File.php, line 28
Contains \Drupal\file\Plugin\views\field\File.

Class

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

Namespace

Drupal\file\Plugin\views\field

Code

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