function LayoutBuilderWidget::extractFormValues

Same name in other branches
  1. 9 core/modules/layout_builder/src/Plugin/Field/FieldWidget/LayoutBuilderWidget.php \Drupal\layout_builder\Plugin\Field\FieldWidget\LayoutBuilderWidget::extractFormValues()
  2. 10 core/modules/layout_builder/src/Plugin/Field/FieldWidget/LayoutBuilderWidget.php \Drupal\layout_builder\Plugin\Field\FieldWidget\LayoutBuilderWidget::extractFormValues()
  3. 11.x core/modules/layout_builder/src/Plugin/Field/FieldWidget/LayoutBuilderWidget.php \Drupal\layout_builder\Plugin\Field\FieldWidget\LayoutBuilderWidget::extractFormValues()

Overrides WidgetBase::extractFormValues

File

core/modules/layout_builder/src/Plugin/Field/FieldWidget/LayoutBuilderWidget.php, line 56

Class

LayoutBuilderWidget
A widget to display the layout form.

Namespace

Drupal\layout_builder\Plugin\Field\FieldWidget

Code

public function extractFormValues(FieldItemListInterface $items, array $form, FormStateInterface $form_state) {
    // @todo This isn't resilient to being set twice, during validation and
    //   save https://www.drupal.org/project/drupal/issues/2833682.
    if (!$form_state->isValidationComplete()) {
        return;
    }
    $items->setValue($this->getSectionStorage($form_state)
        ->getSections());
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.