public function PanelsIPEPageController::getLayoutForm in Panels 8.3
Same name and namespace in other branches
- 8.4 panels_ipe/src/Controller/PanelsIPEPageController.php \Drupal\panels_ipe\Controller\PanelsIPEPageController::getLayoutForm()
Gets a layout configuration form for the requested layout.
Parameters
string $panels_storage_type: The id of the storage plugin.
string $panels_storage_id: The id within the storage plugin for the requested Panels display.
string $layout_id: The machine name of the requested layout.
Return value
\Drupal\Core\Ajax\AjaxResponse
1 string reference to 'PanelsIPEPageController::getLayoutForm'
- panels_ipe.routing.yml in panels_ipe/
panels_ipe.routing.yml - panels_ipe/panels_ipe.routing.yml
File
- panels_ipe/
src/ Controller/ PanelsIPEPageController.php, line 203
Class
- PanelsIPEPageController
- Contains all JSON endpoints required for Panels IPE + Page Manager.
Namespace
Drupal\panels_ipe\ControllerCode
public function getLayoutForm($panels_storage_type, $panels_storage_id, $layout_id) {
$panels_display = $this
->loadPanelsDisplay($panels_storage_type, $panels_storage_id);
// Build a Block Plugin configuration form.
$form = $this
->formBuilder()
->getForm('Drupal\\panels_ipe\\Form\\PanelsIPELayoutForm', $layout_id, $panels_display);
// Return the rendered form as a proper Drupal AJAX response.
$response = new AjaxResponse();
$command = new AppendCommand('.ipe-layout-form', $form);
$response
->addCommand($command);
return $response;
}