You are here

protected function StringArgument::defineOptions in Drupal 8

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()

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 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 37

Class

StringArgument
Basic argument handler to implement string arguments that may have length limits.

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;
}