You are here

public function EditComponentForm::submitForm in Layout Paragraphs 2.0.x

Saves the paragraph component.

Parameters

array $form: The form array.

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

Overrides ComponentFormBase::submitForm

File

src/Form/EditComponentForm.php, line 125

Class

EditComponentForm
Class LayoutParagraphsComponentEditForm.

Namespace

Drupal\layout_paragraphs\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  parent::submitForm($form, $form_state);
  $this->layoutParagraphsLayout
    ->setComponent($this->paragraph);
  if ($form_state
    ->getValue([
    'layout_paragraphs',
    'move_items',
  ])) {
    $this
      ->moveItemsSubmit($form, $form_state);
  }
  $this->tempstore
    ->set($this->layoutParagraphsLayout);
}