function SortPluginBase::sortOptions
Same name in other branches
- 8.9.x core/modules/views/src/Plugin/views/sort/SortPluginBase.php \Drupal\views\Plugin\views\sort\SortPluginBase::sortOptions()
- 10 core/modules/views/src/Plugin/views/sort/SortPluginBase.php \Drupal\views\Plugin\views\sort\SortPluginBase::sortOptions()
- 11.x 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 190
Class
- SortPluginBase
- Base sort handler that has no options and performs a simple sort.
Namespace
Drupal\views\Plugin\views\sortCode
protected function sortOptions() {
return [
'ASC' => $this->t('Sort ascending'),
'DESC' => $this->t('Sort descending'),
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.