1 views_handler_field_file.inc views_handler_field_file::init(&$view, &$options)

Constructor to provide additional field to add.

Overrides views_handler_field::init

File

core/modules/file/views/views_handler_field_file.inc, line 17
Definition of views_handler_field_file.

Class

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

Code

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