You are here

protected function File::defineOptions in Drupal 9

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

Information about options for all kinds of purposes will be held here.


'option_name' => array(
 - 'default' => default value,
 - 'contains' => (optional) array of items this contains, with its own
     defaults, etc. If contains is set, the default will be ignored and
     assumed to be array().
 ),

Return value

array Returns the options of this handler/plugin.

Overrides FieldPluginBase::defineOptions

File

core/modules/file/src/Plugin/views/field/File.php, line 71

Class

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

Namespace

Drupal\file\Plugin\views\field

Code

protected function defineOptions() {
  $options = parent::defineOptions();
  $options['link_to_file'] = [
    'default' => FALSE,
  ];
  return $options;
}