if ($display->getComponent('item_approvement_table')) { $form = \Drupal::classResolver()->getInstanceFromDefinition(PaymentRequestItemsApprovementForm::class); $form->setPaymentRequest($entity); $form_state = new FormState(); $form_array = \Drupal::formBuilder()->buildForm($form, $form_state); $form_array['#current_tab_redirect'] = TRUE; $build['item_approvement_table'] = $form_array; }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter