public function BlockWithPreview::buildPreview in Panopoly Magic 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
- 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"),
];
}