You are here

protected function StringArgument::defineOptions in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 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 42
Contains \Drupal\views\Plugin\views\argument\StringArgument.

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'] = array(
    'default' => FALSE,
  );
  $options['limit'] = array(
    'default' => 0,
  );
  $options['case'] = array(
    'default' => 'none',
  );
  $options['path_case'] = array(
    'default' => 'none',
  );
  $options['transform_dash'] = array(
    'default' => FALSE,
  );
  $options['break_phrase'] = array(
    'default' => FALSE,
  );
  if (!empty($this->definition['many to one'])) {
    $options['add_table'] = array(
      'default' => FALSE,
    );
    $options['require_value'] = array(
      'default' => FALSE,
    );
  }
  return $options;
}