function SortPluginBase::defineOptions

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

Overrides HandlerBase::defineOptions

1 call to SortPluginBase::defineOptions()
Date::defineOptions in core/modules/views/src/Plugin/views/sort/Date.php
1 method overrides SortPluginBase::defineOptions()
Date::defineOptions in core/modules/views/src/Plugin/views/sort/Date.php

File

core/modules/views/src/Plugin/views/sort/SortPluginBase.php, line 44

Class

SortPluginBase
Base sort handler that has no options and performs a simple sort.

Namespace

Drupal\views\Plugin\views\sort

Code

protected function defineOptions() {
    $options = parent::defineOptions();
    $options['order'] = [
        'default' => 'ASC',
    ];
    $options['exposed'] = [
        'default' => FALSE,
    ];
    $options['expose'] = [
        'contains' => [
            'label' => [
                'default' => '',
            ],
            'field_identifier' => [
                'default' => '',
            ],
        ],
    ];
    return $options;
}

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