public function BlockWithPreview::buildPreview in Panopoly 8.2
Builds render array for block preview.
Like BlockPluginInterface::build() but for preview.
Return value
array Render array of block preview content.
Overrides BlockPreviewInterface::buildPreview
File
- modules/
panopoly/ panopoly_magic/ tests/ modules/ panopoly_magic_preview_test/ src/ Plugin/ Block/ BlockWithPreview.php, line 31
Class
- BlockWithPreview
- A block that uses an image preview.
Namespace
Drupal\panopoly_magic_preview_test\Plugin\BlockCode
public function buildPreview() {
return [
'#markup' => $this
->t("BlockWithPreview: preview block content"),
];
}