public static function InlineEntityFormComplex::closeChildForms in Inline Entity Form 8
Button #submit callback: Closes all open child forms in the IEF widget.
Used to ensure that forms in nested IEF widgets are properly closed when a parent IEF's form gets submitted or cancelled.
Parameters
$form: The IEF Form element.
\Drupal\Core\Form\FormStateInterface $form_state: The form state of the parent form.
File
- src/
Plugin/ Field/ FieldWidget/ InlineEntityFormComplex.php, line 998
Class
- InlineEntityFormComplex
- Complex inline widget.
Namespace
Drupal\inline_entity_form\Plugin\Field\FieldWidgetCode
public static function closeChildForms($form, FormStateInterface &$form_state) {
$element = inline_entity_form_get_element($form, $form_state);
inline_entity_form_close_all_forms($element, $form_state);
}