You are here

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

Provide link to file option

Overrides FieldPluginBase::buildOptionsForm

2 calls to File::buildOptionsForm()
FileMime::buildOptionsForm in lib/Views/file/Plugin/views/field/FileMime.php
Provide link to file option
Uri::buildOptionsForm in lib/Views/file/Plugin/views/field/Uri.php
Provide link to file option
2 methods override File::buildOptionsForm()
FileMime::buildOptionsForm in lib/Views/file/Plugin/views/field/FileMime.php
Provide link to file option
Uri::buildOptionsForm in lib/Views/file/Plugin/views/field/Uri.php
Provide link to file option

File

lib/Views/file/Plugin/views/field/File.php, line 45
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 buildOptionsForm(&$form, &$form_state) {
  $form['link_to_file'] = array(
    '#title' => t('Link this field to download the file'),
    '#description' => t("Enable to override this field's links."),
    '#type' => 'checkbox',
    '#default_value' => !empty($this->options['link_to_file']),
  );
  parent::buildOptionsForm($form, $form_state);
}