You are here

public function DynamicLayoutController::openEditColumnModalForm in Dynamic Layouts 8

Callback for opening the edit column modal form.

1 string reference to 'DynamicLayoutController::openEditColumnModalForm'
dynamic_layouts.routing.yml in ./dynamic_layouts.routing.yml
dynamic_layouts.routing.yml

File

src/Controller/DynamicLayoutController.php, line 217

Class

DynamicLayoutController
DynamicLayoutController class.

Namespace

Drupal\dynamic_layouts\Controller

Code

public function openEditColumnModalForm() {
  $response = new AjaxResponse();

  // Get the modal form using the form builder.
  $modal_form = $this->formBuilder
    ->getForm('Drupal\\dynamic_layouts\\Form\\EditColumnModalForm');

  // Add an AJAX command to open a modal dialog with the form as the content.
  $response
    ->addCommand(new OpenModalDialogCommand('Edit column', $modal_form, [
    'width' => '800',
  ]));
  return $response;
}