You are here

public function FlagViewsSortFlagged::adminSummary in Flag 8.4

Display whether or not the sort order is ascending or descending.

Overrides SortPluginBase::adminSummary

File

src/Plugin/views/sort/FlagViewsSortFlagged.php, line 29

Class

FlagViewsSortFlagged
Sorts entities by flagged or unflagged in a view.

Namespace

Drupal\flag\Plugin\views\sort

Code

public function adminSummary() {
  if (!empty($this->options['exposed'])) {
    return $this
      ->t('Exposed');
  }

  // Get the labels defined in sortOptions().
  $sort_options = $this
    ->sortOptions();
  return $sort_options[strtoupper($this->options['order'])];
}