You are here

protected function ArgOrderSort::defineOptions in Views Argument Order Sort 8

Same name and namespace in other branches
  1. 2.x src/Plugin/views/sort/ArgOrderSort.php \Drupal\views_arg_order_sort\Plugin\views\sort\ArgOrderSort::defineOptions()

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/ArgOrderSort.php, line 19

Class

ArgOrderSort
Handle a random sort.

Namespace

Drupal\views_arg_order_sort\Plugin\views\sort

Code

protected function defineOptions() {
  $options = parent::defineOptions();
  $options['inherit_type'] = [
    'default' => 1,
  ];
  $options['null_below'] = [
    'default' => 1,
  ];
  $options['argument_number'] = [
    'default' => 0,
  ];
  $options['field_type'] = [
    'default' => 'node::nid',
  ];
  return $options;
}