Add preview renderers for custom content elements

This commit is contained in:
Björn Fromme
2021-09-27 18:26:56 +02:00
parent beb9fbae04
commit 0262738c91
26 changed files with 596 additions and 141 deletions
@@ -0,0 +1,6 @@
<?php
namespace EP\EpTheme\Exception;
class ConfigurationMissingException extends \Exception
{}
@@ -0,0 +1,6 @@
<?php
namespace EP\EpTheme\Exception;
class TemplateFileMissingException extends \Exception
{}
@@ -1,137 +0,0 @@
<?php
namespace EP\EpTheme\Hook;
/***************************************************************
*
* Copyright notice
*
* (c) 2016 Björn Fromme <[email protected]>, dreipunktnull
*
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
*
* This script is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
use TYPO3\CMS\Backend\Utility\BackendUtility;
use TYPO3\CMS\Backend\View\PageLayoutView as CorePageLayoutView;
use TYPO3\CMS\Backend\View\PageLayoutViewDrawItemHookInterface;
class PageLayoutView implements PageLayoutViewDrawItemHookInterface
{
/**
* @param CorePageLayoutView $parentObject
* @param bool $drawItem
* @param string $headerContent
* @param string $itemContent
* @param array $row
*/
public function preProcess(CorePageLayoutView &$parentObject, &$drawItem, &$headerContent, &$itemContent, array &$row)
{
switch ($row['CType'])
{
case 'teaser_country':
if ((int) $row['tx_eptheme_context_country'] > 0) {
$drawItem = false;
$country = BackendUtility::getRecord('tx_epproducts_domain_model_country', $row['tx_eptheme_context_country']);
$itemContent = '<strong>Teaser Land</strong><br />' . $country['name'];
}
break;
case 'teaser_region':
if ((int) $row['tx_eptheme_context_region'] > 0) {
$drawItem = false;
$region = BackendUtility::getRecord('tx_epproducts_domain_model_region', $row['tx_eptheme_context_region']);
$itemContent = '<strong>Teaser Gebiet</strong><br />' . $region['name'];
}
break;
case 'teaser_city':
if ((int) $row['tx_eptheme_context_city'] > 0) {
$drawItem = false;
$city = BackendUtility::getRecord('tx_epproducts_domain_model_city', $row['tx_eptheme_context_city']);
$itemContent = '<strong>Teaser Ort</strong><br />' . $city['name'];
}
break;
case 'teaser_hotel':
if ((int) $row['tx_eptheme_context_hotel'] > 0) {
$drawItem = false;
$hotel = BackendUtility::getRecord('tx_epproducts_domain_model_hotel', $row['tx_eptheme_context_hotel']);
$itemContent = '<strong>Teaser Hotel</strong><br />' . $hotel['name'];
}
break;
case 'teaser_concept':
if ((int) $row['tx_eptheme_context_concept'] > 0) {
$drawItem = false;
$concept = BackendUtility::getRecord('tx_epproducts_domain_model_concept', $row['tx_eptheme_context_concept']);
$itemContent = '<strong>Teaser Konzept</strong><br />' . $concept['name'];
}
break;
case 'teaser_product':
if ((int) $row['tx_eptheme_context_product'] > 0) {
$drawItem = false;
$product = BackendUtility::getRecord('tx_epproducts_domain_model_product', $row['tx_eptheme_context_product']);
$itemContent = '<strong>Teaser Product</strong><br />' . $product['name'];
if ((int) $row['tx_eptheme_context_hotel'] > 0) {
$hotel = BackendUtility::getRecord('tx_epproducts_domain_model_hotel',
$row['tx_eptheme_context_hotel']);
$itemContent .= ', ' . $hotel['name'];
}
}
break;
case 'gmap':
if ((int) $row['tx_eptheme_context_region'] > 0) {
$drawItem = false;
$region = BackendUtility::getRecord('tx_epproducts_domain_model_region', $row['tx_eptheme_context_region']);
$itemContent = '<strong>Google Map</strong><br />' . $region['name'];
} elseif ((int) $row['tx_eptheme_context_hotel'] > 0) {
$drawItem = false;
$hotel = BackendUtility::getRecord('tx_epproducts_domain_model_hotel', $row['tx_eptheme_context_hotel']);
$itemContent = '<strong>Google Map</strong><br />' . $hotel['name'];
}
break;
case 'disturber':
$drawItem = false;
switch ($row['layout'])
{
case 1:
$size = 'groß';
break;
case 2:
$size = 'Event klein';
break;
case 3:
$size = 'Event groß';
break;
default:
$size = 'klein';
}
$itemContent = '<strong>Störer ' . $size . '</strong>';
break;
case 'disrupter':
$drawItem = false;
$disrupter = BackendUtility::getRecord('tx_eptheme_domain_model_disrupter', $row['tx_eptheme_disrupter']);
$itemContent = '<strong>Störer</strong><br />' . $disrupter['headline'];
break;
case 'lineup':
$drawItem = false;
$itemContent = '<strong>Lineup</strong><br />' . $row['tx_eptheme_lineup'] . ' Einträge';
break;
default:
}
}
}
@@ -0,0 +1,146 @@
<?php
namespace EP\EpTheme\Hooks\PageLayoutView;
use EP\EpTheme\Exception\ConfigurationMissingException;
use EP\EpTheme\Exception\TemplateFileMissingException;
use TYPO3\CMS\Backend\View\PageLayoutView;
use TYPO3\CMS\Backend\View\PageLayoutViewDrawItemHookInterface;
use TYPO3\CMS\Core\Database\ConnectionPool;
use TYPO3\CMS\Core\Resource\FileRepository;
use TYPO3\CMS\Core\Service\FlexFormService;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Object\ObjectManager;
use TYPO3\CMS\Fluid\View\StandaloneView;
/**
* Class AbstractPreviewRenderer
*/
abstract class AbstractPreviewRenderer implements PageLayoutViewDrawItemHookInterface
{
/**
* @var array tt_content.*
*/
protected $data = [];
/**
* Define a CType
*
* @var string
*/
protected $cType = '';
/**
* @var string
*/
protected $templatePath = 'EXT:ep_theme/Resources/Private/Templates/PreviewRenderer/';
public function __construct()
{
if (empty($this->cType)) {
throw new ConfigurationMissingException('Property cType must not be empty', 1586703436);
}
}
public function preProcess(
PageLayoutView &$parentObject,
&$drawItem,
&$headerContent,
&$itemContent,
array &$row
) {
$this->data = &$row;
if ($this->isCtypeMatching() && $this->checkTemplateFile()) {
$drawItem = false;
$headerContent = $this->getHeaderContent();
$itemContent .= $this->getBodytext();
}
}
protected function getHeaderContent(): string
{
return '<div id="element-tt_content-' . (int)$this->data['uid']
. '" class="t3-ctype-identifier " data-ctype="' . $this->cType . '"></div>';
}
protected function getBodytext(): string
{
/** @var ObjectManager $objectManager */
$objectManager = GeneralUtility::makeInstance(ObjectManager::class);
$standaloneView = $objectManager->get(StandaloneView::class);
$standaloneView->setTemplatePathAndFilename($this->getTemplateFile());
$standaloneView->assignMultiple($this->getAssignmentsForTemplate() + [
'data' => $this->data,
'flexForm' => $this->getFlexForm(),
'firstImage' => count($this->getImages()) > 0 ? $this->getImages()[0] : null,
'images' => $this->getImages()
]);
return $standaloneView->render();
}
protected function getAssignmentsForTemplate(): array
{
return [];
}
protected function getFlexForm(): array
{
/** @var ObjectManager $objectManager */
$objectManager = GeneralUtility::makeInstance(ObjectManager::class);
$flexFormService = $objectManager->get(FlexFormService::class);
return $flexFormService->convertFlexFormContentToArray($this->data['pi_flexform']);
}
protected function getImages(int $uid = null, string $tablenames = 'tt_content', string $fieldname = 'image'): array
{
$uid = $uid ?? $this->data['uid'];
$references = [];
/** @var ObjectManager $objectManager */
$objectManager = GeneralUtility::makeInstance(ObjectManager::class);
$fileRepository = $objectManager->get(FileRepository::class);
/** @var ConnectionPool $connectionPool */
$connectionPool = $objectManager->get(ConnectionPool::class);
$queryBuilder = $connectionPool->getQueryBuilderForTable('sys_file_reference');
$identifiers = (array)$queryBuilder
->select('uid')
->from('sys_file_reference')
->where('uid_foreign=' . $uid . ' and tablenames="' . $tablenames . '" and fieldname="' . $fieldname . '"')
->execute()
->fetch(\PDO::FETCH_COLUMN);
foreach ($identifiers as $identifier) {
if ($identifier > 0) {
$reference = $fileRepository->findFileReferenceByUid($identifier);
if ($reference !== null) {
$references[] = $reference;
}
}
}
return $references;
}
/**
* @return bool
*/
protected function isCtypeMatching(): bool
{
return $this->data['CType'] === $this->cType;
}
protected function checkTemplateFile(): bool
{
if (is_file($this->getTemplateFile()) === false) {
throw new TemplateFileMissingException(
'Expected template file for preview rendering for CType ' . $this->cType . ' is missing',
1586703260
);
}
return true;
}
protected function getTemplateFile(): string
{
return GeneralUtility::getFileAbsFileName(
$this->templatePath . GeneralUtility::underscoredToUpperCamelCase($this->data['CType']) . '.html'
);
}
}
@@ -0,0 +1,20 @@
<?php
namespace EP\EpTheme\Hooks\PageLayoutView;
use TYPO3\CMS\Backend\Utility\BackendUtility;
class DisrupterPreviewRenderer extends AbstractPreviewRenderer
{
protected $cType = 'disrupter';
protected function getAssignmentsForTemplate(): array
{
$uid = $this->data['tx_eptheme_disrupter'];
$content = BackendUtility::getRecord('tx_eptheme_domain_model_disrupter', $uid);
return [
'content' => $content,
];
}
}
@@ -0,0 +1,8 @@
<?php
namespace EP\EpTheme\Hooks\PageLayoutView;
class DisturberPreviewRenderer extends AbstractPreviewRenderer
{
protected $cType = 'disturber';
}
@@ -0,0 +1,26 @@
<?php
namespace EP\EpTheme\Hooks\PageLayoutView;
use TYPO3\CMS\Backend\Utility\BackendUtility;
class GmapPreviewRenderer extends AbstractPreviewRenderer
{
protected $cType = 'gmap';
protected function getAssignmentsForTemplate(): array
{
$uid = $this->data['tx_eptheme_context_region'];
if ((int)$uid > 0) {
$content = BackendUtility::getRecord('tx_epproducts_domain_model_region', $uid);
} else {
$uid = $this->data['tx_eptheme_context_hotel'];
$content = BackendUtility::getRecord('tx_epproducts_domain_model_hotel', $uid);
}
return [
'content' => $content,
];
}
}
@@ -0,0 +1,31 @@
<?php
namespace EP\EpTheme\Hooks\PageLayoutView;
use TYPO3\CMS\Core\Database\ConnectionPool;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Object\ObjectManager;
class LineupPreviewRenderer extends AbstractPreviewRenderer
{
protected $cType = 'lineup';
protected function getAssignmentsForTemplate(): array
{
/** @var ObjectManager $objectManager */
$objectManager = GeneralUtility::makeInstance(ObjectManager::class);
/** @var ConnectionPool $connectionPool */
$connectionPool = $objectManager->get(ConnectionPool::class);
$queryBuilder = $connectionPool->getQueryBuilderForTable('tx_eptheme_domain_model_lineup');
$rows = $queryBuilder->select('*')
->from('tx_eptheme_domain_model_lineup')
->where('tt_content='.$this->data['uid'])
->orderBy('sorting', 'ASC')
->execute()
->fetchAllAssociative();
return [
'rows' => $rows,
];
}
}
@@ -0,0 +1,20 @@
<?php
namespace EP\EpTheme\Hooks\PageLayoutView;
use TYPO3\CMS\Backend\Utility\BackendUtility;
class TeaserCityPreviewRenderer extends AbstractPreviewRenderer
{
protected $cType = 'teaser_city';
protected function getAssignmentsForTemplate(): array
{
$uid = $this->data['tx_eptheme_context_city'];
$images = $this->getImages($uid, 'tx_epproducts_domain_model_city', 'teaser_images');
return [
'images' => $images,
'city' => BackendUtility::getRecord('tx_epproducts_domain_model_city', $uid),
];
}
}
@@ -0,0 +1,20 @@
<?php
namespace EP\EpTheme\Hooks\PageLayoutView;
use TYPO3\CMS\Backend\Utility\BackendUtility;
class TeaserConceptPreviewRenderer extends AbstractPreviewRenderer
{
protected $cType = 'teaser_concept';
protected function getAssignmentsForTemplate(): array
{
$uid = $this->data['tx_eptheme_context_concept'];
$images = $this->getImages($uid, 'tx_epproducts_domain_model_concept', 'teaser_images');
return [
'images' => $images,
'concept' => BackendUtility::getRecord('tx_epproducts_domain_model_concept', $uid),
];
}
}
@@ -0,0 +1,20 @@
<?php
namespace EP\EpTheme\Hooks\PageLayoutView;
use TYPO3\CMS\Backend\Utility\BackendUtility;
class TeaserCountryPreviewRenderer extends AbstractPreviewRenderer
{
protected $cType = 'teaser_country';
protected function getAssignmentsForTemplate(): array
{
$countryUid = $this->data['tx_eptheme_context_country'];
$images = $this->getImages($countryUid, 'tx_epproducts_domain_model_country', 'teaser_images');
return [
'images' => $images,
'country' => BackendUtility::getRecord('tx_epproducts_domain_model_country', $countryUid),
];
}
}
@@ -0,0 +1,20 @@
<?php
namespace EP\EpTheme\Hooks\PageLayoutView;
use TYPO3\CMS\Backend\Utility\BackendUtility;
class TeaserHotelPreviewRenderer extends AbstractPreviewRenderer
{
protected $cType = 'teaser_hotel';
protected function getAssignmentsForTemplate(): array
{
$uid = $this->data['tx_eptheme_context_hotel'];
$images = $this->getImages($uid, 'tx_epproducts_domain_model_hotel', 'teaser_images');
return [
'images' => $images,
'hotel' => BackendUtility::getRecord('tx_epproducts_domain_model_hotel', $uid),
];
}
}
@@ -0,0 +1,24 @@
<?php
namespace EP\EpTheme\Hooks\PageLayoutView;
use TYPO3\CMS\Backend\Utility\BackendUtility;
class TeaserProductPreviewRenderer extends AbstractPreviewRenderer
{
protected $cType = 'teaser_product';
protected function getAssignmentsForTemplate(): array
{
$productUid = $this->data['tx_eptheme_context_product'];
$hotelUid = $this->data['tx_eptheme_context_hotel'];
$images = $this->getImages($productUid, 'tx_epproducts_domain_model_product', 'teaser_images');
$product = BackendUtility::getRecord('tx_epproducts_domain_model_product', $productUid);
$hotel = $hotelUid ? BackendUtility::getRecord('tx_epproducts_domain_model_hotel', $hotelUid) : null;
return [
'images' => $images,
'product' => $product,
'hotel' => $hotel,
];
}
}
@@ -0,0 +1,20 @@
<?php
namespace EP\EpTheme\Hooks\PageLayoutView;
use TYPO3\CMS\Backend\Utility\BackendUtility;
class TeaserRegionPreviewRenderer extends AbstractPreviewRenderer
{
protected $cType = 'teaser_region';
protected function getAssignmentsForTemplate(): array
{
$uid = $this->data['tx_eptheme_context_region'];
$images = $this->getImages($uid, 'tx_epproducts_domain_model_region', 'teaser_images');
return [
'images' => $images,
'region' => BackendUtility::getRecord('tx_epproducts_domain_model_region', $uid),
];
}
}
@@ -16,6 +16,7 @@ call_user_func(function () {
'items' => [
['Keine Zuordnung', 0],
],
'default' => 0,
'minitems' => 0,
'maxitems' => 1,
]
@@ -31,6 +32,7 @@ call_user_func(function () {
'items' => [
['Keine Zuordnung', 0],
],
'default' => 0,
'minitems' => 0,
'maxitems' => 1,
]
@@ -46,6 +48,7 @@ call_user_func(function () {
'items' => [
['Keine Zuordnung', 0],
],
'default' => 0,
'minitems' => 0,
'maxitems' => 1,
]
@@ -61,6 +64,7 @@ call_user_func(function () {
'items' => [
['Keine Zuordnung', 0],
],
'default' => 0,
'minitems' => 0,
'maxitems' => 1,
]
@@ -76,6 +80,7 @@ call_user_func(function () {
'items' => [
['Keine Zuordnung', 0],
],
'default' => 0,
'minitems' => 0,
'maxitems' => 1,
]
@@ -91,6 +96,7 @@ call_user_func(function () {
'items' => [
['Keine Zuordnung', 0],
],
'default' => 0,
'minitems' => 0,
'maxitems' => 1,
]
@@ -101,7 +107,7 @@ call_user_func(function () {
'config' => [
'type' => 'input',
'size' => 12,
'eval' => 'date',
'eval' => 'date,int',
'renderType' => 'inputDateTime',
]
],
@@ -111,7 +117,7 @@ call_user_func(function () {
'config' => [
'type' => 'input',
'size' => 12,
'eval' => 'date',
'eval' => 'date,int',
'renderType' => 'inputDateTime',
]
],
@@ -0,0 +1,11 @@
{namespace be=TYPO3\CMS\Backend\ViewHelpers}
<div class="row">
<div class="col-xs-12">
<p>
<strong>Störer</strong>
</p>
<strong>
{content.headline}
</strong>
</div>
</div>
@@ -0,0 +1,24 @@
{namespace be=TYPO3\CMS\Backend\ViewHelpers}
<div class="row">
<div class="col-xs-12">
<p>
<strong>Störer</strong>
</p>
<strong>
<f:switch expression="{data.layout}">
<f:case value="1">
groß
</f:case>>
<f:case value="2">
Event klein
</f:case>
<f:case value="3">
Event groß
</f:case>
<f:defaultCase>
klein
</f:defaultCase>
</f:switch>
</strong>
</div>
</div>
@@ -0,0 +1,11 @@
{namespace be=TYPO3\CMS\Backend\ViewHelpers}
<div class="row">
<div class="col-xs-12">
<p>
<strong>OSM Karte</strong>
</p>
<strong>
{content.name} ({content.latitude}, {content.longitude})
</strong>
</div>
</div>
@@ -0,0 +1,15 @@
{namespace be=TYPO3\CMS\Backend\ViewHelpers}
<div class="row">
<div class="col-xs-12">
<p>
<strong>Lineup</strong>
</p>
<ul>
<f:for each="{rows}" as="row">
<li>
{row.name}
</li>
</f:for>
</ul>
</div>
</div>
@@ -0,0 +1,23 @@
{namespace be=TYPO3\CMS\Backend\ViewHelpers}
<div class="row">
<div class="col-xs-12">
<p>
<strong>Teaser Ort</strong>
</p>
<p>
<f:if condition="{images.0}">
<f:then>
<f:image image="{images.0.originalFile}" width="200" height="80c" />
</f:then>
<f:else>
<f:image src="EXT:ep_theme/Resources/Public/images/lazy.png" width="200" height="80c"/>
</f:else>
</f:if>
</p>
<strong>
{city.name}
</strong>
<br>
{city.teaser -> f:format.html()}
</div>
</div>
@@ -0,0 +1,23 @@
{namespace be=TYPO3\CMS\Backend\ViewHelpers}
<div class="row">
<div class="col-xs-12">
<p>
<strong>Teaser Konzept</strong>
</p>
<p>
<f:if condition="{images.0}">
<f:then>
<f:image image="{images.0.originalFile}" width="200" height="80c" />
</f:then>
<f:else>
<f:image src="EXT:ep_theme/Resources/Public/images/lazy.png" width="200" height="80c"/>
</f:else>
</f:if>
</p>
<strong>
{concept.name}
</strong>
<br>
{concept.teaser -> f:format.html()}
</div>
</div>
@@ -0,0 +1,23 @@
{namespace be=TYPO3\CMS\Backend\ViewHelpers}
<div class="row">
<div class="col-xs-12">
<p>
<strong>Teaser Land</strong>
</p>
<p>
<f:if condition="{images.0}">
<f:then>
<f:image image="{images.0.originalFile}" width="200" height="80c" />
</f:then>
<f:else>
<f:image src="EXT:ep_theme/Resources/Public/images/lazy.png" width="200" height="80c"/>
</f:else>
</f:if>
</p>
<strong>
{country.name}
</strong>
<br>
{country.teaser -> f:format.html()}
</div>
</div>
@@ -0,0 +1,23 @@
{namespace be=TYPO3\CMS\Backend\ViewHelpers}
<div class="row">
<div class="col-xs-12">
<p>
<strong>Teaser Hotel</strong>
</p>
<p>
<f:if condition="{images.0}">
<f:then>
<f:image image="{images.0.originalFile}" width="200" height="80c" />
</f:then>
<f:else>
<f:image src="EXT:ep_theme/Resources/Public/images/lazy.png" width="200" height="80c"/>
</f:else>
</f:if>
</p>
<strong>
{hotel.name}
</strong>
<br>
{hotel.teaser -> f:format.html()}
</div>
</div>
@@ -0,0 +1,23 @@
{namespace be=TYPO3\CMS\Backend\ViewHelpers}
<div class="row">
<div class="col-xs-12">
<p>
<strong>Teaser Produkt</strong>
</p>
<p>
<f:if condition="{images.0}">
<f:then>
<f:image image="{images.0.originalFile}" width="200" height="80c" />
</f:then>
<f:else>
<f:image src="EXT:ep_theme/Resources/Public/images/lazy.png" width="200" height="80c"/>
</f:else>
</f:if>
</p>
<strong>
{product.name}
</strong>
<br>
{product.teaser -> f:format.html()}
</div>
</div>
@@ -0,0 +1,23 @@
{namespace be=TYPO3\CMS\Backend\ViewHelpers}
<div class="row">
<div class="col-xs-12">
<p>
<strong>Teaser Gebiet</strong>
</p>
<p>
<f:if condition="{images.0}">
<f:then>
<f:image image="{images.0.originalFile}" width="200" height="80c" />
</f:then>
<f:else>
<f:image src="EXT:ep_theme/Resources/Public/images/lazy.png" width="200" height="80c"/>
</f:else>
</f:if>
</p>
<strong>
{region.name}
</strong>
<br>
{region.teaser -> f:format.html()}
</div>
</div>
@@ -14,8 +14,28 @@ $GLOBALS['TYPO3_CONF_VARS']['LOG']['EP']['EpTheme']['Service']['BookingApiServic
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass']['ep_theme'] =
\EP\EpTheme\Hook\Tcemain::class;
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['tt_content_drawItem']['ep_theme'] =
\EP\EpTheme\Hook\PageLayoutView::class;
$layout = 'cms/layout/class.tx_cms_layout.php';
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][$layout]['tt_content_drawItem']['teaser_country'] =
\EP\EpTheme\Hooks\PageLayoutView\TeaserCountryPreviewRenderer::class;
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][$layout]['tt_content_drawItem']['teaser_region'] =
\EP\EpTheme\Hooks\PageLayoutView\TeaserRegionPreviewRenderer::class;
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][$layout]['tt_content_drawItem']['teaser_city'] =
\EP\EpTheme\Hooks\PageLayoutView\TeaserCityPreviewRenderer::class;
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][$layout]['tt_content_drawItem']['teaser_hotel'] =
\EP\EpTheme\Hooks\PageLayoutView\TeaserHotelPreviewRenderer::class;
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][$layout]['tt_content_drawItem']['teaser_concept'] =
\EP\EpTheme\Hooks\PageLayoutView\TeaserConceptPreviewRenderer::class;
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][$layout]['tt_content_drawItem']['teaser_product'] =
\EP\EpTheme\Hooks\PageLayoutView\TeaserProductPreviewRenderer::class;
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][$layout]['tt_content_drawItem']['gmap'] =
\EP\EpTheme\Hooks\PageLayoutView\GmapPreviewRenderer::class;
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][$layout]['tt_content_drawItem']['disturber'] =
\EP\EpTheme\Hooks\PageLayoutView\DisturberPreviewRenderer::class;
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][$layout]['tt_content_drawItem']['disrupter'] =
\EP\EpTheme\Hooks\PageLayoutView\DisrupterPreviewRenderer::class;
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][$layout]['tt_content_drawItem']['lineup'] =
\EP\EpTheme\Hooks\PageLayoutView\LineupPreviewRenderer::class;
$GLOBALS['TYPO3_CONF_VARS']['FE']['addRootLineFields'] = 'tx_eptheme_slides';