class AddressPcaAddressWidget in Loqate 2.x
Same name and namespace in other branches
- 8 modules/pca_address/src/Plugin/Field/FieldWidget/AddressPcaAddressWidget.php \Drupal\pca_address\Plugin\Field\FieldWidget\AddressPcaAddressWidget
Plugin implementation of the 'pca_address_advanced' widget.
Plugin annotation
@FieldWidget(
id = "pca_address_advanced",
label = @Translation("PCA address"),
field_types = {
"address"
},
)
Hierarchy
- class \Drupal\pca_address\Plugin\Field\FieldWidget\AddressPcaAddressWidget extends \Drupal\address\Plugin\Field\FieldWidget\AddressDefaultWidget uses PcaAddressFieldWidgetTrait
Expanded class hierarchy of AddressPcaAddressWidget
File
- modules/
pca_address/ src/ Plugin/ Field/ FieldWidget/ AddressPcaAddressWidget.php, line 21
Namespace
Drupal\pca_address\Plugin\Field\FieldWidgetView source
class AddressPcaAddressWidget extends AddressDefaultWidget {
use PcaAddressFieldWidgetTrait;
/**
* {@inheritdoc}
*/
public static function defaultSettings() {
return self::getFieldWidgetDefaultSettings() + parent::defaultSettings();
}
/**
* {@inheritdoc}
*/
public function settingsForm(array $form, FormStateInterface $form_state) {
return $this
->buildFieldWidgetsettingsForm(parent::settingsForm($form, $form_state));
}
/**
* {@inheritdoc}
*/
public function settingsSummary() {
return $this
->buildFieldWidgetSettingsSummary();
}
/**
* {@inheritdoc}
*/
public function formElement(FieldItemListInterface $items, $delta, array $element, array &$form, FormStateInterface $form_state) {
$element = parent::formElement($items, $delta, $element, $form, $form_state);
// Override to PCA address variant.
$element['address']['#type'] = 'pca_address_advanced';
return $this
->buildFieldWidgetFormElement($element);
}
}
Members
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
AddressPcaAddressWidget:: |
public static | function | ||
AddressPcaAddressWidget:: |
public | function | ||
AddressPcaAddressWidget:: |
public | function | ||
AddressPcaAddressWidget:: |
public | function | ||
PcaAddressFieldWidgetTrait:: |
public | function | ||
PcaAddressFieldWidgetTrait:: |
public | function | Get widget settings form. | |
PcaAddressFieldWidgetTrait:: |
public | function | Build the widget settings summary. | |
PcaAddressFieldWidgetTrait:: |
public static | function | Get the default settings for the field widget. |