protected function Selective::defineOptions in Views Selective Filters 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 InOperator::defineOptions
File
- src/
Plugin/ views/ filter/ Selective.php, line 48
Class
- Selective
- Views filter handler for selective values.
Namespace
Drupal\views_selective_filters\Plugin\views\filterCode
protected function defineOptions() {
$options = parent::defineOptions();
// Storage for field used to display values.
$options['selective_display_field']['default'] = '';
// Storage for sort used to sort display values.
$options['selective_display_sort']['default'] = 'ASC';
// Storage for aggregated fields.
$options['selective_aggregated_fields']['default'] = '';
// Limit aggregated items to prevent a huge number of options in select.
$options['selective_items_limit']['default'] = 100;
return $options;
}