You are here

public function CountryItem::buildExtraOptionsForm in Country 8

Provide a form for setting options.

Overrides HandlerBase::buildExtraOptionsForm

File

src/Plugin/views/filter/CountryItem.php, line 115

Class

CountryItem
Filter by country ISO2.

Namespace

Drupal\country\Plugin\views\filter

Code

public function buildExtraOptionsForm(&$form, FormStateInterface $form_state) {
  $form['type'] = [
    '#type' => 'radios',
    '#title' => $this
      ->t('Selection type'),
    '#options' => [
      'select' => $this
        ->t('Dropdown'),
      'textfield' => $this
        ->t('Autocomplete'),
    ],
    '#default_value' => $this->options['type'],
  ];
}