Skip to content

Commit

Permalink
[BUGFIX] Fix PreviewRenderer compatibility
Browse files Browse the repository at this point in the history
With commit TYPO3/typo3@8f07071 a new parameter $item was added to `StandardContentPreviewRenderer::renderContentElementPreviewFromFluidTemplate()`, which must now be taken into account in own PreviewRenders like `TtAddressPreviewRenderer` that extend `StandardContentPreviewRenderer`.
  • Loading branch information
ErHaWeb committed Jul 9, 2024
1 parent 06edeb5 commit 3e76a2b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Classes/FormEngine/TtAddressPreviewRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
use Doctrine\DBAL\Connection;
use TYPO3\CMS\Backend\Preview\StandardContentPreviewRenderer;
use TYPO3\CMS\Backend\Utility\BackendUtility;
use TYPO3\CMS\Backend\View\BackendLayout\Grid\GridColumnItem;
use TYPO3\CMS\Core\Database\ConnectionPool;
use TYPO3\CMS\Core\Database\Query\Restriction\HiddenRestriction;
use TYPO3\CMS\Core\Service\FlexFormService;
Expand Down Expand Up @@ -42,10 +43,10 @@ class TtAddressPreviewRenderer extends StandardContentPreviewRenderer
],
];

protected function renderContentElementPreviewFromFluidTemplate(array $row): ?string
protected function renderContentElementPreviewFromFluidTemplate(array $row, ?GridColumnItem $item = null): ?string
{
$row = $this->enrichRow($row);
return parent::renderContentElementPreviewFromFluidTemplate($row);
return parent::renderContentElementPreviewFromFluidTemplate($row, $item);
}

protected function enrichRow(array $row): array
Expand Down

0 comments on commit 3e76a2b

Please sign in to comment.