You are here

public function PcaAddressFieldWidgetTrait::buildFieldWidgetsettingsForm in Loqate 8

Same name and namespace in other branches
  1. 2.x src/PcaAddressFieldWidgetTrait.php \Drupal\loqate\PcaAddressFieldWidgetTrait::buildFieldWidgetsettingsForm()

Get widget settings form.

2 calls to PcaAddressFieldWidgetTrait::buildFieldWidgetsettingsForm()
AddressPcaAddressWidget::settingsForm in modules/pca_address/src/Plugin/Field/FieldWidget/AddressPcaAddressWidget.php
Returns a form to configure settings for the widget.
LoqatePcaAddressDefaultWidget::settingsForm in src/Plugin/Field/FieldWidget/LoqatePcaAddressDefaultWidget.php
Returns a form to configure settings for the widget.

File

src/PcaAddressFieldWidgetTrait.php, line 30

Class

PcaAddressFieldWidgetTrait
Class PcaAddressFieldWidgetTrait.

Namespace

Drupal\loqate

Code

public function buildFieldWidgetsettingsForm(array $form) {
  $form['show_address_fields'] = [
    '#type' => 'checkbox',
    '#title' => $this
      ->t('Show address fields'),
    '#default_value' => $this
      ->getSetting('show_address_fields'),
  ];
  $form['allow_manual_input'] = [
    '#type' => 'checkbox',
    '#title' => $this
      ->t('Allow manual input'),
    '#default_value' => $this
      ->getSetting('allow_manual_input'),
  ];
  $form['loqate_api_key'] = [
    '#type' => 'key_select',
    '#title' => $this
      ->t('Loqate API key'),
    '#default_value' => $this
      ->getSetting('loqate_api_key'),
  ];
  return $form;
}