Commit bff26642 authored by Georg Ringer's avatar Georg Ringer Committed by Oliver Hader
Browse files

[BUGFIX] Initialize more properties of PageLayoutView

With #78450 the StandardContentPreviewRenderer creates an instance of
the  `PageLayoutView` to keep the existing hooks alive.
However 2 more properties need to be filled to improve the
compatibility.

Resolves: #90528
Releases: master

Change-Id: I0c56988bdc9d524f1cfa411ae0c62d00ad1789dd
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/63408

Reviewed-by: Claus Due's avatarClaus Due <claus@phpmind.net>
Reviewed-by: Susanne Moog's avatarSusanne Moog <look@susi.dev>
Reviewed-by: default avatarChristian Eßl <indy.essl@gmail.com>
Reviewed-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
Reviewed-by: Oliver Hader's avatarOliver Hader <oliver.hader@typo3.org>
Tested-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
Tested-by: Susanne Moog's avatarSusanne Moog <look@susi.dev>
Tested-by: Oliver Hader's avatarOliver Hader <oliver.hader@typo3.org>
parent 6fa665dc
......@@ -419,6 +419,8 @@ class StandardContentPreviewRenderer implements PreviewRendererInterface, Logger
protected function createEmulatedPageLayoutViewFromDrawingConfiguration(DrawingConfiguration $drawingConfiguration): PageLayoutView
{
$pageLayoutView = GeneralUtility::makeInstance(PageLayoutView::class);
$pageLayoutView->id = $drawingConfiguration->getPageId();
$pageLayoutView->pageRecord = $drawingConfiguration->getPageRecord();
$pageLayoutView->option_newWizard = $drawingConfiguration->getShowNewContentWizard();
$pageLayoutView->defLangBinding = $drawingConfiguration->getDefaultLanguageBinding();
$pageLayoutView->tt_contentConfig['cols'] = implode(',', $drawingConfiguration->getActiveColumns());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment