public function EntityBundle::buildOptionsForm in Commerce Core 8.2
Same name in this branch
- 8.2 src/Plugin/views/filter/EntityBundle.php \Drupal\commerce\Plugin\views\filter\EntityBundle::buildOptionsForm()
- 8.2 src/Plugin/views/field/EntityBundle.php \Drupal\commerce\Plugin\views\field\EntityBundle::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/ EntityBundle.php, line 42
Class
- EntityBundle
- Filters by entity bundle.
Namespace
Drupal\commerce\Plugin\views\filterCode
public function buildOptionsForm(&$form, FormStateInterface $form_state) {
parent::buildOptionsForm($form, $form_state);
$form['expose']['hide_single_bundle'] = [
'#type' => 'checkbox',
'#title' => $this
->t("Hide if there's only one bundle."),
'#default_value' => $this->options['expose']['hide_single_bundle'],
];
}