public function PanelsIPEPageController::getBlock in Panels 8.4
Same name and namespace in other branches
- 8.3 panels_ipe/src/Controller/PanelsIPEPageController.php \Drupal\panels_ipe\Controller\PanelsIPEPageController::getBlock()
Gets a single Block from the current Panels Display as JSON.
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 $block_uuid: The Block UUID.
Return value
\Symfony\Component\HttpFoundation\JsonResponse
1 string reference to 'PanelsIPEPageController::getBlock'
- 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 561
Class
- PanelsIPEPageController
- Contains all JSON endpoints required for Panels IPE + Page Manager.
Namespace
Drupal\panels_ipe\ControllerCode
public function getBlock($panels_storage_type, $panels_storage_id, $block_uuid) {
// Get the block model data.
$data = $this
->getBlockModelData($panels_storage_type, $panels_storage_id, $block_uuid);
// Return a structured JSON response for our Backbone App.
return new JsonResponse($data);
}