WIP Adapt new teaser layout
This commit is contained in:
@@ -43,7 +43,7 @@ class ProductViewHelper extends AbstractViewHelper
|
||||
{
|
||||
parent::initializeArguments();
|
||||
|
||||
$this->registerArgument('product', 'array', 'The product');
|
||||
$this->registerArgument('product', 'mixed', 'The product');
|
||||
$this->registerArgument('hotel', 'array', 'The hotel');
|
||||
$this->registerArgument('dateFrom', 'string', 'Date to limit table on detail page by (Y-m-d)');
|
||||
$this->registerArgument('dateTo', 'string', 'Date to limit table on detail page by (Y-m-d)');
|
||||
@@ -70,8 +70,8 @@ class ProductViewHelper extends AbstractViewHelper
|
||||
|
||||
if ($arguments['forceHotelUid']) {
|
||||
$linkArguments = [
|
||||
'product' => $product['uid'],
|
||||
'hotel' => $hotel['uid'],
|
||||
'product' => is_array($product) ? $product['uid'] : $product,
|
||||
'hotel' => is_array($hotel) ? $hotel['uid'] : $hotel,
|
||||
];
|
||||
} elseif ($arguments['dateFrom'] || $arguments['dateTo']) {
|
||||
$linkArguments = [
|
||||
@@ -81,11 +81,12 @@ class ProductViewHelper extends AbstractViewHelper
|
||||
}
|
||||
|
||||
if (null !== $linkArguments) {
|
||||
$targetPageUid = is_array($product) ? $product['detailPage'] : $product->getDetailPage();
|
||||
$uri = $renderingContext
|
||||
->getControllerContext()
|
||||
->getUriBuilder()
|
||||
->reset()
|
||||
->setTargetPageUid($product['detailPage'])
|
||||
->setTargetPageUid($targetPageUid)
|
||||
->uriFor('detail', $linkArguments, 'Product', 'epproducts', 'product_detail')
|
||||
;
|
||||
} else {
|
||||
@@ -93,7 +94,7 @@ class ProductViewHelper extends AbstractViewHelper
|
||||
$contentObject = GeneralUtility::makeInstance(ContentObjectRenderer::class);
|
||||
$uri = $contentObject->typoLink_URL(
|
||||
[
|
||||
'parameter' => $product['detailPage'],
|
||||
'parameter' => is_array($product) ? $product['detailPage'] : $product->getUid(),
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user