You are here

abstract protected function WebformEntityReferenceWidgetTrait::getTargetIdElement in Webform 6.x

Same name and namespace in other branches
  1. 8.5 src/Plugin/Field/FieldWidget/WebformEntityReferenceWidgetTrait.php \Drupal\webform\Plugin\Field\FieldWidget\WebformEntityReferenceWidgetTrait::getTargetIdElement()

Returns the target id element form for a single webform field widget.

Parameters

\Drupal\Core\Field\FieldItemListInterface $items: Array of default values for this field.

int $delta: The order of this item in the array of sub-elements (0, 1, 2, etc.).

array $element: A form element array containing basic properties for the widget.

array $form: The form structure where widgets are being attached to. This might be a full form structure, or a sub-element of a larger form.

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.

Return value

array The form elements for a single widget for this field.

1 call to WebformEntityReferenceWidgetTrait::getTargetIdElement()
WebformEntityReferenceWidgetTrait::formElement in src/Plugin/Field/FieldWidget/WebformEntityReferenceWidgetTrait.php
2 methods override WebformEntityReferenceWidgetTrait::getTargetIdElement()
WebformEntityReferenceAutocompleteWidget::getTargetIdElement in src/Plugin/Field/FieldWidget/WebformEntityReferenceAutocompleteWidget.php
Returns the target id element form for a single webform field widget.
WebformEntityReferenceSelectWidget::getTargetIdElement in src/Plugin/Field/FieldWidget/WebformEntityReferenceSelectWidget.php
Returns the target id element form for a single webform field widget.

File

src/Plugin/Field/FieldWidget/WebformEntityReferenceWidgetTrait.php, line 110

Class

WebformEntityReferenceWidgetTrait
Trait for webform entity reference and autocomplete widget.

Namespace

Drupal\webform\Plugin\Field\FieldWidget

Code

protected abstract function getTargetIdElement(FieldItemListInterface $items, $delta, array $element, array &$form, FormStateInterface $form_state);