You are here

public function EntityInlineForm::entityFormSubmit in Inline Entity Form 8

Handles the submission of an entity form.

Parameters

array $entity_form: The entity form.

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

Overrides InlineFormInterface::entityFormSubmit

File

src/Form/EntityInlineForm.php, line 267

Class

EntityInlineForm
Generic entity inline form handler.

Namespace

Drupal\inline_entity_form\Form

Code

public function entityFormSubmit(array &$entity_form, FormStateInterface $form_state) {
  $form_state
    ->cleanValues();

  /** @var \Drupal\Core\Entity\ContentEntityInterface $entity */
  $entity = $entity_form['#entity'];
  $this
    ->buildEntity($entity_form, $entity, $form_state);
}