Add backend preview renderer for booking link teaser

This commit is contained in:
Björn Fromme
2021-09-30 17:27:38 +02:00
parent 94520a76c2
commit f319a0450c
3 changed files with 46 additions and 0 deletions
@@ -0,0 +1,21 @@
<?php
namespace EP\EpTheme\Hooks\PageLayoutView;
use TYPO3\CMS\Backend\Utility\BackendUtility;
class TeaserBookingLinkPreviewRenderer extends AbstractPreviewRenderer
{
protected $cType = 'teaser_booking_link';
protected function getAssignmentsForTemplate(): array
{
$productUid = $this->data['tx_eptheme_context_product'];
$images = $this->getImages($productUid, 'tx_epproducts_domain_model_product', 'teaser_images');
$product = BackendUtility::getRecord('tx_epproducts_domain_model_product', $productUid);
return [
'images' => $images,
'product' => $product,
];
}
}