You are here

protected function StylePluginBase::defineOptions in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/views/src/Plugin/views/style/StylePluginBase.php \Drupal\views\Plugin\views\style\StylePluginBase::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 PluginBase::defineOptions

9 calls to StylePluginBase::defineOptions()
DefaultSummary::defineOptions in core/modules/views/src/Plugin/views/style/DefaultSummary.php
Information about options for all kinds of purposes will be held here.
EntityReference::defineOptions in core/modules/views/src/Plugin/views/style/EntityReference.php
Information about options for all kinds of purposes will be held here.
Grid::defineOptions in core/modules/views/src/Plugin/views/style/Grid.php
Information about options for all kinds of purposes will be held here.
HtmlList::defineOptions in core/modules/views/src/Plugin/views/style/HtmlList.php
Set default options.
Mapping::defineOptions in core/modules/views/src/Plugin/views/style/Mapping.php
Information about options for all kinds of purposes will be held here.

... See full list

9 methods override StylePluginBase::defineOptions()
DefaultSummary::defineOptions in core/modules/views/src/Plugin/views/style/DefaultSummary.php
Information about options for all kinds of purposes will be held here.
EntityReference::defineOptions in core/modules/views/src/Plugin/views/style/EntityReference.php
Information about options for all kinds of purposes will be held here.
Grid::defineOptions in core/modules/views/src/Plugin/views/style/Grid.php
Information about options for all kinds of purposes will be held here.
HtmlList::defineOptions in core/modules/views/src/Plugin/views/style/HtmlList.php
Set default options.
Mapping::defineOptions in core/modules/views/src/Plugin/views/style/Mapping.php
Information about options for all kinds of purposes will be held here.

... See full list

File

core/modules/views/src/Plugin/views/style/StylePluginBase.php, line 259

Class

StylePluginBase
Base class for views style plugins.

Namespace

Drupal\views\Plugin\views\style

Code

protected function defineOptions() {
  $options = parent::defineOptions();
  $options['grouping'] = [
    'default' => [],
  ];
  if ($this
    ->usesRowClass()) {
    $options['row_class'] = [
      'default' => '',
    ];
    $options['default_row_class'] = [
      'default' => TRUE,
    ];
  }
  $options['uses_fields'] = [
    'default' => FALSE,
  ];
  return $options;
}