You are here

protected function Natural::sortOptions in Views Natural Sort 8.2

Provide a list of options for the default sort form. Should be overridden by classes that don't override sort_form

Overrides SortPluginBase::sortOptions

File

src/Plugin/views/sort/Natural.php, line 86

Class

Natural
Sort plugin used to allow Natural Sorting.

Namespace

Drupal\views_natural_sort\Plugin\views\sort

Code

protected function sortOptions() {
  $options = parent::sortOptions();
  $options['NASC'] = $this
    ->t('Sort ascending naturally');
  $options['NDESC'] = $this
    ->t('Sort descending naturally');
  return $options;
}