You are here

public function FilterPluginBase::groupMultipleExposedInput in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/views/src/Plugin/views/filter/FilterPluginBase.php \Drupal\views\Plugin\views\filter\FilterPluginBase::groupMultipleExposedInput()
  2. 10 core/modules/views/src/Plugin/views/filter/FilterPluginBase.php \Drupal\views\Plugin\views\filter\FilterPluginBase::groupMultipleExposedInput()

Returns the options available for a grouped filter that users checkboxes as widget, and therefore has to be applied several times, one per item selected.

File

core/modules/views/src/Plugin/views/filter/FilterPluginBase.php, line 1368

Class

FilterPluginBase
Base class for Views filters handler plugins.

Namespace

Drupal\views\Plugin\views\filter

Code

public function groupMultipleExposedInput(&$input) {
  if (!empty($input[$this->options['group_info']['identifier']])) {
    return array_filter($input[$this->options['group_info']['identifier']]);
  }
  return [];
}