You are here

public function views_handler_field_file::init in Views (for Drupal 7) 7.3

Same name and namespace in other branches
  1. 6.3 modules/system/views_handler_field_file.inc \views_handler_field_file::init()
  2. 6.2 modules/system/views_handler_field_file.inc \views_handler_field_file::init()

Constructor to provide additional field to add.

Overrides views_handler_field::init

File

modules/system/views_handler_field_file.inc, line 18
Definition of views_handler_field_file.

Class

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

Code

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