You are here

protected function LanguageHierarchySort::defineOptions in Language Hierarchy 2.x

Information about options for all kinds of purposes will be held here.


'option_name' => array(
 - 'default' => default value,
 - 'contains' => (optional) array of items this contains, with its own
     defaults, etc. If contains is set, the default will be ignored and
     assumed to be array().
 ),

Return value

array Returns the options of this handler/plugin.

Overrides SortPluginBase::defineOptions

File

src/Plugin/views/sort/LanguageHierarchySort.php, line 52

Class

LanguageHierarchySort
Provides sorting by language relevance based on language_hierarchy.

Namespace

Drupal\language_hierarchy\Plugin\views\sort

Code

protected function defineOptions() {
  $options = parent::defineOptions();
  $options['order'] = [
    'default' => 'DESC',
  ];
  return $options;
}