'inline_entity_form', '#entity_type' => 'node', '#bundle' => 'ief_test_custom', '#default_value' => $node, '#form_mode' => $form_mode, ]; $form['submit'] = [ '#type' => 'submit', '#value' => t('Update'), ]; return $form; } /** * {@inheritdoc} */ public function submitForm(array &$form, FormStateInterface $form_state) { $entity = $form['inline_entity_form']['#entity']; drupal_set_message(t('Created @entity_type @label.', ['@entity_type' => $entity->getEntityType()->getLabel(), '@label' => $entity->label()])); } }