You are here

protected function ArgumentPluginBase::defineOptions in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php \Drupal\views\Plugin\views\argument\ArgumentPluginBase::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 HandlerBase::defineOptions

5 calls to ArgumentPluginBase::defineOptions()
IndexTidDepth::defineOptions in core/modules/taxonomy/src/Plugin/views/argument/IndexTidDepth.php
Information about options for all kinds of purposes will be held here.
ManyToOne::defineOptions in core/modules/views/src/Plugin/views/argument/ManyToOne.php
Information about options for all kinds of purposes will be held here.
NullArgument::defineOptions in core/modules/views/src/Plugin/views/argument/NullArgument.php
Information about options for all kinds of purposes will be held here.
NumericArgument::defineOptions in core/modules/views/src/Plugin/views/argument/NumericArgument.php
Information about options for all kinds of purposes will be held here.
StringArgument::defineOptions in core/modules/views/src/Plugin/views/argument/StringArgument.php
Information about options for all kinds of purposes will be held here.
5 methods override ArgumentPluginBase::defineOptions()
IndexTidDepth::defineOptions in core/modules/taxonomy/src/Plugin/views/argument/IndexTidDepth.php
Information about options for all kinds of purposes will be held here.
ManyToOne::defineOptions in core/modules/views/src/Plugin/views/argument/ManyToOne.php
Information about options for all kinds of purposes will be held here.
NullArgument::defineOptions in core/modules/views/src/Plugin/views/argument/NullArgument.php
Information about options for all kinds of purposes will be held here.
NumericArgument::defineOptions in core/modules/views/src/Plugin/views/argument/NumericArgument.php
Information about options for all kinds of purposes will be held here.
StringArgument::defineOptions in core/modules/views/src/Plugin/views/argument/StringArgument.php
Information about options for all kinds of purposes will be held here.

File

core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php, line 116

Class

ArgumentPluginBase
Base class for argument (contextual filter) handler plugins.

Namespace

Drupal\views\Plugin\views\argument

Code

protected function defineOptions() {
  $options = parent::defineOptions();
  $options['default_action'] = [
    'default' => 'ignore',
  ];
  $options['exception'] = [
    'contains' => [
      'value' => [
        'default' => 'all',
      ],
      'title_enable' => [
        'default' => FALSE,
      ],
      'title' => [
        'default' => 'All',
      ],
    ],
  ];
  $options['title_enable'] = [
    'default' => FALSE,
  ];
  $options['title'] = [
    'default' => '',
  ];
  $options['default_argument_type'] = [
    'default' => 'fixed',
  ];
  $options['default_argument_options'] = [
    'default' => [],
  ];
  $options['default_argument_skip_url'] = [
    'default' => FALSE,
  ];
  $options['summary_options'] = [
    'default' => [],
  ];
  $options['summary'] = [
    'contains' => [
      'sort_order' => [
        'default' => 'asc',
      ],
      'number_of_records' => [
        'default' => 0,
      ],
      'format' => [
        'default' => 'default_summary',
      ],
    ],
  ];
  $options['specify_validation'] = [
    'default' => FALSE,
  ];
  $options['validate'] = [
    'contains' => [
      'type' => [
        'default' => 'none',
      ],
      'fail' => [
        'default' => 'not found',
      ],
    ],
  ];
  $options['validate_options'] = [
    'default' => [],
  ];
  return $options;
}