Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ajaxResponse = new \Drupal\Core\Ajax\AjaxResponse();
- $my_form = \Drupal::formBuilder()->getForm('Drupal\my_module\Form\DefaultSettingsForm');
- $render = \Drupal::service('renderer')->render($my_form);
- $modalDialog = new \Drupal\Core\Ajax\OpenModalDialogCommand('My Title', $render);
- $ajaxResponse->addCommand($modalDialog);
- return $ajaxResponse;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement