You are here

public function InlineParagraphsWidget::extractFormValues in Paragraphs 8

Extracts field values from submitted form values.

Parameters

\Drupal\Core\Field\FieldItemListInterface $items: The field values. This parameter is altered by reference to receive the incoming form values.

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

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

Overrides WidgetBase::extractFormValues

File

src/Plugin/Field/FieldWidget/InlineParagraphsWidget.php, line 1351

Class

InlineParagraphsWidget
Plugin implementation of the 'entity_reference paragraphs' widget.

Namespace

Drupal\paragraphs\Plugin\Field\FieldWidget

Code

public function extractFormValues(FieldItemListInterface $items, array $form, FormStateInterface $form_state) {

  // Filter possible empty items.
  $items
    ->filterEmptyItems();
  return parent::extractFormValues($items, $form, $form_state);
}