You are here

protected function CountryItem::defineOptions in Country 8

Same name in this branch
  1. 8 src/Plugin/views/filter/CountryItem.php \Drupal\country\Plugin\views\filter\CountryItem::defineOptions()
  2. 8 src/Plugin/views/sort/CountryItem.php \Drupal\country\Plugin\views\sort\CountryItem::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/CountryItem.php, line 21

Class

CountryItem
Sort handler for country fields.

Namespace

Drupal\country\Plugin\views\sort

Code

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