You are here

public static function InlineEntityFormComplex::addSubmitCallbacks in Inline Entity Form 8

Add common submit callback functions and mark element as a IEF trigger.

Parameters

$element:

2 calls to InlineEntityFormComplex::addSubmitCallbacks()
InlineEntityFormComplex::buildEntityFormActions in src/Plugin/Field/FieldWidget/InlineEntityFormComplex.php
Adds actions to the inline entity form.
inline_entity_form_reference_form in ./inline_entity_form.module
Provides the form for adding existing entities through an autocomplete field.

File

src/Plugin/Field/FieldWidget/InlineEntityFormComplex.php, line 979

Class

InlineEntityFormComplex
Complex inline widget.

Namespace

Drupal\inline_entity_form\Plugin\Field\FieldWidget

Code

public static function addSubmitCallbacks(&$element) {
  $element['#submit'] = [
    [
      '\\Drupal\\inline_entity_form\\ElementSubmit',
      'trigger',
    ],
    [
      '\\Drupal\\inline_entity_form\\Plugin\\Field\\FieldWidget\\InlineEntityFormComplex',
      'closeForm',
    ],
  ];
  $element['#ief_submit_trigger'] = TRUE;
}