function FilterPluginBase::addGroupForm
Same name in other branches
- 9 core/modules/views/src/Plugin/views/filter/FilterPluginBase.php \Drupal\views\Plugin\views\filter\FilterPluginBase::addGroupForm()
- 8.9.x core/modules/views/src/Plugin/views/filter/FilterPluginBase.php \Drupal\views\Plugin\views\filter\FilterPluginBase::addGroupForm()
- 11.x core/modules/views/src/Plugin/views/filter/FilterPluginBase.php \Drupal\views\Plugin\views\filter\FilterPluginBase::addGroupForm()
Add a new group to the exposed filter groups.
File
-
core/
modules/ views/ src/ Plugin/ views/ filter/ FilterPluginBase.php, line 1257
Class
- FilterPluginBase
- Base class for Views filters handler plugins.
Namespace
Drupal\views\Plugin\views\filterCode
public function addGroupForm($form, FormStateInterface $form_state) {
$item =& $this->options;
// Add a new row.
$item['group_info']['group_items'][] = [];
$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->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.