function inline_entity_form_open_row_form in Inline Entity Form 8
Same name and namespace in other branches
- 7 inline_entity_form.module \inline_entity_form_open_row_form()
Button #submit callback: Opens a row form in the IEF widget.
The row is identified by #ief_row_delta stored on the triggering element.
Parameters
$form: The complete parent form.
$form_state: The form state of the parent form.
1 string reference to 'inline_entity_form_open_row_form'
- InlineEntityFormComplex::formElement in src/
Plugin/ Field/ FieldWidget/ InlineEntityFormComplex.php - Returns the form for a single field widget.
File
- ./
inline_entity_form.module, line 248 - Provides a widget for inline management (creation, modification, removal) of referenced entities. The primary use case is the parent -> children one (for example, order -> line items), where the child entities are never managed outside the…
Code
function inline_entity_form_open_row_form($form, FormStateInterface $form_state) {
$element = inline_entity_form_get_element($form, $form_state);
$ief_id = $element['#ief_id'];
$delta = $form_state
->getTriggeringElement()['#ief_row_delta'];
$form_state
->setRebuild();
$form_state
->set([
'inline_entity_form',
$ief_id,
'entities',
$delta,
'form',
], $form_state
->getTriggeringElement()['#ief_row_form']);
}