function StylePluginBase::defineOptions

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

Overrides PluginBase::defineOptions

10 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.
GridResponsive::defineOptions in core/modules/views/src/Plugin/views/style/GridResponsive.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.

... See full list

10 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.
GridResponsive::defineOptions in core/modules/views/src/Plugin/views/style/GridResponsive.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.

... See full list

File

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

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

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