You are here

protected function FlagViewsSortFlagged::sortOptions in Flag 8.4

Provide a list of options for the default sort form.

Should be overridden by classes that don't override sort_form.

Overrides SortPluginBase::sortOptions

1 call to FlagViewsSortFlagged::sortOptions()
FlagViewsSortFlagged::adminSummary in src/Plugin/views/sort/FlagViewsSortFlagged.php
Display whether or not the sort order is ascending or descending.

File

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

Class

FlagViewsSortFlagged
Sorts entities by flagged or unflagged in a view.

Namespace

Drupal\flag\Plugin\views\sort

Code

protected function sortOptions() {
  return [
    'ASC' => $this
      ->t('Unflagged first'),
    'DESC' => $this
      ->t('Flagged first'),
  ];
}