You are here

public function SortPluginBase::adminSummary in Views (for Drupal 7) 8.3

Display whether or not the sort order is ascending or descending

Overrides HandlerBase::adminSummary

File

lib/Drupal/views/Plugin/views/sort/SortPluginBase.php, line 56
Definition of Drupal\views\Plugin\views\sort\SortPluginBase.

Class

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

Namespace

Drupal\views\Plugin\views\sort

Code

public function adminSummary() {
  if (!empty($this->options['exposed'])) {
    return t('Exposed');
  }
  switch ($this->options['order']) {
    case 'ASC':
    case 'asc':
    default:
      return t('asc');
      break;
    case 'DESC':
    case 'desc':
      return t('desc');
      break;
  }
}