function SortPluginBase::adminSummary
Display whether or not the sort order is ascending or descending.
Overrides HandlerBase::adminSummary
File
-
core/
modules/ views/ src/ Plugin/ views/ sort/ SortPluginBase.php, line 61
Class
- SortPluginBase
- Base sort handler that has no options and performs a simple sort.
Namespace
Drupal\views\Plugin\views\sortCode
public function adminSummary() {
if (!empty($this->options['exposed'])) {
return $this->t('Exposed');
}
switch ($this->options['order']) {
case 'ASC':
case 'asc':
default:
return $this->t('asc');
case 'DESC':
case 'desc':
return $this->t('desc');
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.