You are here

protected function TaxonomyIndexMachineName::defineOptions in Taxonomy Machine Name 8

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 ManyToOne::defineOptions

File

src/Plugin/views/filter/TaxonomyIndexMachineName.php, line 106

Class

TaxonomyIndexMachineName
Filter by term id.

Namespace

Drupal\taxonomy_machine_name\Plugin\views\filter

Code

protected function defineOptions() {
  $options = parent::defineOptions();
  $options['type'] = [
    'default' => 'textfield',
  ];
  $options['limit'] = [
    'default' => TRUE,
  ];
  $options['vid'] = [
    'default' => '',
  ];
  $options['hierarchy'] = [
    'default' => FALSE,
  ];
  $options['error_message'] = [
    'default' => TRUE,
  ];
  return $options;
}