public function WidgetBaseInterface::submit

Extracts field values from submitted form values.

Parameters

Drupal\Core\Entity\EntityInterface $entity: The entity for which the widget is being submitted.

string $langcode: The language associated to $items.

array $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.

array $form_state: The form state.

1 method overrides WidgetBaseInterface::submit()
WidgetBase::submit in drupal/core/modules/field/lib/Drupal/field/Plugin/Type/Widget/WidgetBase.php
Implements Drupal\field\Plugin\Type\Widget\WidgetInterface::submit().

File

drupal/core/modules/field/lib/Drupal/field/Plugin/Type/Widget/WidgetBaseInterface.php, line 66
Definition of Drupal\field\Plugin\Type\Widget\WidgetBaseInterface.

Class

WidgetBaseInterface
Base interface definition for "Field widget" plugins.

Namespace

Drupal\field\Plugin\Type\Widget

Code

public function submit(EntityInterface $entity, $langcode, array &$items, array $form, array &$form_state);