function FilterPluginBase::buildGroupForm
Same name in other branches
- 9 core/modules/views/src/Plugin/views/filter/FilterPluginBase.php \Drupal\views\Plugin\views\filter\FilterPluginBase::buildGroupForm()
- 8.9.x core/modules/views/src/Plugin/views/filter/FilterPluginBase.php \Drupal\views\Plugin\views\filter\FilterPluginBase::buildGroupForm()
- 11.x core/modules/views/src/Plugin/views/filter/FilterPluginBase.php \Drupal\views\Plugin\views\filter\FilterPluginBase::buildGroupForm()
Displays the Build Group form.
File
-
core/
modules/ views/ src/ Plugin/ views/ filter/ FilterPluginBase.php, line 472
Class
- FilterPluginBase
- Base class for Views filters handler plugins.
Namespace
Drupal\views\Plugin\views\filterCode
public function buildGroupForm($form, FormStateInterface $form_state) {
$item =& $this->options;
// flip. If the filter was a group, set back to a standard filter.
$item['is_grouped'] = empty($item['is_grouped']);
// If necessary, set new defaults:
if ($item['is_grouped']) {
$this->buildGroupOptions();
}
$view = $form_state->get('view');
$display_id = $form_state->get('display_id');
$type = $form_state->get('type');
$id = $form_state->get('id');
$view->getExecutable()
->setHandler($display_id, $type, $id, $item);
$view->addFormToStack($form_state->get('form_key'), $display_id, $type, $id, TRUE, TRUE);
$view->cacheSet();
$form_state->set('rerender', TRUE);
$form_state->setRebuild();
$form_state->get('force_build_group_options', TRUE);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.