Add backend preview renderer for booking link teaser
This commit is contained in:
+21
@@ -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,
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user