You are here

protected function SortPluginBase::sortOptions in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/views/src/Plugin/views/sort/SortPluginBase.php \Drupal\views\Plugin\views\sort\SortPluginBase::sortOptions()
  2. 10 core/modules/views/src/Plugin/views/sort/SortPluginBase.php \Drupal\views\Plugin\views\sort\SortPluginBase::sortOptions()

Provide a list of options for the default sort form. Should be overridden by classes that don't override sort_form

1 call to SortPluginBase::sortOptions()
SortPluginBase::showSortForm in core/modules/views/src/Plugin/views/sort/SortPluginBase.php
Shortcut to display the value form.

File

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

Class

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

Namespace

Drupal\views\Plugin\views\sort

Code

protected function sortOptions() {
  return [
    'ASC' => $this
      ->t('Sort ascending'),
    'DESC' => $this
      ->t('Sort descending'),
  ];
}