public function Section::buildOptionsForm in Workbench Access 8
Same name in this branch
- 8 src/Plugin/views/filter/Section.php \Drupal\workbench_access\Plugin\views\filter\Section::buildOptionsForm()
- 8 src/Plugin/views/field/Section.php \Drupal\workbench_access\Plugin\views\field\Section::buildOptionsForm()
Provide the basic form which calls through to subforms. If overridden, it is best to call through to the parent, or to at least make sure all of the functions in this form are called.
Overrides FilterPluginBase::buildOptionsForm
File
- src/
Plugin/ views/ filter/ Section.php, line 198
Class
- Section
- Filter by assigned section.
Namespace
Drupal\workbench_access\Plugin\views\filterCode
public function buildOptionsForm(&$form, FormStateInterface $form_state) {
parent::buildOptionsForm($form, $form_state);
$form['section_filter']['show_hierarchy'] = [
'#type' => 'checkbox',
'#title' => $this
->t('Show children'),
'#default_value' => !empty($this->options['section_filter']['show_hierarchy']),
'#description' => $this
->t('If checked, the filter will return the selected item and all its children.'),
];
}