public static function ParagraphsBrowserForm::addMoreAjax in Paragraphs Browser 8
File
- src/
Form/ ParagraphsBrowserForm.php, line 268 - Contains \Drupal\paragraphs_browser\Form\ParagraphsBrowserForm.
Class
- ParagraphsBrowserForm
- Class CleanupUrlAliases.
Namespace
Drupal\paragraphs_browser\FormCode
public static function addMoreAjax(array $form, FormStateInterface $form_state) {
$build_info = $form_state
->getBuildInfo();
$uuid = $build_info['uuid'];
$response = new AjaxResponse();
$command = new AddParagraphTypeCommand($uuid, $form_state
->getTriggeringElement()['#bundle_machine_name']);
$response
->addCommand($command);
// return $element;
$command = new CloseModalDialogCommand();
$response
->addCommand($command);
return $response;
}