You are here

protected function ExpressionSort::defineOptions in Views Sort Expression 8

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/ExpressionSort.php, line 23

Class

ExpressionSort
Allows to use any SQL expression

Namespace

Drupal\views_sort_expression\Plugin\views\sort

Code

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