public function CountryItem::buildOptionsForm in Country 8
Same name in this branch
- 8 src/Plugin/views/filter/CountryItem.php \Drupal\country\Plugin\views\filter\CountryItem::buildOptionsForm()
- 8 src/Plugin/views/sort/CountryItem.php \Drupal\country\Plugin\views\sort\CountryItem::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/ CountryItem.php, line 91
Class
- CountryItem
- Filter by country ISO2.
Namespace
Drupal\country\Plugin\views\filterCode
public function buildOptionsForm(&$form, FormStateInterface $form_state) {
parent::buildOptionsForm($form, $form_state);
$options = $this
->getAvailableBundleInfo();
$form['country_target_bundle'] = [
'#type' => 'radios',
'#title' => $this
->t('Target entity bundle to filter by'),
'#options' => $options,
'#default_value' => $this->options['country_target_bundle'],
'#weight' => -1,
];
return $form;
}