function StringArgument::defineOptions

Same name and namespace in other branches
  1. 9 core/modules/views/src/Plugin/views/argument/StringArgument.php \Drupal\views\Plugin\views\argument\StringArgument::defineOptions()
  2. 8.9.x core/modules/views/src/Plugin/views/argument/StringArgument.php \Drupal\views\Plugin\views\argument\StringArgument::defineOptions()
  3. 11.x core/modules/views/src/Plugin/views/argument/StringArgument.php \Drupal\views\Plugin\views\argument\StringArgument::defineOptions()

Overrides ArgumentPluginBase::defineOptions

1 call to StringArgument::defineOptions()
StringListField::defineOptions in core/modules/options/src/Plugin/views/argument/StringListField.php
Information about options for all kinds of purposes will be held here.
1 method overrides StringArgument::defineOptions()
StringListField::defineOptions in core/modules/options/src/Plugin/views/argument/StringListField.php
Information about options for all kinds of purposes will be held here.

File

core/modules/views/src/Plugin/views/argument/StringArgument.php, line 46

Class

StringArgument
Argument handler for string.

Namespace

Drupal\views\Plugin\views\argument

Code

protected function defineOptions() {
  $options = parent::defineOptions();
  $options['glossary'] = [
    'default' => FALSE,
  ];
  $options['limit'] = [
    'default' => 0,
  ];
  $options['case'] = [
    'default' => 'none',
  ];
  $options['path_case'] = [
    'default' => 'none',
  ];
  $options['transform_dash'] = [
    'default' => FALSE,
  ];
  $options['break_phrase'] = [
    'default' => FALSE,
  ];
  if (!empty($this->definition['many to one'])) {
    $options['add_table'] = [
      'default' => FALSE,
    ];
    $options['require_value'] = [
      'default' => FALSE,
    ];
  }
  return $options;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.