public function File::buildOptionsForm

Provide link to file option

Overrides FieldPluginBase::buildOptionsForm

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

File

drupal/core/modules/file/lib/Drupal/file/Plugin/views/field/File.php, line 45
Definition of 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 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);
}