public function Country::buildOptionsForm in Address 8
Same name in this branch
- 8 src/Plugin/views/sort/Country.php \Drupal\address\Plugin\views\sort\Country::buildOptionsForm()
 - 8 src/Plugin/views/field/Country.php \Drupal\address\Plugin\views\field\Country::buildOptionsForm()
 
Default options form that provides the label widget that all fields should have.
Overrides FieldPluginBase::buildOptionsForm
File
- src/
Plugin/ views/ field/ Country.php, line 70  
Class
- Country
 - Allows the country name to be displayed instead of the country code.
 
Namespace
Drupal\address\Plugin\views\fieldCode
public function buildOptionsForm(&$form, FormStateInterface $form_state) {
  $form['display_name'] = [
    '#type' => 'checkbox',
    '#title' => $this
      ->t('Display the country name instead of the country code'),
    '#default_value' => !empty($this->options['display_name']),
  ];
  parent::buildOptionsForm($form, $form_state);
}