public static function InlineEntityForm::submitEntityForm in Inline Entity Form 8
Handles the submission of the entity form using the inline form handler.
Parameters
array $entity_form: The entity form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
File
- src/
Element/ InlineEntityForm.php, line 178
Class
- InlineEntityForm
- Provides an inline entity form element.
Namespace
Drupal\inline_entity_form\ElementCode
public static function submitEntityForm(&$entity_form, FormStateInterface $form_state) {
$inline_form_handler = static::getInlineFormHandler($entity_form['#entity_type']);
$inline_form_handler
->entityFormSubmit($entity_form, $form_state);
if ($entity_form['#save_entity']) {
$inline_form_handler
->save($entity_form['#entity']);
}
}