public function DynamicLayoutController::openEditRowModalForm in Dynamic Layouts 8
Callback for opening the modal form.
1 string reference to 'DynamicLayoutController::openEditRowModalForm'
File
- src/
Controller/ DynamicLayoutController.php, line 232
Class
- DynamicLayoutController
- DynamicLayoutController class.
Namespace
Drupal\dynamic_layouts\ControllerCode
public function openEditRowModalForm() {
$response = new AjaxResponse();
// Get the modal form using the form builder.
$modal_form = $this->formBuilder
->getForm('Drupal\\dynamic_layouts\\Form\\EditRowModalForm');
// Add an AJAX command to open a modal dialog with the form as the content.
$response
->addCommand(new OpenModalDialogCommand('Edit row', $modal_form, [
'width' => '800',
]));
return $response;
}