You are here

public static function WidgetSubmit::attach in Inline Entity Form 8

Attaches the widget submit functionality to the given form.

Parameters

array $form: The form.

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

1 call to WidgetSubmit::attach()
inline_entity_form_form_alter in ./inline_entity_form.module
Implements hook_form_alter().

File

src/WidgetSubmit.php, line 25

Class

WidgetSubmit
Performs widget submission.

Namespace

Drupal\inline_entity_form

Code

public static function attach(&$form, FormStateInterface $form_state) {

  // $form['#ief_element_submit'] runs after the #ief_element_submit
  // callbacks of all subelements, which means that doSubmit() has
  // access to the final IEF $form_state.
  $form['#ief_element_submit'][] = [
    get_called_class(),
    'doSubmit',
  ];
}