chore: copy ep_products and ep_theme from EP/website@9593cc8
Copied unchanged from public/typo3conf/ext/ of EP/website at 9593cc8631354f8a363d6609de8b7433f669a9a0 (Git-tracked files only). History stays in the old repository. Only composer.json files are added so the extensions install as path packages. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
59afaecea1
commit
a46918de9d
778 files changed
+67000
-2
No files matched your search
Executable
+1
@@ -0,0 +1 @@
|
||||
deny from all
|
||||
@@ -0,0 +1,83 @@
|
||||
<?php
|
||||
|
||||
namespace EP\EpTheme\Controller;
|
||||
|
||||
/***************************************************************
|
||||
*
|
||||
* Copyright notice
|
||||
*
|
||||
* (c) 2020 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 EP\EpTheme\Domain\Repository\PageRepository;
|
||||
use TYPO3\CMS\Backend\View\BackendTemplateView;
|
||||
use TYPO3\CMS\Core\Database\ConnectionPool;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
use TYPO3\CMS\Extbase\Mvc\Controller\ActionController;
|
||||
|
||||
class BackendController extends ActionController
|
||||
{
|
||||
/**
|
||||
* Backend Template Container
|
||||
*
|
||||
* @var BackendTemplateView
|
||||
*/
|
||||
protected $defaultViewObjectName = BackendTemplateView::class;
|
||||
|
||||
/**
|
||||
* BackendTemplateContainer
|
||||
*
|
||||
* @var BackendTemplateView
|
||||
*/
|
||||
protected $view;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
protected $pageUid;
|
||||
|
||||
/**
|
||||
* @var PageRepository
|
||||
*/
|
||||
protected $pageRepository;
|
||||
|
||||
/**
|
||||
* @param PageRepository $pageRepository
|
||||
*/
|
||||
public function __construct(PageRepository $pageRepository)
|
||||
{
|
||||
$this->pageRepository = $pageRepository;
|
||||
}
|
||||
|
||||
public function initializeAction()
|
||||
{
|
||||
$this->pageUid = (int)GeneralUtility::_GET('id');
|
||||
|
||||
parent::initializeAction();
|
||||
}
|
||||
|
||||
public function listPagesAction()
|
||||
{
|
||||
$pages = $this->pageRepository->findPagesByPid($this->pageUid, true);
|
||||
|
||||
$this->view->assign('pages', $pages);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,130 @@
|
||||
<?php
|
||||
|
||||
namespace EP\EpTheme\DataProcessing;
|
||||
|
||||
/***************************************************************
|
||||
*
|
||||
* 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 EP\EpProducts\Service\ResellerDataService;
|
||||
use EP\EpProducts\Traits\DbConnectionTrait;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
use TYPO3\CMS\Extbase\Object\ObjectManager;
|
||||
use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer;
|
||||
use TYPO3\CMS\Frontend\ContentObject\DataProcessorInterface;
|
||||
|
||||
class ContextProcessor implements DataProcessorInterface
|
||||
{
|
||||
use DbConnectionTrait;
|
||||
|
||||
/**
|
||||
* @param ContentObjectRenderer $cObj
|
||||
* @param array $contentObjectConfiguration
|
||||
* @param array $processorConfiguration
|
||||
* @param array $processedData
|
||||
* @return array
|
||||
* @throws \Doctrine\DBAL\DBALException
|
||||
*/
|
||||
public function process(
|
||||
ContentObjectRenderer $cObj,
|
||||
array $contentObjectConfiguration,
|
||||
array $processorConfiguration,
|
||||
array $processedData
|
||||
) {
|
||||
$data = $cObj->data;
|
||||
$processedData['context'] = [];
|
||||
$countryUid = (int) $data['tx_eptheme_context_country'];
|
||||
if ($countryUid > 0) {
|
||||
$processedData['context']['country'] = $this->getContextRecord($countryUid, 'tx_epproducts_domain_model_country');
|
||||
}
|
||||
$regionUid = (int) $data['tx_eptheme_context_region'];
|
||||
if ($regionUid > 0) {
|
||||
$processedData['context']['region'] = $this->getContextRecord($regionUid, 'tx_epproducts_domain_model_region');
|
||||
}
|
||||
if ($data['tx_eptheme_context_pacode']) {
|
||||
$processedData['context']['paCode'] = $data['tx_eptheme_context_pacode'];
|
||||
} elseif ($paCode = $this->getPaCodeFromRequest()) {
|
||||
$processedData['context']['paCode'] = $paCode;
|
||||
}
|
||||
|
||||
return $processedData;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array|bool
|
||||
* @throws \Doctrine\DBAL\DBALException
|
||||
*/
|
||||
private function getResellerData()
|
||||
{
|
||||
/** @var \TYPO3\CMS\Extbase\Object\ObjectManager $objectManager */
|
||||
$objectManager = GeneralUtility::makeInstance(ObjectManager::class);
|
||||
/** @var ResellerDataService $resellerService */
|
||||
$resellerService = $objectManager->get(ResellerDataService::class);
|
||||
return $resellerService->getResellerForCurrentDomain();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
private function getPaCodeFromRequest()
|
||||
{
|
||||
$currentUri = GeneralUtility::getIndpEnv('REQUEST_URI');
|
||||
$query = parse_url($currentUri, \PHP_URL_QUERY);
|
||||
|
||||
if (!$query) {
|
||||
return '';
|
||||
}
|
||||
|
||||
parse_str($query, $items);
|
||||
|
||||
if (array_key_exists('pa', $items)) {
|
||||
return $items['pa'];
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $uid
|
||||
* @param string $table
|
||||
* @return array
|
||||
* @throws \Doctrine\DBAL\DBALException
|
||||
*/
|
||||
private function getContextRecord($uid, $table)
|
||||
{
|
||||
$qb = $this->getDbConnection()->createQueryBuilder();
|
||||
|
||||
$query = $qb
|
||||
->select('*')
|
||||
->from($table)
|
||||
->where('uid = :uid')
|
||||
->andWhere('deleted = 0')
|
||||
->andWhere('hidden = 0')
|
||||
->setParameter('uid', $uid)
|
||||
;
|
||||
|
||||
return $query->execute()->fetch();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
|
||||
namespace EP\EpTheme\DataProcessing;
|
||||
|
||||
/***************************************************************
|
||||
*
|
||||
* 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\Core\Service\FlexFormService;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer;
|
||||
use TYPO3\CMS\Frontend\ContentObject\DataProcessorInterface;
|
||||
|
||||
class FlexFormProcessor implements DataProcessorInterface
|
||||
{
|
||||
|
||||
/**
|
||||
* @param ContentObjectRenderer $cObj
|
||||
* @param array $contentObjectConfiguration
|
||||
* @param array $processorConfiguration
|
||||
* @param array $processedData
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function process(
|
||||
ContentObjectRenderer $cObj,
|
||||
array $contentObjectConfiguration,
|
||||
array $processorConfiguration,
|
||||
array $processedData
|
||||
) {
|
||||
$data = $cObj->data;
|
||||
if (array_key_exists('pi_flexform', $data)) {
|
||||
$flexFormService = GeneralUtility::makeInstance(FlexFormService::class);
|
||||
$processedData['data']['flexForm'] = $flexFormService->convertFlexFormContentToArray($data['pi_flexform']);
|
||||
}
|
||||
return $processedData;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
<?php
|
||||
|
||||
namespace EP\EpTheme\DataProcessing;
|
||||
|
||||
use EP\EpProducts\Traits\DbConnectionTrait;
|
||||
use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer;
|
||||
use TYPO3\CMS\Frontend\ContentObject\DataProcessorInterface;
|
||||
|
||||
class ProductRatingProcessor implements DataProcessorInterface
|
||||
{
|
||||
use DbConnectionTrait;
|
||||
|
||||
public function process(
|
||||
ContentObjectRenderer $cObj,
|
||||
array $contentObjectConfiguration,
|
||||
array $processorConfiguration,
|
||||
array $processedData
|
||||
) {
|
||||
$qb = $this->getDbConnection()->createQueryBuilder();
|
||||
|
||||
$result = $qb
|
||||
->selectLiteral('SUM(product.rating_votes_count) as totalCount', 'SUM(product.rating_average) as totalAverage')
|
||||
->from('tx_epproducts_domain_model_product', 'product')
|
||||
->execute()
|
||||
->fetchAssociative()
|
||||
;
|
||||
|
||||
$totalCount = $result['totalCount'];
|
||||
$totalAverage = $result['totalAverage'];
|
||||
|
||||
$result = $qb
|
||||
->selectLiteral('COUNT(*) as ratedCount')
|
||||
->from('tx_epproducts_domain_model_product', 'product')
|
||||
->where($qb->expr()->gt('product.rating_average', 0))
|
||||
->execute()
|
||||
->fetchAssociative()
|
||||
;
|
||||
|
||||
$ratedCount = $result['ratedCount'];
|
||||
|
||||
$jsonData = [
|
||||
'@context' => 'https://schema.org',
|
||||
'@type' => 'LocalBusiness',
|
||||
'name' => 'E&P Reisen und Events GmbH',
|
||||
'address' => [
|
||||
'@type' => 'PostalAddress',
|
||||
'streetAddress' => 'Aachener Str. 326-328',
|
||||
'postalCode' => '50933',
|
||||
'addressLocality' => 'Köln,Deutschland'
|
||||
],
|
||||
'telephone' => '00492212722760',
|
||||
'url' => 'https://www.ep-reisen.de/',
|
||||
'contactPoint' => [
|
||||
'@type' => 'ContactPoint',
|
||||
'telephone' => '+492212722760',
|
||||
'email' => '[email protected]',
|
||||
'contactType' => 'customer service',
|
||||
'areaServed' => 'DE',
|
||||
'availableLanguage' => 'German'
|
||||
],
|
||||
'logo' => 'https://www.ep-reisen.de/typo3conf/ext/ep_theme/Resources/Public/images/logo_wide.svg',
|
||||
'priceRange' => '€',
|
||||
'image' => 'https://www.ep-reisen.de/typo3conf/ext/ep_theme/Resources/Public/images/logo_wide.svg',
|
||||
'aggregateRating' => [
|
||||
'@type' => 'AggregateRating',
|
||||
'ratingValue' => number_format($totalAverage/$ratedCount, 2),
|
||||
'bestRating' => '5',
|
||||
'worstRating' => '1',
|
||||
'ratingCount' => $totalCount
|
||||
],
|
||||
'sameAs' => [
|
||||
'https://www.facebook.com/ep.reisen.events',
|
||||
'https://www.instagram.com/ep_reisen/',
|
||||
'https://www.youtube.com/user/epreisende'
|
||||
]
|
||||
];
|
||||
|
||||
$processedData['totalRatings'] = [
|
||||
'totalCount' => $totalCount,
|
||||
'totalAverage' => $totalAverage/$ratedCount,
|
||||
'jsonData' => $jsonData,
|
||||
];
|
||||
|
||||
return $processedData;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
<?php
|
||||
|
||||
namespace EP\EpTheme\DataProcessing;
|
||||
|
||||
/***************************************************************
|
||||
*
|
||||
* 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 EP\EpProducts\Traits\DbConnectionTrait;
|
||||
use TYPO3\CMS\Core\Resource\FileRepository;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
use TYPO3\CMS\Core\Utility\RootlineUtility;
|
||||
use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer;
|
||||
use TYPO3\CMS\Frontend\ContentObject\DataProcessorInterface;
|
||||
|
||||
class SliderProcessor implements DataProcessorInterface
|
||||
{
|
||||
use DbConnectionTrait;
|
||||
|
||||
/**
|
||||
* @param ContentObjectRenderer $cObj
|
||||
* @param array $contentObjectConfiguration
|
||||
* @param array $processorConfiguration
|
||||
* @param array $processedData
|
||||
* @return array
|
||||
* @throws \Doctrine\DBAL\DBALException
|
||||
*/
|
||||
public function process(
|
||||
ContentObjectRenderer $cObj,
|
||||
array $contentObjectConfiguration,
|
||||
array $processorConfiguration,
|
||||
array $processedData
|
||||
) {
|
||||
$page = $cObj->data;
|
||||
$pageUid = $page['uid'];
|
||||
|
||||
if ((int) $page['tx_eptheme_slides'] === 0) {
|
||||
$pageUid = $this->getParentPageWithSlides();
|
||||
}
|
||||
|
||||
if ($pageUid === null) {
|
||||
return $processedData;
|
||||
}
|
||||
|
||||
$qb = $this->getDbConnection()->createQueryBuilder();
|
||||
|
||||
$query = $qb
|
||||
->select('uid', 'headline', 'subline', 'button', 'page_uid', 'skipass')
|
||||
->from('tx_eptheme_domain_model_slide')
|
||||
->where('page = :pageUid')
|
||||
->andWhere('deleted = 0')
|
||||
->andWhere('hidden = 0')
|
||||
->orderBy('sorting')
|
||||
->setParameter('pageUid', $pageUid)
|
||||
;
|
||||
|
||||
$slides = $query->execute()->fetchAll();
|
||||
|
||||
if ($slides) {
|
||||
$fileRepository = GeneralUtility::makeInstance(FileRepository::class);
|
||||
foreach ($slides as $slide) {
|
||||
$processedData['slides'][$slide['uid']] = $slide;
|
||||
$processedData['slides'][$slide['uid']]['image'] = $fileRepository->findByRelation(
|
||||
'tx_eptheme_domain_model_slide',
|
||||
'images',
|
||||
$slide['uid']
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if (1 === count($slides)) {
|
||||
$processedData['slide'] = reset($processedData['slides']);
|
||||
}
|
||||
|
||||
return $processedData;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return null|int
|
||||
*/
|
||||
protected function getParentPageWithSlides()
|
||||
{
|
||||
$rootlineUtility = new RootlineUtility($GLOBALS['TSFE']->id);
|
||||
$rootline = $rootlineUtility->get();
|
||||
|
||||
foreach ($rootline as $parentPage) {
|
||||
if ((int) $parentPage['tx_eptheme_slides'] > 0) {
|
||||
return (int) $parentPage['uid'];
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
|
||||
namespace EP\EpTheme\DataProcessing;
|
||||
|
||||
/***************************************************************
|
||||
*
|
||||
* 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\Core\Utility\GeneralUtility;
|
||||
use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer;
|
||||
use TYPO3\CMS\Frontend\ContentObject\DataProcessorInterface;
|
||||
use TYPO3\CMS\Frontend\Resource\FileCollector;
|
||||
|
||||
class TeaserImageProcessor implements DataProcessorInterface
|
||||
{
|
||||
|
||||
/**
|
||||
* @param ContentObjectRenderer $cObj
|
||||
* @param array $contentObjectConfiguration
|
||||
* @param array $processorConfiguration
|
||||
* @param array $processedData
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function process(
|
||||
ContentObjectRenderer $cObj,
|
||||
array $contentObjectConfiguration,
|
||||
array $processorConfiguration,
|
||||
array $processedData
|
||||
) {
|
||||
$imageFileCollector = GeneralUtility::makeInstance(FileCollector::class);
|
||||
$imageFileCollector->addFilesFromRelation('tt_content', 'assets', $cObj->data);
|
||||
$processedData['teaserImage'] = reset($imageFileCollector->getFiles());
|
||||
|
||||
return $processedData;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,130 @@
|
||||
<?php
|
||||
|
||||
namespace EP\EpTheme\DataProcessing;
|
||||
|
||||
/***************************************************************
|
||||
*
|
||||
* 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 EP\EpProducts\Domain\Model\FilterSettings;
|
||||
use EP\EpProducts\Domain\Repository\CityRepository;
|
||||
use EP\EpProducts\Domain\Repository\ConceptRepository;
|
||||
use EP\EpProducts\Domain\Repository\CountryRepository;
|
||||
use EP\EpProducts\Domain\Repository\RegionRepository;
|
||||
use EP\EpProducts\Service\HotelDataService;
|
||||
use EP\EpProducts\Service\ProductDataService;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
use TYPO3\CMS\Extbase\Object\ObjectManager;
|
||||
use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer;
|
||||
use TYPO3\CMS\Frontend\ContentObject\DataProcessorInterface;
|
||||
|
||||
class TeaserProcessor implements DataProcessorInterface
|
||||
{
|
||||
|
||||
/**
|
||||
* @param ContentObjectRenderer $cObj
|
||||
* @param array $contentObjectConfiguration
|
||||
* @param array $processorConfiguration
|
||||
* @param array $processedData
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function process(
|
||||
ContentObjectRenderer $cObj,
|
||||
array $contentObjectConfiguration,
|
||||
array $processorConfiguration,
|
||||
array $processedData
|
||||
) {
|
||||
/** @var \TYPO3\CMS\Extbase\Object\ObjectManager $objectManager */
|
||||
$objectManager = GeneralUtility::makeInstance(ObjectManager::class);
|
||||
|
||||
if ((int) $processedData['data']['tx_eptheme_context_city'] > 0) {
|
||||
/** @var \EP\EpProducts\Domain\Repository\CityRepository $repository */
|
||||
$repository = $objectManager->get(CityRepository::class);
|
||||
/** @var \EP\EpProducts\Domain\Model\City $city */
|
||||
$city = $repository->findByIdentifier($processedData['data']['tx_eptheme_context_city']);
|
||||
$processedData['city'] = $city;
|
||||
}
|
||||
if ((int) $processedData['data']['tx_eptheme_context_region'] > 0) {
|
||||
/** @var \EP\EpProducts\Domain\Repository\RegionRepository $repository */
|
||||
$repository = $objectManager->get(RegionRepository::class);
|
||||
/** @var \EP\EpProducts\Domain\Model\Region $region */
|
||||
$region = $repository->findByIdentifier($processedData['data']['tx_eptheme_context_region']);
|
||||
$processedData['region'] = $region;
|
||||
}
|
||||
if ((int) $processedData['data']['tx_eptheme_context_country'] > 0) {
|
||||
/** @var \EP\EpProducts\Domain\Repository\CountryRepository $repository */
|
||||
$repository = $objectManager->get(CountryRepository::class);
|
||||
/** @var \EP\EpProducts\Domain\Model\Country $country */
|
||||
$country = $repository->findByIdentifier($processedData['data']['tx_eptheme_context_country']);
|
||||
$processedData['country'] = $country;
|
||||
}
|
||||
if ((int) $processedData['data']['tx_eptheme_context_hotel'] > 0) {
|
||||
/** @var \EP\EpProducts\Service\HotelDataService $service */
|
||||
$service = $objectManager->get(HotelDataService::class);
|
||||
/** @var array $hotel */
|
||||
$hotel = $service->getTeaser($processedData['data']['tx_eptheme_context_hotel']);
|
||||
$processedData['hotel'] = $hotel;
|
||||
}
|
||||
if ((int) $processedData['data']['tx_eptheme_context_concept'] > 0) {
|
||||
/** @var \EP\EpProducts\Domain\Repository\ConceptRepository $repository */
|
||||
$repository = $objectManager->get(ConceptRepository::class);
|
||||
/** @var \EP\EpProducts\Domain\Model\Concept $concept */
|
||||
$concept = $repository->findByIdentifier($processedData['data']['tx_eptheme_context_concept']);
|
||||
$processedData['concept'] = $concept;
|
||||
}
|
||||
if ((int) $processedData['data']['tx_eptheme_context_product'] > 0) {
|
||||
$productUid = (int) $processedData['data']['tx_eptheme_context_product'];
|
||||
$hotelUid = (int) $processedData['data']['tx_eptheme_context_hotel'];
|
||||
|
||||
$filterSettings = [
|
||||
'productUid' => $productUid,
|
||||
'hotelUid' => $hotelUid,
|
||||
];
|
||||
|
||||
$dateFromTimestamp = (int) $processedData['data']['tx_eptheme_context_date_from'];
|
||||
if ($dateFromTimestamp > 0) {
|
||||
$dateFrom = new \DateTime();
|
||||
$dateFrom->setTimestamp($dateFromTimestamp);
|
||||
$filterSettings['dateFrom'] = $dateFrom->format('Y-m-d');
|
||||
}
|
||||
$dateToTimestamp = (int) $processedData['data']['tx_eptheme_context_date_to'];
|
||||
if ($dateToTimestamp > 0) {
|
||||
$dateTo = new \DateTime();
|
||||
$dateTo->setTimestamp($dateToTimestamp);
|
||||
$filterSettings['dateTo'] = $dateTo->format('Y-m-d');
|
||||
}
|
||||
|
||||
/** @var \EP\EpProducts\Service\ProductDataService $productDataService */
|
||||
$productDataService = $objectManager->get(ProductDataService::class);
|
||||
$processedData['teaser'] = $productDataService->getTeaser($filterSettings);
|
||||
$processedData['teaser']['forceHotelUid'] = $hotelUid;
|
||||
}
|
||||
|
||||
$processedData['referringPageUid'] = $GLOBALS['TSFE']->id;
|
||||
|
||||
return $processedData;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,351 @@
|
||||
<?php
|
||||
namespace EP\EpTheme\Domain\Model\Dto;
|
||||
|
||||
/***************************************************************
|
||||
*
|
||||
* Copyright notice
|
||||
*
|
||||
* (c) 2018 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!
|
||||
***************************************************************/
|
||||
|
||||
class ContactForm
|
||||
{
|
||||
const FORM_TYPE_SIMPLE = 1;
|
||||
const FORM_TYPE_FULL = 2;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
protected $formType = 1;
|
||||
|
||||
/**
|
||||
* Honeypot field!!
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $subject;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
* @TYPO3\CMS\Extbase\Annotation\Validate("NotEmpty")
|
||||
*/
|
||||
protected $name;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
* @TYPO3\CMS\Extbase\Annotation\Validate("NotEmpty")
|
||||
*/
|
||||
protected $firstName;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
* @TYPO3\CMS\Extbase\Annotation\Validate("NotEmpty")
|
||||
*/
|
||||
protected $gender;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $company;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
* @TYPO3\CMS\Extbase\Annotation\Validate("NotEmpty")
|
||||
* @TYPO3\CMS\Extbase\Annotation\Validate("EmailAddress")
|
||||
*/
|
||||
protected $email;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
* @TYPO3\CMS\Extbase\Annotation\Validate("NotEmpty")
|
||||
*/
|
||||
protected $phone;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $period;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $duration;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $pax;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $age;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $children;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $inquiry;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $pageUrl;
|
||||
|
||||
/**
|
||||
* @param string $pageUrl
|
||||
* @param int $formType
|
||||
*/
|
||||
public function __construct($pageUrl = null, $formType = 1)
|
||||
{
|
||||
$this->pageUrl = $pageUrl;
|
||||
$this->formType = $formType;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getSubject()
|
||||
{
|
||||
return $this->subject;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $subject
|
||||
*/
|
||||
public function setSubject($subject)
|
||||
{
|
||||
$this->subject = $subject;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $name
|
||||
*/
|
||||
public function setName($name)
|
||||
{
|
||||
$this->name = $name;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getFirstName()
|
||||
{
|
||||
return $this->firstName;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $firstName
|
||||
*/
|
||||
public function setFirstName($firstName)
|
||||
{
|
||||
$this->firstName = $firstName;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getGender()
|
||||
{
|
||||
return $this->gender;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $gender
|
||||
*/
|
||||
public function setGender($gender)
|
||||
{
|
||||
$this->gender = $gender;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getCompany()
|
||||
{
|
||||
return $this->company;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $company
|
||||
*/
|
||||
public function setCompany($company)
|
||||
{
|
||||
$this->company = $company;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getEmail()
|
||||
{
|
||||
return $this->email;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $email
|
||||
*/
|
||||
public function setEmail($email)
|
||||
{
|
||||
$this->email = $email;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getPhone()
|
||||
{
|
||||
return $this->phone;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $phone
|
||||
*/
|
||||
public function setPhone($phone)
|
||||
{
|
||||
$this->phone = $phone;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getPeriod()
|
||||
{
|
||||
return $this->period;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $period
|
||||
*/
|
||||
public function setPeriod($period)
|
||||
{
|
||||
$this->period = $period;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getDuration()
|
||||
{
|
||||
return $this->duration;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $duration
|
||||
*/
|
||||
public function setDuration($duration)
|
||||
{
|
||||
$this->duration = $duration;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getPax()
|
||||
{
|
||||
return $this->pax;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $pax
|
||||
*/
|
||||
public function setPax($pax)
|
||||
{
|
||||
$this->pax = $pax;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getAge()
|
||||
{
|
||||
return $this->age;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $age
|
||||
*/
|
||||
public function setAge($age)
|
||||
{
|
||||
$this->age = $age;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getChildren()
|
||||
{
|
||||
return $this->children;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $children
|
||||
*/
|
||||
public function setChildren($children)
|
||||
{
|
||||
$this->children = $children;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getInquiry()
|
||||
{
|
||||
return $this->inquiry;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $inquiry
|
||||
*/
|
||||
public function setInquiry($inquiry)
|
||||
{
|
||||
$this->inquiry = $inquiry;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getPageUrl()
|
||||
{
|
||||
return $this->pageUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $pageUrl
|
||||
*/
|
||||
public function setPageUrl($pageUrl)
|
||||
{
|
||||
$this->pageUrl = $pageUrl;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
<?php
|
||||
|
||||
namespace EP\EpTheme\Domain\Model;
|
||||
|
||||
use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
|
||||
|
||||
class Page extends AbstractEntity
|
||||
{
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
protected $uid;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
protected $pid;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
protected $hidden;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $title;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $seoTitle;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $description;
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function isHidden()
|
||||
{
|
||||
return $this->hidden;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param bool $hidden
|
||||
*/
|
||||
public function setHidden($hidden)
|
||||
{
|
||||
$this->hidden = $hidden;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getTitle()
|
||||
{
|
||||
return $this->title;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $title
|
||||
*/
|
||||
public function setTitle($title)
|
||||
{
|
||||
$this->title = $title;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getSeoTitle()
|
||||
{
|
||||
return $this->seoTitle;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $seoTitle
|
||||
*/
|
||||
public function setSeoTitle($seoTitle)
|
||||
{
|
||||
$this->seoTitle = $seoTitle;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getDescription()
|
||||
{
|
||||
return $this->description;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $description
|
||||
*/
|
||||
public function setDescription($description)
|
||||
{
|
||||
$this->description = $description;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace EP\EpTheme\Domain\Repository;
|
||||
|
||||
use TYPO3\CMS\Core\Domain\Repository\PageRepository as CorePageRepository;
|
||||
use TYPO3\CMS\Extbase\Persistence\Repository;
|
||||
|
||||
class PageRepository extends Repository
|
||||
{
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $defaultOrderings = [
|
||||
'sorting' => 'ASC',
|
||||
];
|
||||
|
||||
public function findPagesByPid(int $pid, bool $includeDisabled = false)
|
||||
{
|
||||
$query = $this->createQuery();
|
||||
$query
|
||||
->getQuerySettings()
|
||||
->setRespectStoragePage(false)
|
||||
->setIgnoreEnableFields($includeDisabled)
|
||||
->setIncludeDeleted(false)
|
||||
->setRespectSysLanguage(false)
|
||||
;
|
||||
$query->matching($query->logicalAnd([
|
||||
$query->equals('pid', $pid),
|
||||
$query->equals('doktype', CorePageRepository::DOKTYPE_DEFAULT),
|
||||
$query->equals('navHide', false),
|
||||
]));
|
||||
|
||||
return $query->execute();
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
{}
|
||||
@@ -0,0 +1,156 @@
|
||||
<?php
|
||||
|
||||
namespace EP\EpTheme\Form;
|
||||
|
||||
use TYPO3\CMS\Core\Log\LogManager;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
use TYPO3\CMS\Extbase\Domain\Model\FileReference;
|
||||
use TYPO3\CMS\Form\Domain\Finishers\AbstractFinisher;
|
||||
|
||||
abstract class AbstractMappedFinisher extends AbstractFinisher
|
||||
{
|
||||
/**
|
||||
* Resolves the 'mapping' option into remote name => local form element identifier.
|
||||
*/
|
||||
protected function parseMapping(): array
|
||||
{
|
||||
$mappings = [];
|
||||
$mappingOption = (string)$this->parseOption('mapping');
|
||||
|
||||
foreach (GeneralUtility::trimExplode(',', $mappingOption, true) as $mapping) {
|
||||
$parts = GeneralUtility::trimExplode(':', $mapping, true, 2);
|
||||
if (2 !== count($parts)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
[$remote, $local] = $parts;
|
||||
if ('' === $remote || '' === $local) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$mappings[$remote] = $local;
|
||||
}
|
||||
|
||||
return $mappings;
|
||||
}
|
||||
|
||||
/**
|
||||
* The mapped values, keyed by the remote name the receiving side expects. Values pass through
|
||||
* normalizeValue() just like the labeled ones do, so a date element arrives as a Y-m-d string
|
||||
* instead of a serialized DateTime. A value that does not survive normalization keeps its key:
|
||||
* the remote names make up the request shape and dropping one would change it.
|
||||
*/
|
||||
protected function buildPayload(): array
|
||||
{
|
||||
$values = [];
|
||||
$formValues = $this->finisherContext->getFormValues();
|
||||
|
||||
foreach ($this->parseMapping() as $remote => $local) {
|
||||
if (false === array_key_exists($local, $formValues)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$values[$remote] = $this->normalizeValue($formValues[$local], $local);
|
||||
}
|
||||
|
||||
return $values;
|
||||
}
|
||||
|
||||
/**
|
||||
* Every submitted value that the mapping does not already cover, keyed by the element label
|
||||
* as the editor sees it in the form editor. Forms built in the backend use generated
|
||||
* identifiers (text-1, singleselect-2, ...) that carry no meaning and cannot be renamed
|
||||
* without breaking existing finisher options, so the label is the only stable description
|
||||
* of what was asked.
|
||||
*
|
||||
* The label is taken from the form definition, not through TranslationService: a translated
|
||||
* label would change the payload keys with the site language, and these keys are stored.
|
||||
*/
|
||||
protected function buildLabeledValues(): array
|
||||
{
|
||||
$formValues = $this->finisherContext->getFormValues();
|
||||
$skip = array_merge(
|
||||
array_values($this->parseMapping()),
|
||||
GeneralUtility::trimExplode(',', (string)$this->parseOption('exclude'), true)
|
||||
);
|
||||
|
||||
// Keyed by identifier in form order, and contains only real form elements - iterating
|
||||
// this instead of the form values keeps the collection in the order of the form and
|
||||
// leaves out anything that is not an element the visitor filled in.
|
||||
$elements = $this->finisherContext->getFormRuntime()->getFormDefinition()->getElements();
|
||||
|
||||
$collected = [];
|
||||
foreach ($elements as $identifier => $element) {
|
||||
if (true === in_array($identifier, $skip, true) || false === array_key_exists($identifier, $formValues)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$value = $this->normalizeValue($formValues[$identifier], $identifier);
|
||||
if (null === $value || '' === $value || [] === $value) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$label = trim($element->getLabel());
|
||||
if ('' === $label) {
|
||||
$label = $identifier;
|
||||
}
|
||||
if (true === array_key_exists($label, $collected)) {
|
||||
$label .= ' (' . $identifier . ')';
|
||||
}
|
||||
|
||||
$collected[$label] = $value;
|
||||
}
|
||||
|
||||
return $collected;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $value
|
||||
*
|
||||
* @return mixed null when the value has no JSON representation
|
||||
*/
|
||||
protected function normalizeValue($value, string $identifier)
|
||||
{
|
||||
if (true === is_array($value)) {
|
||||
$normalized = [];
|
||||
foreach ($value as $item) {
|
||||
$item = $this->normalizeValue($item, $identifier);
|
||||
if (null !== $item && '' !== $item) {
|
||||
$normalized[] = $item;
|
||||
}
|
||||
}
|
||||
|
||||
return $normalized;
|
||||
}
|
||||
|
||||
if ($value instanceof \DateTimeInterface) {
|
||||
return $value->format('Y-m-d');
|
||||
}
|
||||
|
||||
if ($value instanceof FileReference) {
|
||||
$resource = $value->getOriginalResource();
|
||||
|
||||
return null !== $resource ? $resource->getName() : null;
|
||||
}
|
||||
|
||||
if (true === is_object($value)) {
|
||||
$this->logWarning('Form value skipped while collecting labeled values: unsupported type.', [
|
||||
'element' => $identifier,
|
||||
'class' => get_class($value),
|
||||
]);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
return $value;
|
||||
}
|
||||
|
||||
protected function logWarning(string $message, array $context = []): void
|
||||
{
|
||||
GeneralUtility::makeInstance(LogManager::class)
|
||||
->getLogger(static::class)
|
||||
->warning($message, array_merge([
|
||||
'finisher' => static::class,
|
||||
], $context));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
<?php
|
||||
|
||||
namespace EP\EpTheme\Form;
|
||||
|
||||
use TYPO3\CMS\Core\Site\SiteFinder;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
use TYPO3\CMS\Form\Domain\Finishers\AbstractFinisher;
|
||||
|
||||
class AddReferrerFinisher extends AbstractFinisher
|
||||
{
|
||||
protected function executeInternal()
|
||||
{
|
||||
$this->addCurrentUrlField();
|
||||
$this->addReferrerField();
|
||||
}
|
||||
|
||||
private function addReferrerField(): void
|
||||
{
|
||||
// Look for key 'referrer' in frontend session
|
||||
$referrer = $GLOBALS['TSFE']->fe_user->getKey('ses', 'referrer');
|
||||
|
||||
if (null === $referrer) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Add textfield to form containing referrer value
|
||||
$field = $this->finisherContext
|
||||
->getFormRuntime()
|
||||
->getFormDefinition()
|
||||
->getPageByIndex(0)
|
||||
->createElement('referrer', 'Text');
|
||||
|
||||
$field->setDefaultValue($referrer);
|
||||
$field->setDataType('string');
|
||||
$field->setLabel('Referrer');
|
||||
|
||||
// Add finisher variable for potential later use
|
||||
$this->finisherContext->getFinisherVariableProvider()->add(
|
||||
$this->shortFinisherIdentifier,
|
||||
'referrer',
|
||||
$referrer
|
||||
);
|
||||
|
||||
// Remove session key
|
||||
$GLOBALS['TSFE']->fe_user->setKey('ses', 'referrer', null);
|
||||
$GLOBALS['TSFE']->fe_user->storeSessionData();
|
||||
}
|
||||
|
||||
private function addCurrentUrlField(): void
|
||||
{
|
||||
// Get URL of current page
|
||||
$pageId = $GLOBALS['TSFE']->id;
|
||||
$site = GeneralUtility::makeInstance(SiteFinder::class)->getSiteByPageId($pageId);
|
||||
$url = $site->getRouter()->generateUri($pageId);
|
||||
|
||||
// Add textfield to form containing url value
|
||||
$field = $this->finisherContext
|
||||
->getFormRuntime()
|
||||
->getFormDefinition()
|
||||
->getPageByIndex(0)
|
||||
->createElement('pageurl', 'Text');
|
||||
|
||||
$field->setDefaultValue($url);
|
||||
$field->setDataType('string');
|
||||
$field->setLabel('URL');
|
||||
|
||||
// Add finisher variable for potential later use
|
||||
$this->finisherContext->getFinisherVariableProvider()->add(
|
||||
$this->shortFinisherIdentifier,
|
||||
'pageurl',
|
||||
$url
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
<?php
|
||||
|
||||
namespace EP\EpTheme\Form;
|
||||
|
||||
use EP\EpProducts\EpTeam\ApiClient;
|
||||
use TYPO3\CMS\Core\Site\SiteFinder;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
|
||||
class ApplicationApiFinisher extends AbstractMappedFinisher
|
||||
{
|
||||
/**
|
||||
* @var ApiClient
|
||||
*/
|
||||
protected $apiClient;
|
||||
|
||||
/**
|
||||
* @param ApiClient $apiClient
|
||||
*/
|
||||
public function injectApiClient(ApiClient $apiClient)
|
||||
{
|
||||
$this->apiClient = $apiClient;
|
||||
}
|
||||
|
||||
protected function executeInternal()
|
||||
{
|
||||
try {
|
||||
$payload = $this->buildPayload();
|
||||
if ([] === $payload) {
|
||||
$this->logWarning('Application form API finisher skipped: the mapping produced no values.');
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$formDefinition = $this->finisherContext->getFormRuntime()->getFormDefinition();
|
||||
$formLabel = trim($formDefinition->getLabel());
|
||||
|
||||
$payload['form'] = $formDefinition->getIdentifier();
|
||||
// The name the editor gave the form, so the receiving side can label a submission
|
||||
// without keeping a list of identifiers. Taken from the definition rather than
|
||||
// through TranslationService: a translated label would differ per site language.
|
||||
$payload['formLabel'] = '' !== $formLabel ? $formLabel : $formDefinition->getIdentifier();
|
||||
$payload['submittedAt'] = (new \DateTimeImmutable())->format(\DateTimeInterface::ATOM);
|
||||
$payload = array_merge($payload, $this->resolvePageContext());
|
||||
$payload['details'] = $this->buildLabeledValues();
|
||||
|
||||
$this->apiClient->submitApplicationForm($payload);
|
||||
} catch (\Throwable $e) {
|
||||
$this->logWarning('Application form API finisher request failed.', [
|
||||
'exception' => $e,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The page the form was submitted from. The URL is generated through the site router in the
|
||||
* visitor's language, the same way AddReferrerFinisher does it, so it is the page's canonical
|
||||
* URL rather than the submit request with its form arguments attached.
|
||||
*/
|
||||
private function resolvePageContext(): array
|
||||
{
|
||||
if (false === isset($GLOBALS['TSFE']) || 0 === (int)$GLOBALS['TSFE']->id) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$pageUid = (int)$GLOBALS['TSFE']->id;
|
||||
$context = ['pageUid' => $pageUid];
|
||||
|
||||
try {
|
||||
$site = GeneralUtility::makeInstance(SiteFinder::class)->getSiteByPageId($pageUid);
|
||||
$context['pageUrl'] = (string)$site->getRouter()->generateUri($pageUid, [
|
||||
'_language' => $GLOBALS['TSFE']->getLanguage(),
|
||||
]);
|
||||
} catch (\Throwable $e) {
|
||||
// An unroutable page must not cost the submission, so the uid is sent without a URL.
|
||||
$this->logWarning('Application form API finisher could not resolve the page URL.', [
|
||||
'pageUid' => $pageUid,
|
||||
'exception' => $e,
|
||||
]);
|
||||
}
|
||||
|
||||
return $context;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace EP\EpTheme\Form;
|
||||
|
||||
use EP\EpProducts\MyEP\ApiClient;
|
||||
|
||||
class BpnApiFinisher extends AbstractMappedFinisher
|
||||
{
|
||||
/**
|
||||
* @var ApiClient
|
||||
*/
|
||||
protected $apiClient;
|
||||
|
||||
/**
|
||||
* @param ApiClient $apiClient
|
||||
*/
|
||||
public function injectApiClient(ApiClient $apiClient)
|
||||
{
|
||||
$this->apiClient = $apiClient;
|
||||
}
|
||||
|
||||
protected function executeInternal()
|
||||
{
|
||||
try {
|
||||
$values = $this->buildPayload();
|
||||
if ([] !== $values) {
|
||||
$this->apiClient->registerAddress($values);
|
||||
}
|
||||
} catch (\Throwable $e) {
|
||||
$this->logWarning('Bpn API finisher request failed.', [
|
||||
'exception' => $e,
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
namespace EP\EpTheme\Form;
|
||||
|
||||
use Symfony\Component\HttpClient\HttpClient;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
|
||||
class WebhookFinisher extends AbstractMappedFinisher
|
||||
{
|
||||
protected function executeInternal()
|
||||
{
|
||||
try {
|
||||
$url = trim((string)$this->parseOption('url'));
|
||||
if ('' === $url) {
|
||||
return;
|
||||
}
|
||||
|
||||
$payload = $this->buildPayload();
|
||||
if ([] === $payload) {
|
||||
return;
|
||||
}
|
||||
|
||||
$response = HttpClient::create()->request('POST', $url, [
|
||||
'json' => $payload,
|
||||
]);
|
||||
|
||||
$statusCode = $response->getStatusCode();
|
||||
if ($statusCode < 200 || $statusCode >= 300) {
|
||||
$this->logWarning('Webhook finisher returned an unexpected response status.', [
|
||||
'url' => $url,
|
||||
'statusCode' => $statusCode,
|
||||
]);
|
||||
}
|
||||
} catch (\Throwable $e) {
|
||||
$this->logWarning('Webhook finisher request failed.', [
|
||||
'exception' => $e,
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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,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,
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -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),
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
<?php
|
||||
|
||||
namespace EP\EpTheme\Hooks;
|
||||
|
||||
/***************************************************************
|
||||
*
|
||||
* 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\Core\DataHandling\DataHandler;
|
||||
|
||||
class Tcemain
|
||||
{
|
||||
/**
|
||||
* @param array $fields
|
||||
* @param string $table
|
||||
* @param int $id
|
||||
* @param DataHandler $dataHandler
|
||||
*/
|
||||
public function processDatamap_preProcessFieldArray(array &$fields, $table, $id, DataHandler $dataHandler)
|
||||
{
|
||||
// Get country code from associated country entity and store in page record
|
||||
if ($table === 'pages') {
|
||||
$countryUid = (int) $fields['tx_eptheme_context_country'];
|
||||
if ($countryUid === 0) {
|
||||
$fields['tx_eptheme_context_country_code'] = '';
|
||||
} else {
|
||||
$country = BackendUtility::getRecord('tx_epproducts_domain_model_country', $countryUid);
|
||||
if ($country !== null) {
|
||||
$fields['tx_eptheme_context_country_code'] = $country['code'];
|
||||
}
|
||||
}
|
||||
}
|
||||
// Force unused colPos for content elements appended to news records
|
||||
if ($table === 'tt_content') {
|
||||
if (isset($dataHandler->datamap['tx_news_domain_model_news'])) {
|
||||
$fields['colPos'] = 1848;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
|
||||
namespace EP\EpTheme\MetaTag;
|
||||
|
||||
use TYPO3\CMS\Core\Resource\FileRepository;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
use TYPO3\CMS\Core\Utility\RootlineUtility;
|
||||
use TYPO3\CMS\Extbase\Service\ImageService;
|
||||
|
||||
class OpenGraphMetaTagManager extends \TYPO3\CMS\Seo\MetaTag\OpenGraphMetaTagManager
|
||||
{
|
||||
public function renderAllProperties(): string
|
||||
{
|
||||
if (array_key_exists('og:image', $this->properties)) {
|
||||
return parent::renderAllProperties();
|
||||
}
|
||||
/** @var FileRepository $fileRepository */
|
||||
$fileRepository = GeneralUtility::makeInstance(FileRepository::class);
|
||||
|
||||
$pageUid = $this->getPageWithImage();
|
||||
|
||||
if (null === $pageUid) {
|
||||
return parent::renderAllProperties();
|
||||
}
|
||||
|
||||
$images = $fileRepository->findByRelation('pages', 'og_image', $pageUid);
|
||||
|
||||
/** @var ImageService $imageService */
|
||||
$imageService = GeneralUtility::makeInstance(ImageService::class);
|
||||
|
||||
foreach ($images as $image) {
|
||||
$processedImage = $imageService->applyProcessingInstructions(
|
||||
$image,
|
||||
[
|
||||
'width' => '1200'
|
||||
]
|
||||
);
|
||||
$this->addProperty(
|
||||
'og:image',
|
||||
$imageService->getImageUri($processedImage, true),
|
||||
[
|
||||
'url' => $imageService->getImageUri($processedImage, true),
|
||||
'width' => $processedImage->getProperty('width'),
|
||||
'height' => $processedImage->getProperty('height'),
|
||||
'type' => $processedImage->getMimeType(),
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
return parent::renderAllProperties();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return null|int
|
||||
*/
|
||||
protected function getPageWithImage()
|
||||
{
|
||||
$rootLineUtility = new RootlineUtility($GLOBALS['TSFE']->id);
|
||||
$rootLine = $rootLineUtility->get();
|
||||
|
||||
foreach ($rootLine as $page) {
|
||||
if ($page['og_image'] > 0) {
|
||||
return $page['uid'];
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
namespace EP\EpTheme\Middleware;
|
||||
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use Psr\Http\Message\ServerRequestInterface;
|
||||
use Psr\Http\Server\MiddlewareInterface;
|
||||
use Psr\Http\Server\RequestHandlerInterface;
|
||||
use TYPO3\CMS\Core\Exception\SiteNotFoundException;
|
||||
use TYPO3\CMS\Core\Site\SiteFinder;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
|
||||
class ReferrerMiddleware implements MiddlewareInterface
|
||||
{
|
||||
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
|
||||
{
|
||||
$queryParams = $request->getQueryParams();
|
||||
|
||||
if (!array_key_exists('ref', $queryParams)) {
|
||||
return $handler->handle($request);
|
||||
}
|
||||
|
||||
$ref = $queryParams['ref'];
|
||||
|
||||
if (false === is_numeric($ref)) {
|
||||
return $handler->handle($request);
|
||||
}
|
||||
|
||||
/** @var SiteFinder $siteFinder */
|
||||
$siteFinder = GeneralUtility::makeInstance(SiteFinder::class);
|
||||
|
||||
try {
|
||||
$site = $siteFinder->getSiteByPageId((int) $ref);
|
||||
$url = $site->getRouter()->generateUri($ref);
|
||||
$GLOBALS['TSFE']->fe_user->setKey('ses', 'referrer', $url);
|
||||
$GLOBALS['TSFE']->fe_user->storeSessionData();
|
||||
}
|
||||
catch (SiteNotFoundException $exception) {
|
||||
}
|
||||
|
||||
return $handler->handle($request);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
<?php
|
||||
namespace EP\EpTheme\Service;
|
||||
|
||||
/***************************************************************
|
||||
*
|
||||
* Copyright notice
|
||||
*
|
||||
* (c) 2018 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 Symfony\Component\Mime\Address;
|
||||
use TYPO3\CMS\Core\Mail\FluidEmail;
|
||||
use TYPO3\CMS\Core\Mail\Mailer;
|
||||
use TYPO3\CMS\Core\SingletonInterface;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface;
|
||||
|
||||
class EmailService implements SingletonInterface
|
||||
{
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $settings;
|
||||
|
||||
public function __construct(ConfigurationManagerInterface $manager)
|
||||
{
|
||||
$settings = GeneralUtility::removeDotsFromTS(
|
||||
$manager->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_FULL_TYPOSCRIPT)
|
||||
);
|
||||
$this->settings = $settings['plugin']['tx_eptheme'];
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $toEmail
|
||||
* @param string $toName
|
||||
* @param string $subject
|
||||
* @param string $templateName
|
||||
* @param array $variables
|
||||
*/
|
||||
public function send($toEmail, $toName, $subject, $templateName, array $variables = [])
|
||||
{
|
||||
/** @var Mailer $mailer */
|
||||
$mailer = GeneralUtility::makeInstance(Mailer::class);
|
||||
$fromEmail = $this->settings['settings']['contactFormToEmail'];
|
||||
$fromName = $this->settings['settings']['contactFormToName'];
|
||||
$enableAutoreply = (bool)$this->settings['settings']['enableContactFormAutoreply'];
|
||||
$autoreplySubject = $this->settings['settings']['contactFormAutoreplySubject'];
|
||||
|
||||
/** @var FluidEmail $message */
|
||||
$message = GeneralUtility::makeInstance(FluidEmail::class);
|
||||
$message
|
||||
->to(new Address($toEmail, $toName))
|
||||
->from(new Address($fromEmail, $fromName))
|
||||
->format('html')
|
||||
->subject($subject)
|
||||
->setTemplate($templateName)
|
||||
->assignMultiple($variables)
|
||||
;
|
||||
|
||||
$mailer->send($message);
|
||||
|
||||
if ($enableAutoreply) {
|
||||
$contactForm = $variables['contactForm'];
|
||||
$toEmail = $contactForm->getEmail();
|
||||
$toName = $contactForm->getName();
|
||||
$templateName = 'Autoreply';
|
||||
|
||||
/** @var FluidEmail $message */
|
||||
$message = GeneralUtility::makeInstance(FluidEmail::class);
|
||||
$message
|
||||
->to(new Address($toEmail, $toName))
|
||||
->from(new Address($fromEmail, $fromName))
|
||||
->format('html')
|
||||
->subject($autoreplySubject)
|
||||
->setTemplate($templateName)
|
||||
->assignMultiple($variables)
|
||||
;
|
||||
|
||||
$mailer->send($message);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
<?php
|
||||
|
||||
namespace EP\EpTheme\ViewHelpers;
|
||||
|
||||
/***************************************************************
|
||||
*
|
||||
* Copyright notice
|
||||
*
|
||||
* (c) 2018 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 TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
|
||||
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
|
||||
use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic;
|
||||
|
||||
class ArgumentPrefixViewHelper extends AbstractViewHelper
|
||||
{
|
||||
use CompileWithRenderStatic;
|
||||
|
||||
public function initializeArguments()
|
||||
{
|
||||
parent::initializeArguments();
|
||||
|
||||
$this->registerArgument('pluginName', 'string', 'Plugin name');
|
||||
$this->registerArgument('extensionName', 'string', 'Extension name');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $arguments
|
||||
* @param \Closure $renderChildrenClosure
|
||||
* @param RenderingContextInterface $renderingContext
|
||||
* @return mixed
|
||||
*/
|
||||
public static function renderStatic(
|
||||
array $arguments,
|
||||
\Closure $renderChildrenClosure,
|
||||
RenderingContextInterface $renderingContext
|
||||
)
|
||||
{
|
||||
$request = $renderingContext->getControllerContext()->getRequest();
|
||||
$pluginName = $arguments['pluginName'];
|
||||
if ($pluginName === null) {
|
||||
$pluginName = $request->getPluginName();
|
||||
}
|
||||
$extensionName = $arguments['extensionName'];
|
||||
if ($extensionName === null) {
|
||||
$extensionName = $request->getControllerExtensionName();
|
||||
}
|
||||
return strtolower(implode('_', ['tx', $extensionName, $pluginName]));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,201 @@
|
||||
<?php
|
||||
|
||||
namespace EP\EpTheme\ViewHelpers\Calendar;
|
||||
|
||||
/***************************************************************
|
||||
*
|
||||
* Copyright notice
|
||||
*
|
||||
* (c) 2018 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 DateInterval;
|
||||
use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
|
||||
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
|
||||
use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic;
|
||||
|
||||
class ContingentViewHelper extends AbstractViewHelper
|
||||
{
|
||||
use CompileWithRenderStatic;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
protected $escapeOutput = false;
|
||||
|
||||
private const LEVEL_GREEN = 1;
|
||||
private const LEVEL_YELLOW = 2;
|
||||
private const LEVEL_RED = 3;
|
||||
|
||||
public function initializeArguments()
|
||||
{
|
||||
parent::initializeArguments();
|
||||
|
||||
$this->registerArgument('day', \DateTimeInterface::class, 'The day', true);
|
||||
$this->registerArgument('calendar', 'array', 'The calendar payload', true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $arguments
|
||||
* @param \Closure $renderChildrenClosure
|
||||
* @param RenderingContextInterface $renderingContext
|
||||
* @return mixed
|
||||
*/
|
||||
public static function renderStatic(
|
||||
array $arguments,
|
||||
\Closure $renderChildrenClosure,
|
||||
RenderingContextInterface $renderingContext
|
||||
)
|
||||
{
|
||||
$day = $arguments['day'];
|
||||
$calendar = $arguments['calendar'];
|
||||
$now = new \DateTimeImmutable('now');
|
||||
$dayDate = new \DateTimeImmutable($day->format('Y-m-d H:i:s'), $day->getTimezone());
|
||||
$dayDate = $dayDate->setTime(0, 0, 0);
|
||||
|
||||
if (!empty($calendar['error'])) {
|
||||
$class = [ 'text-zinc-400' ];
|
||||
return static::getHtml($class, $dayDate->format('d'));
|
||||
}
|
||||
|
||||
if ($now > $dayDate) {
|
||||
$class = [ 'text-zinc-400' ];
|
||||
return static::getHtml($class, $dayDate->format('d'));
|
||||
}
|
||||
$statusMap = static::getStatusMap($calendar);
|
||||
$status = static::normalizeStatus($statusMap[$dayDate->format('Y-m-d')] ?? 'OK');
|
||||
$previousStatus = static::normalizeStatus($statusMap[$dayDate->sub(new DateInterval('P1D'))->format('Y-m-d')] ?? 'OK');
|
||||
$level = static::getOccupancyLevel($status);
|
||||
$previousLevel = static::getOccupancyLevel($previousStatus);
|
||||
|
||||
if ($previousLevel !== $level) {
|
||||
$class = static::getTransientLabelClasses($previousStatus, $status);
|
||||
} else {
|
||||
$class = static::getLabelClasses($status);
|
||||
}
|
||||
|
||||
return static::getHtml($class, $dayDate->format('d'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
protected static function getLabelClasses(string $status): array
|
||||
{
|
||||
return [
|
||||
'block p-1 leading-none text-sm text-white',
|
||||
static::getStatusClass($status),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
protected static function getTransientLabelClasses(string $statusFrom, ?string $statusTo = null): array
|
||||
{
|
||||
$classes = [ 'block p-1 leading-none text-sm text-white' ];
|
||||
$class = static::getStatusClass($statusFrom);
|
||||
if ($statusTo !== null) {
|
||||
$class .= '-to-' . static::getStatusSuffix($statusTo);
|
||||
}
|
||||
$classes[] = $class;
|
||||
return $classes;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
protected static function getOccupancyLevel(string $status): int
|
||||
{
|
||||
if ($status === 'BLOCKED') {
|
||||
return static::LEVEL_RED;
|
||||
}
|
||||
if ($status === 'ON_REQUEST') {
|
||||
return static::LEVEL_YELLOW;
|
||||
}
|
||||
return static::LEVEL_GREEN;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<string, string>
|
||||
*/
|
||||
protected static function getStatusMap(array $calendar): array
|
||||
{
|
||||
$statusMap = [];
|
||||
foreach (($calendar['data'] ?? []) as $row) {
|
||||
if (!isset($row['date'])) {
|
||||
continue;
|
||||
}
|
||||
$statusMap[$row['date']] = static::normalizeStatus((string)($row['status'] ?? 'OK'));
|
||||
}
|
||||
|
||||
return $statusMap;
|
||||
}
|
||||
|
||||
protected static function normalizeStatus(string $status): string
|
||||
{
|
||||
$status = strtoupper(trim($status));
|
||||
if ($status === 'ONREQUEST') {
|
||||
return 'ON_REQUEST';
|
||||
}
|
||||
|
||||
if (in_array($status, [ 'OK', 'ON_REQUEST', 'BLOCKED' ], true)) {
|
||||
return $status;
|
||||
}
|
||||
|
||||
return 'OK';
|
||||
}
|
||||
|
||||
protected static function getStatusClass(string $status): string
|
||||
{
|
||||
if ($status === 'BLOCKED') {
|
||||
return 'availability-none';
|
||||
}
|
||||
if ($status === 'ON_REQUEST') {
|
||||
return 'availability-partial';
|
||||
}
|
||||
|
||||
return 'availability-full';
|
||||
}
|
||||
|
||||
protected static function getStatusSuffix(string $status): string
|
||||
{
|
||||
if ($status === 'BLOCKED') {
|
||||
return 'none';
|
||||
}
|
||||
if ($status === 'ON_REQUEST') {
|
||||
return 'partial';
|
||||
}
|
||||
|
||||
return 'full';
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $class
|
||||
* @param string $label
|
||||
* @return string
|
||||
*/
|
||||
protected static function getHtml(array $class, $label)
|
||||
{
|
||||
$cssClass = ' class="' . implode(' ', $class) . '"';
|
||||
return sprintf('<span%s>%s</span>', $cssClass, $label);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
<?php
|
||||
|
||||
namespace EP\EpTheme\ViewHelpers;
|
||||
|
||||
/***************************************************************
|
||||
*
|
||||
* Copyright notice
|
||||
*
|
||||
* (c) 2018 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 EP\EpProducts\Domain\Model\Hotel;
|
||||
use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
|
||||
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
|
||||
use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic;
|
||||
|
||||
class ComfortCategoryViewHelper extends AbstractViewHelper
|
||||
{
|
||||
use CompileWithRenderStatic;
|
||||
|
||||
public function initializeArguments()
|
||||
{
|
||||
parent::initializeArguments();
|
||||
|
||||
$this->registerArgument('hotel', Hotel::class, 'The hotel');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $arguments
|
||||
* @param \Closure $renderChildrenClosure
|
||||
* @param RenderingContextInterface $renderingContext
|
||||
* @return mixed
|
||||
*/
|
||||
public static function renderStatic(
|
||||
array $arguments,
|
||||
\Closure $renderChildrenClosure,
|
||||
RenderingContextInterface $renderingContext
|
||||
)
|
||||
{
|
||||
/** @var Hotel $hotel */
|
||||
$hotel = $arguments['hotel'];
|
||||
|
||||
$flag = '<span class="category-flag" data-toggle="tooltip" title="%s">%s</span>';
|
||||
|
||||
switch ($hotel->getCategory())
|
||||
{
|
||||
case Hotel::CATEGORY_STANDARD:
|
||||
$icon = 'S';
|
||||
$tooltip = 'Kategorie: Standard';
|
||||
break;
|
||||
case Hotel::CATEGORY_BASIC:
|
||||
$icon = 'B';
|
||||
$tooltip = 'Kategorie: Basic';
|
||||
break;
|
||||
case Hotel::CATEGORY_COMFORT:
|
||||
$icon = 'C';
|
||||
$tooltip = 'Kategorie: Komfort';
|
||||
break;
|
||||
case Hotel::CATEGORY_DELUXE:
|
||||
$icon = 'D';
|
||||
$tooltip = 'Kategorie: Deluxe';
|
||||
break;
|
||||
case Hotel::CATEGORY_SUPER_DELUXE:
|
||||
$icon = 'SD';
|
||||
$tooltip = 'Kategorie: Superdeluxe';
|
||||
break;
|
||||
default:
|
||||
return '';
|
||||
}
|
||||
|
||||
return sprintf($flag, $tooltip, $icon);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
<?php
|
||||
|
||||
namespace EP\EpTheme\ViewHelpers;
|
||||
|
||||
/***************************************************************
|
||||
*
|
||||
* Copyright notice
|
||||
*
|
||||
* (c) 2018 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 TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
|
||||
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
|
||||
use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic;
|
||||
|
||||
class ContainerViewHelper extends AbstractViewHelper
|
||||
{
|
||||
use CompileWithRenderStatic;
|
||||
|
||||
/**
|
||||
* @var int[]
|
||||
*/
|
||||
protected static $scale = [
|
||||
'default' => 0,
|
||||
'small' => 8,
|
||||
'large' => 16,
|
||||
];
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
protected $escapeOutput = false;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected static $columnsWithoutContainers = [ 0, 1, 3 ];
|
||||
|
||||
public function initializeArguments()
|
||||
{
|
||||
parent::initializeArguments();
|
||||
|
||||
$this->registerArgument('content', 'string', 'The content');
|
||||
$this->registerArgument('cssClasses', 'string', 'Additional CSS classes');
|
||||
$this->registerArgument('rteContent', 'boolean', 'Is RTE content', false, false);
|
||||
$this->registerArgument('data', 'Array', 'The record data', true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $arguments
|
||||
* @param \Closure $renderChildrenClosure
|
||||
* @param RenderingContextInterface $renderingContext
|
||||
* @return mixed
|
||||
*/
|
||||
public static function renderStatic(
|
||||
array $arguments,
|
||||
\Closure $renderChildrenClosure,
|
||||
RenderingContextInterface $renderingContext
|
||||
) {
|
||||
$content = $renderChildrenClosure();
|
||||
|
||||
if ($content === null) {
|
||||
$content = $arguments['content'];
|
||||
}
|
||||
|
||||
$classes = [];
|
||||
if (\in_array($arguments['data']['colPos'], static::$columnsWithoutContainers, false)) {
|
||||
$classes[] = 'container';
|
||||
}
|
||||
|
||||
if ($arguments['cssClasses'] !== null) {
|
||||
$classes[] = $arguments['cssClasses'];
|
||||
}
|
||||
|
||||
if (!empty($arguments['data']['space_before_class'])) {
|
||||
$scaleTop = static::$scale[$arguments['data']['space_before_class']];
|
||||
$classes[] = sprintf('pt-%d', $scaleTop);
|
||||
}
|
||||
|
||||
if (!empty($arguments['data']['space_after_class'])) {
|
||||
$scaleBottom = static::$scale[$arguments['data']['space_after_class']];
|
||||
$classes[] = sprintf('pb-%d', $scaleBottom);
|
||||
}
|
||||
|
||||
if ('default' !== $arguments['data']['frame_class']) {
|
||||
$classes[] = $arguments['data']['frame_class'];
|
||||
}
|
||||
|
||||
if (count($classes) > 0) {
|
||||
return sprintf('<div class="%s"%s>%s</div>', implode(' ', $classes), $arguments['rteContent'] ? ' data-rte-content' : '', $content);
|
||||
}
|
||||
|
||||
if ($arguments['rteContent']) {
|
||||
return sprintf('<div data-rte-content>%s</div>', $content);
|
||||
}
|
||||
|
||||
return $content;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
<?php
|
||||
|
||||
namespace EP\EpTheme\ViewHelpers;
|
||||
|
||||
/***************************************************************
|
||||
*
|
||||
* Copyright notice
|
||||
*
|
||||
* (c) 2018 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 TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
|
||||
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
|
||||
use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic;
|
||||
|
||||
class ContextClassesViewHelper extends AbstractViewHelper
|
||||
{
|
||||
use CompileWithRenderStatic;
|
||||
|
||||
public function initializeArguments()
|
||||
{
|
||||
parent::initializeArguments();
|
||||
|
||||
$this->registerArgument('context', 'Array', 'The context', true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $arguments
|
||||
* @param \Closure $renderChildrenClosure
|
||||
* @param RenderingContextInterface $renderingContext
|
||||
* @return mixed
|
||||
*/
|
||||
public static function renderStatic(
|
||||
array $arguments,
|
||||
\Closure $renderChildrenClosure,
|
||||
RenderingContextInterface $renderingContext
|
||||
)
|
||||
{
|
||||
$classes = [];
|
||||
if (isset($arguments['context']['country'])) {
|
||||
$classes[] = mb_strtolower($arguments['context']['country']['name']);
|
||||
}
|
||||
if (isset($arguments['context']['region'])) {
|
||||
$classes[] = mb_strtolower($arguments['context']['region']['name']);
|
||||
}
|
||||
|
||||
$classesString = implode(' ', $classes);
|
||||
|
||||
$classesString = str_replace(['ä', 'ö', 'ü', 'ß'], ['ae', 'oe', 'ue', 'ss'], $classesString);
|
||||
|
||||
return $classesString;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
|
||||
namespace EP\EpTheme\ViewHelpers;
|
||||
|
||||
/***************************************************************
|
||||
*
|
||||
* Copyright notice
|
||||
*
|
||||
* (c) 2018 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 EP\EpProducts\Utility\DateUtility;
|
||||
use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
|
||||
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
|
||||
use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic;
|
||||
|
||||
class DateRangeViewHelper extends AbstractViewHelper
|
||||
{
|
||||
use CompileWithRenderStatic;
|
||||
|
||||
public function initializeArguments()
|
||||
{
|
||||
parent::initializeArguments();
|
||||
|
||||
$this->registerArgument('dateFrom', 'string', 'Date range start');
|
||||
$this->registerArgument('dateTo', 'string', 'Date range end');
|
||||
$this->registerArgument('includeLabel', 'Bool', 'Whether to include a label', false, true);
|
||||
$this->registerArgument('format', 'String', 'The date format', false, 'd.m.Y');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $arguments
|
||||
* @param \Closure $renderChildrenClosure
|
||||
* @param RenderingContextInterface $renderingContext
|
||||
* @return mixed
|
||||
*/
|
||||
public static function renderStatic(
|
||||
array $arguments,
|
||||
\Closure $renderChildrenClosure,
|
||||
RenderingContextInterface $renderingContext
|
||||
) {
|
||||
return DateUtility::formatDateRange(
|
||||
$arguments['dateFrom'],
|
||||
$arguments['dateTo'],
|
||||
$arguments['includeLabel'],
|
||||
$arguments['format']
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
<?php
|
||||
|
||||
namespace EP\EpTheme\ViewHelpers;
|
||||
|
||||
/***************************************************************
|
||||
*
|
||||
* Copyright notice
|
||||
*
|
||||
* (c) 2018 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 EP\EpProducts\Service\FilterSettingsEncoder;
|
||||
use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
|
||||
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
|
||||
use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic;
|
||||
|
||||
class FilterSettingsEncoderViewHelper extends AbstractViewHelper
|
||||
{
|
||||
use CompileWithRenderStatic;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
protected $escapeOutput = false;
|
||||
|
||||
public function initializeArguments()
|
||||
{
|
||||
parent::initializeArguments();
|
||||
|
||||
$this->registerArgument('argument', 'string', 'The argument string to encode');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $arguments
|
||||
* @param \Closure $renderChildrenClosure
|
||||
* @param RenderingContextInterface $renderingContext
|
||||
* @return mixed
|
||||
*/
|
||||
public static function renderStatic(
|
||||
array $arguments,
|
||||
\Closure $renderChildrenClosure,
|
||||
RenderingContextInterface $renderingContext
|
||||
)
|
||||
{
|
||||
$argument = $renderChildrenClosure();
|
||||
if ($argument === null) {
|
||||
$argument = $arguments['argument'];
|
||||
}
|
||||
if ($argument === null) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$encoder = new FilterSettingsEncoder();
|
||||
|
||||
return $encoder->encode($argument);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
<?php
|
||||
|
||||
namespace EP\EpTheme\ViewHelpers;
|
||||
|
||||
/***************************************************************
|
||||
*
|
||||
* Copyright notice
|
||||
*
|
||||
* (c) 2018 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 EP\EpProducts\Domain\Model\Hotel;
|
||||
use EP\EpProducts\Domain\Model\Region;
|
||||
use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
|
||||
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
|
||||
use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic;
|
||||
|
||||
class GmapsUrlViewHelper extends AbstractViewHelper
|
||||
{
|
||||
use CompileWithRenderStatic;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
protected $escapeOutput = false;
|
||||
|
||||
const URLBASE = 'http://maps.google.com/maps?q=%s,%s&t=%s&z=%d';
|
||||
|
||||
public function initializeArguments()
|
||||
{
|
||||
parent::initializeArguments();
|
||||
|
||||
$this->registerArgument('hotel', Hotel::class, 'The hotel');
|
||||
$this->registerArgument('region', Region::class, 'The region');
|
||||
$this->registerArgument('type', 'string', 'The map type', false, 'p');
|
||||
$this->registerArgument('zoom', 'int', 'The zoom level', false, 10);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $arguments
|
||||
* @param \Closure $renderChildrenClosure
|
||||
* @param RenderingContextInterface $renderingContext
|
||||
* @return mixed
|
||||
*/
|
||||
public static function renderStatic(
|
||||
array $arguments,
|
||||
\Closure $renderChildrenClosure,
|
||||
RenderingContextInterface $renderingContext
|
||||
)
|
||||
{
|
||||
$hotel = $arguments['hotel'];
|
||||
$region = $arguments['region'];
|
||||
if ($hotel !== null && $hotel->getLatitude() && $hotel->getLongitude()) {
|
||||
$source = $hotel;
|
||||
} elseif ($hotel !== null && $hotel->getRegion()->getLatitude() && $hotel->getRegion()->getLongitude()) {
|
||||
$source = $hotel->getRegion();
|
||||
} elseif ($region !== null) {
|
||||
$source = $region;
|
||||
} else {
|
||||
return 'http://www.google.de/maps';
|
||||
}
|
||||
return sprintf(static::URLBASE, $source->getLatitude(), $source->getLongitude(), $arguments['type'], $arguments['zoom']);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
<?php
|
||||
|
||||
namespace EP\EpTheme\ViewHelpers;
|
||||
|
||||
/***************************************************************
|
||||
*
|
||||
* Copyright notice
|
||||
*
|
||||
* (c) 2018 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 TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
|
||||
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
|
||||
use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic;
|
||||
|
||||
class HotelCategoriesViewHelper extends AbstractViewHelper
|
||||
{
|
||||
use CompileWithRenderStatic;
|
||||
|
||||
public function initializeArguments()
|
||||
{
|
||||
parent::initializeArguments();
|
||||
|
||||
$this->registerArgument('categories', 'array', 'The categories', true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $arguments
|
||||
* @param \Closure $renderChildrenClosure
|
||||
* @param RenderingContextInterface $renderingContext
|
||||
* @return mixed
|
||||
*/
|
||||
public static function renderStatic(
|
||||
array $arguments,
|
||||
\Closure $renderChildrenClosure,
|
||||
RenderingContextInterface $renderingContext
|
||||
)
|
||||
{
|
||||
$categories = $arguments['categories'];
|
||||
|
||||
switch (count($categories)) {
|
||||
case 1:
|
||||
$label = reset($categories);
|
||||
break;
|
||||
default:
|
||||
$categoryMinLabel = array_shift($categories);
|
||||
$categoryMaxLabel = array_pop($categories);
|
||||
$label = $categoryMinLabel . ' - ' . $categoryMaxLabel;
|
||||
}
|
||||
|
||||
return $label;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
<?php
|
||||
|
||||
namespace EP\EpTheme\ViewHelpers;
|
||||
|
||||
/***************************************************************
|
||||
*
|
||||
* Copyright notice
|
||||
*
|
||||
* (c) 2018 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 EP\EpProducts\Domain\Model\Hotel;
|
||||
use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
|
||||
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
|
||||
use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic;
|
||||
|
||||
class HotelCategoryViewHelper extends AbstractViewHelper
|
||||
{
|
||||
use CompileWithRenderStatic;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
static protected $categoryLabels = [
|
||||
Hotel::CATEGORY_STANDARD => 'Standard',
|
||||
Hotel::CATEGORY_COMFORT => 'Comfort',
|
||||
Hotel::CATEGORY_DELUXE => 'Deluxe',
|
||||
Hotel::CATEGORY_SUPER_DELUXE => 'Super Deluxe',
|
||||
];
|
||||
|
||||
public function initializeArguments()
|
||||
{
|
||||
parent::initializeArguments();
|
||||
|
||||
$this->registerArgument('category', 'int', 'The category id', true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $arguments
|
||||
* @param \Closure $renderChildrenClosure
|
||||
* @param RenderingContextInterface $renderingContext
|
||||
* @return mixed
|
||||
*/
|
||||
public static function renderStatic(
|
||||
array $arguments,
|
||||
\Closure $renderChildrenClosure,
|
||||
RenderingContextInterface $renderingContext
|
||||
)
|
||||
{
|
||||
$category = $arguments['category'];
|
||||
|
||||
return static::$categoryLabels[$category];
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
namespace EP\EpTheme\ViewHelpers;
|
||||
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
use TYPO3\CMS\Extbase\Service\ImageService;
|
||||
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractTagBasedViewHelper;
|
||||
|
||||
class IconViewHelper extends AbstractTagBasedViewHelper
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $tagName = 'svg';
|
||||
|
||||
public function initializeArguments()
|
||||
{
|
||||
parent::initializeArguments();
|
||||
|
||||
$this->registerUniversalTagAttributes();
|
||||
$this->registerArgument('icon', 'string', 'Icon name', true);
|
||||
}
|
||||
|
||||
public function render(): string
|
||||
{
|
||||
$imageService = self::getImageService();
|
||||
$sprite = $imageService->getImage('EXT:ep_theme/Resources/Public/images/icons_sprite.svg', null, false);
|
||||
$imageUrl = $sprite->getPublicUrl();
|
||||
|
||||
$content = sprintf('<use href="%s#icon-%s"></use>', $imageUrl, $this->arguments['icon']);
|
||||
$this->tag->setContent($content);
|
||||
$this->tag->addAttributes(['aria-hidden' => 'true']);
|
||||
|
||||
return $this->tag->render();
|
||||
}
|
||||
|
||||
protected static function getImageService()
|
||||
{
|
||||
return GeneralUtility::makeInstance(ImageService::class);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace EP\EpTheme\ViewHelpers;
|
||||
|
||||
use EP\EpProducts\Service\MyEpUrlResolverService;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
|
||||
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
|
||||
use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic;
|
||||
|
||||
class MyEpUrlViewHelper extends AbstractViewHelper
|
||||
{
|
||||
use CompileWithRenderStatic;
|
||||
|
||||
/**
|
||||
* @param array $arguments
|
||||
* @param \Closure $renderChildrenClosure
|
||||
* @param RenderingContextInterface $renderingContext
|
||||
* @return string
|
||||
*/
|
||||
public static function renderStatic(
|
||||
array $arguments,
|
||||
\Closure $renderChildrenClosure,
|
||||
RenderingContextInterface $renderingContext
|
||||
): string {
|
||||
return GeneralUtility::makeInstance(MyEpUrlResolverService::class)->resolve();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
<?php
|
||||
|
||||
namespace EP\EpTheme\ViewHelpers;
|
||||
|
||||
/***************************************************************
|
||||
*
|
||||
* Copyright notice
|
||||
*
|
||||
* (c) 2018 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 TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
|
||||
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
|
||||
use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic;
|
||||
|
||||
class NightsOptionsViewHelper extends AbstractViewHelper
|
||||
{
|
||||
use CompileWithRenderStatic;
|
||||
|
||||
public function initializeArguments()
|
||||
{
|
||||
parent::initializeArguments();
|
||||
|
||||
$this->registerArgument('options', 'array', 'The options');
|
||||
$this->registerArgument('daytrip', 'bool', 'Is daytrip or not', false, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $arguments
|
||||
* @param \Closure $renderChildrenClosure
|
||||
* @param RenderingContextInterface $renderingContext
|
||||
* @return mixed
|
||||
*/
|
||||
public static function renderStatic(
|
||||
array $arguments,
|
||||
\Closure $renderChildrenClosure,
|
||||
RenderingContextInterface $renderingContext
|
||||
)
|
||||
{
|
||||
if ($arguments['daytrip']) {
|
||||
return 'Tageweise buchbar';
|
||||
}
|
||||
$options = $arguments['options'];
|
||||
if ($options === null) {
|
||||
return '';
|
||||
}
|
||||
sort($options);
|
||||
$optionsCount = count($options);
|
||||
$lastOption = array_pop($options);
|
||||
$output = '';
|
||||
if ($optionsCount > 2) {
|
||||
$output .= implode(', ' , $options) . ' oder ' . $lastOption;
|
||||
} elseif ($optionsCount === 2) {
|
||||
$output .= reset($options) . ' oder ' . $lastOption;
|
||||
} else {
|
||||
$output = $lastOption;
|
||||
}
|
||||
$output .= (int) $lastOption > 1 ? ' Nächte' : ' Nacht';
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
|
||||
namespace EP\EpTheme\ViewHelpers;
|
||||
|
||||
/***************************************************************
|
||||
*
|
||||
* Copyright notice
|
||||
*
|
||||
* (c) 2021 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 TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
|
||||
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
|
||||
use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic;
|
||||
|
||||
class PriceRangeViewHelper extends AbstractViewHelper
|
||||
{
|
||||
use CompileWithRenderStatic;
|
||||
|
||||
public function initializeArguments()
|
||||
{
|
||||
parent::initializeArguments();
|
||||
|
||||
$this->registerArgument('min', 'mixed', 'Price range start');
|
||||
$this->registerArgument('max', 'mixed', 'Price range end');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $arguments
|
||||
* @param \Closure $renderChildrenClosure
|
||||
* @param RenderingContextInterface $renderingContext
|
||||
* @return mixed
|
||||
*/
|
||||
public static function renderStatic(
|
||||
array $arguments,
|
||||
\Closure $renderChildrenClosure,
|
||||
RenderingContextInterface $renderingContext
|
||||
) {
|
||||
if (1 === (int) $arguments['min']) {
|
||||
return sprintf('bis %d €', $arguments['max']);
|
||||
}
|
||||
if (999 === (int) $arguments['max']) {
|
||||
return sprintf('ab %d €', $arguments['min']);
|
||||
}
|
||||
|
||||
return sprintf('%d bis %d €', $arguments['min'], $arguments['max']);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
namespace EP\EpTheme\ViewHelpers;
|
||||
|
||||
use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
|
||||
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
|
||||
use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithContentArgumentAndRenderStatic;
|
||||
|
||||
/**
|
||||
* Formats a euro amount the way the website always has for whole euros ("229",
|
||||
* "1234"), and with German decimals where there are cents ("99,90"). Prices are
|
||||
* stored with cents, and the database hands them over as strings like "229.00".
|
||||
*
|
||||
* Keep in sync with formatPrice() in pricetable_controller.js.
|
||||
*
|
||||
* Usage: {row.minPrice -> ep:price()} €
|
||||
*/
|
||||
class PriceViewHelper extends AbstractViewHelper
|
||||
{
|
||||
use CompileWithContentArgumentAndRenderStatic;
|
||||
|
||||
public function initializeArguments()
|
||||
{
|
||||
parent::initializeArguments();
|
||||
|
||||
$this->registerArgument('value', 'mixed', 'Amount in euros');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $arguments
|
||||
* @param \Closure $renderChildrenClosure
|
||||
* @param RenderingContextInterface $renderingContext
|
||||
* @return string
|
||||
*/
|
||||
public static function renderStatic(
|
||||
array $arguments,
|
||||
\Closure $renderChildrenClosure,
|
||||
RenderingContextInterface $renderingContext
|
||||
) {
|
||||
$amount = round((float) $renderChildrenClosure(), 2);
|
||||
$decimals = floor($amount) === $amount ? 0 : 2;
|
||||
|
||||
return number_format($amount, $decimals, ',', '');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
<?php
|
||||
|
||||
namespace EP\EpTheme\ViewHelpers;
|
||||
|
||||
/***************************************************************
|
||||
*
|
||||
* Copyright notice
|
||||
*
|
||||
* (c) 2018 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 EP\EpProducts\Domain\Model\Product;
|
||||
use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
|
||||
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
|
||||
use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic;
|
||||
|
||||
class RatingViewHelper extends AbstractViewHelper
|
||||
{
|
||||
use CompileWithRenderStatic;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
protected $escapeOutput = false;
|
||||
|
||||
public function initializeArguments()
|
||||
{
|
||||
parent::initializeArguments();
|
||||
|
||||
$this->registerArgument('product', Product::class, 'The product', true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $arguments
|
||||
* @param \Closure $renderChildrenClosure
|
||||
* @param RenderingContextInterface $renderingContext
|
||||
* @return mixed
|
||||
*/
|
||||
public static function renderStatic(
|
||||
array $arguments,
|
||||
\Closure $renderChildrenClosure,
|
||||
RenderingContextInterface $renderingContext
|
||||
)
|
||||
{
|
||||
$product = $renderChildrenClosure();
|
||||
if ($product === null) {
|
||||
$product = $arguments['product'];
|
||||
}
|
||||
$ratingAverage = $product->getRatingAverage();
|
||||
$ratingVotesCount = $product->getRatingVotesCount();
|
||||
$fullStars = floor($ratingAverage);
|
||||
$halfStar = ($ratingAverage - $fullStars) > 0;
|
||||
$ratingAverageLabel = number_format($ratingAverage, 1, ',', '.');
|
||||
|
||||
$content = '';
|
||||
for ($i = 1; $i <= $fullStars; $i++)
|
||||
{
|
||||
$content .= '<i class="fa fa-star" aria-hidden="true"></i>';
|
||||
}
|
||||
if ($halfStar) {
|
||||
$content .= '<i class="fa fa-star-half-o" aria-hidden="true"></i>';
|
||||
}
|
||||
$content .= sprintf('%s Sterne (%d)', $ratingAverageLabel, $ratingVotesCount);
|
||||
|
||||
return $content;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
namespace EP\EpTheme\ViewHelpers\Stimulus;
|
||||
|
||||
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
|
||||
|
||||
/**
|
||||
* This code is adapted from the Symfony WebpackEncoreBundle package.
|
||||
* (c) Fabien Potencier <[email protected]>
|
||||
*/
|
||||
class AbstractStimulusViewHelper extends AbstractViewHelper
|
||||
{
|
||||
/**
|
||||
* This method is taken from symfony/webpack-encore-bundle
|
||||
*
|
||||
* Normalize a Stimulus controller name into its HTML equivalent (no special character and / becomes --).
|
||||
*
|
||||
* @see https://stimulus.hotwire.dev/reference/controllers
|
||||
*/
|
||||
protected static function normalizeControllerName(string $str): string
|
||||
{
|
||||
return preg_replace('/^@/', '', str_replace('_', '-', str_replace('/', '--', $str)));
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is taken from symfony/webpack-encore-bundle
|
||||
*
|
||||
* Normalize a Stimulus Value API key into its HTML equivalent ("kebab case").
|
||||
* Backport features from symfony/string.
|
||||
*
|
||||
* @see https://stimulus.hotwire.dev/reference/values
|
||||
*/
|
||||
protected static function normalizeKeyName(string $str): string
|
||||
{
|
||||
// Adapted from ByteString::camel
|
||||
$str = ucfirst(str_replace(' ', '', ucwords(preg_replace('/[^a-zA-Z0-9\x7f-\xff]++/', ' ', $str))));
|
||||
|
||||
// Adapted from ByteString::snake
|
||||
return strtolower(preg_replace(['/([A-Z]+)([A-Z][a-z])/', '/([a-z\d])([A-Z])/'], '\1-\2', $str));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
<?php
|
||||
|
||||
namespace EP\EpTheme\ViewHelpers\Stimulus;
|
||||
|
||||
use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
|
||||
use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic;
|
||||
|
||||
/**
|
||||
* This code is adapted from the Symfony WebpackEncoreBundle package.
|
||||
* (c) Fabien Potencier <[email protected]>
|
||||
*/
|
||||
class ActionViewHelper extends AbstractStimulusViewHelper
|
||||
{
|
||||
use CompileWithRenderStatic;
|
||||
|
||||
protected $escapeOutput = false;
|
||||
|
||||
public function initializeArguments()
|
||||
{
|
||||
parent::initializeArguments();
|
||||
|
||||
$this->registerArgument('controller', 'mixed', 'Controller name(s)', true);
|
||||
$this->registerArgument('action', 'string', 'Action name', false);
|
||||
$this->registerArgument('event', 'string', 'Event name', false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $arguments
|
||||
* @param \Closure $renderChildrenClosure
|
||||
* @param RenderingContextInterface $renderingContext
|
||||
* @return string
|
||||
*/
|
||||
public static function renderStatic(
|
||||
array $arguments,
|
||||
\Closure $renderChildrenClosure,
|
||||
RenderingContextInterface $renderingContext
|
||||
)
|
||||
{
|
||||
$dataOrControllerName = $arguments['controller'];
|
||||
$actionName = $arguments['action'];
|
||||
$eventName = $arguments['event'];
|
||||
|
||||
if (\is_string($dataOrControllerName)) {
|
||||
$data = [$dataOrControllerName => null === $eventName ? [[$actionName]] : [[$eventName => $actionName]]];
|
||||
} else {
|
||||
if ($actionName || $eventName) {
|
||||
throw new \InvalidArgumentException('You cannot pass a string to the second or third argument while passing an array to the first argument of stimulus_action(): check the documentation.');
|
||||
}
|
||||
|
||||
$data = $dataOrControllerName;
|
||||
|
||||
if (!$data) {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
$actions = [];
|
||||
|
||||
foreach ($data as $controllerName => $controllerActions) {
|
||||
$controllerName = static::normalizeControllerName($controllerName);
|
||||
|
||||
if (\is_string($controllerActions)) {
|
||||
$controllerActions = [[$controllerActions]];
|
||||
}
|
||||
|
||||
foreach ($controllerActions as $possibleEventName => $controllerAction) {
|
||||
if (\is_string($possibleEventName) && \is_string($controllerAction)) {
|
||||
$controllerAction = [$possibleEventName => $controllerAction];
|
||||
} elseif (\is_string($controllerAction)) {
|
||||
$controllerAction = [$controllerAction];
|
||||
}
|
||||
|
||||
foreach ($controllerAction as $eventName => $actionName) {
|
||||
$action = $controllerName.'#'.htmlspecialchars($actionName, ENT_QUOTES);
|
||||
|
||||
if (\is_string($eventName)) {
|
||||
$action = $eventName.'->'.$action;
|
||||
}
|
||||
|
||||
$actions[] = $action;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 'data-action="'.implode(' ', $actions).'"';
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
<?php
|
||||
|
||||
namespace EP\EpTheme\ViewHelpers\Stimulus;
|
||||
|
||||
use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
|
||||
use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic;
|
||||
|
||||
/**
|
||||
* This code is adapted from the Symfony WebpackEncoreBundle package.
|
||||
* (c) Fabien Potencier <[email protected]>
|
||||
*/
|
||||
class ControllerViewHelper extends AbstractStimulusViewHelper
|
||||
{
|
||||
use CompileWithRenderStatic;
|
||||
|
||||
protected $escapeOutput = false;
|
||||
|
||||
public function initializeArguments()
|
||||
{
|
||||
parent::initializeArguments();
|
||||
|
||||
$this->registerArgument('controller', 'mixed', 'Controller name(s)', true);
|
||||
$this->registerArgument('values', 'array', 'Controller values', false, []);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $arguments
|
||||
* @param \Closure $renderChildrenClosure
|
||||
* @param RenderingContextInterface $renderingContext
|
||||
* @return string
|
||||
*/
|
||||
public static function renderStatic(
|
||||
array $arguments,
|
||||
\Closure $renderChildrenClosure,
|
||||
RenderingContextInterface $renderingContext
|
||||
)
|
||||
{
|
||||
$dataOrControllerName = $arguments['controller'];
|
||||
$controllerValues = $arguments['values'];
|
||||
|
||||
if (\is_string($dataOrControllerName)) {
|
||||
$data = [$dataOrControllerName => $controllerValues];
|
||||
} else {
|
||||
if ($controllerValues) {
|
||||
throw new \InvalidArgumentException('You cannot pass an array to the first and second argument of stimulus_controller(): check the documentation.');
|
||||
}
|
||||
|
||||
$data = $dataOrControllerName;
|
||||
|
||||
if (!$data) {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
$controllers = [];
|
||||
$values = [];
|
||||
|
||||
foreach ($data as $controllerName => $controllerValues) {
|
||||
$controllerName = static::normalizeControllerName($controllerName);
|
||||
$controllers[] = $controllerName;
|
||||
|
||||
foreach ($controllerValues as $key => $value) {
|
||||
if (!is_scalar($value)) {
|
||||
$value = json_encode($value);
|
||||
}
|
||||
|
||||
if (\is_bool($value)) {
|
||||
$value = $value ? 'true' : 'false';
|
||||
}
|
||||
|
||||
$key = static::normalizeKeyName($key);
|
||||
$value = htmlspecialchars($value, ENT_QUOTES);
|
||||
|
||||
$values[] = 'data-'.$controllerName.'-'.$key.'-value="'.$value.'"';
|
||||
}
|
||||
}
|
||||
|
||||
return rtrim('data-controller="'.implode(' ', $controllers).'" '.implode(' ', $values));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
<?php
|
||||
|
||||
namespace EP\EpTheme\ViewHelpers\Stimulus;
|
||||
|
||||
use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
|
||||
use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic;
|
||||
|
||||
/**
|
||||
* This code is adapted from the Symfony WebpackEncoreBundle package.
|
||||
* (c) Fabien Potencier <[email protected]>
|
||||
*/
|
||||
class TargetViewHelper extends AbstractStimulusViewHelper
|
||||
{
|
||||
use CompileWithRenderStatic;
|
||||
|
||||
protected $escapeOutput = false;
|
||||
|
||||
public function initializeArguments()
|
||||
{
|
||||
parent::initializeArguments();
|
||||
|
||||
$this->registerArgument('controller', 'mixed', 'Controller name(s)', true);
|
||||
$this->registerArgument('targets', 'string', 'Target names', false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $arguments
|
||||
* @param \Closure $renderChildrenClosure
|
||||
* @param RenderingContextInterface $renderingContext
|
||||
* @return string
|
||||
*/
|
||||
public static function renderStatic(
|
||||
array $arguments,
|
||||
\Closure $renderChildrenClosure,
|
||||
RenderingContextInterface $renderingContext
|
||||
)
|
||||
{
|
||||
$dataOrControllerName = $arguments['controller'];
|
||||
$targetNames = $arguments['target'];
|
||||
|
||||
if (\is_string($dataOrControllerName)) {
|
||||
$data = [$dataOrControllerName => $targetNames];
|
||||
} else {
|
||||
if ($targetNames) {
|
||||
throw new \InvalidArgumentException('You cannot pass a string to the second argument while passing an array to the first argument of stimulus_target(): check the documentation.');
|
||||
}
|
||||
|
||||
$data = $dataOrControllerName;
|
||||
|
||||
if (!$data) {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
$targets = [];
|
||||
|
||||
foreach ($data as $controllerName => $targetNames) {
|
||||
$controllerName = static::normalizeControllerName($controllerName);
|
||||
|
||||
$targets['data-'.$controllerName.'-target'] = htmlspecialchars($targetNames, ENT_QUOTES);
|
||||
}
|
||||
|
||||
return implode(' ', array_map(static function (string $attribute, string $value): string {
|
||||
return $attribute.'="'.$value.'"';
|
||||
}, array_keys($targets), $targets));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
|
||||
namespace EP\EpTheme\ViewHelpers;
|
||||
|
||||
/***************************************************************
|
||||
*
|
||||
* Copyright notice
|
||||
*
|
||||
* (c) 2021 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 TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
|
||||
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
|
||||
use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic;
|
||||
|
||||
class ThemeClassesViewHelper extends AbstractViewHelper
|
||||
{
|
||||
use CompileWithRenderStatic;
|
||||
|
||||
public function initializeArguments()
|
||||
{
|
||||
parent::initializeArguments();
|
||||
|
||||
$this->registerArgument('key', 'string', 'The theme key', false, 'ep');
|
||||
$this->registerArgument('classes', 'array', 'The classes to apply per theme key', true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $arguments
|
||||
* @param \Closure $renderChildrenClosure
|
||||
* @param RenderingContextInterface $renderingContext
|
||||
* @return mixed
|
||||
*/
|
||||
public static function renderStatic(
|
||||
array $arguments,
|
||||
\Closure $renderChildrenClosure,
|
||||
RenderingContextInterface $renderingContext
|
||||
)
|
||||
{
|
||||
$themeKey = $arguments['key'];
|
||||
|
||||
if (!array_key_exists($themeKey, $arguments['classes'])) {
|
||||
return '';
|
||||
}
|
||||
|
||||
return $arguments['classes'][$themeKey];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
<?php
|
||||
|
||||
namespace EP\EpTheme\ViewHelpers\Uri;
|
||||
|
||||
/***************************************************************
|
||||
*
|
||||
* Copyright notice
|
||||
*
|
||||
* (c) 2018 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\Core\Utility\RootlineUtility;
|
||||
use TYPO3\CMS\Fluid\ViewHelpers\Uri\ActionViewHelper;
|
||||
use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
|
||||
|
||||
class AjaxViewHelper extends ActionViewHelper
|
||||
{
|
||||
|
||||
const PAGE_TYPE_JSON = 1701;
|
||||
const PAGE_TYPE_HTML = 1702;
|
||||
|
||||
public function initializeArguments()
|
||||
{
|
||||
parent::initializeArguments();
|
||||
|
||||
$this->overrideArgument('extensionName', 'string', 'Target extension name', false, 'epproducts');
|
||||
$this->overrideArgument('pluginName', 'string', 'Target plugin name', false, 'Ajax');
|
||||
$this->overrideArgument('format', 'string', 'The requested format', false, 'json');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $arguments
|
||||
* @param \Closure $renderChildrenClosure
|
||||
* @param RenderingContextInterface $renderingContext
|
||||
* @return string
|
||||
*/
|
||||
public static function renderStatic
|
||||
(
|
||||
array $arguments,
|
||||
\Closure $renderChildrenClosure,
|
||||
RenderingContextInterface $renderingContext
|
||||
) {
|
||||
// Determine page type from format argument
|
||||
if (strtolower(trim($arguments['format'])) === 'json') {
|
||||
$arguments['pageType'] = self::PAGE_TYPE_JSON;
|
||||
} else {
|
||||
$arguments['pageType'] = self::PAGE_TYPE_HTML;
|
||||
}
|
||||
|
||||
// Reset argument to keep it out of resulting url
|
||||
unset($arguments['format']);
|
||||
|
||||
// Use root page uid as target unless provided
|
||||
if ($arguments['pageUid'] === null) {
|
||||
$rootlineUtility = new RootlineUtility($GLOBALS['TSFE']->id);
|
||||
$rootline = $rootlineUtility->get();
|
||||
$rootPage = array_pop($rootline);
|
||||
$arguments['pageUid'] = $rootPage['uid'];
|
||||
}
|
||||
|
||||
// Force absolute urls
|
||||
$arguments['absolute'] = true;
|
||||
|
||||
return parent::renderStatic(
|
||||
$arguments,
|
||||
$renderChildrenClosure,
|
||||
$renderingContext
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
<?php
|
||||
|
||||
namespace EP\EpTheme\ViewHelpers\Uri;
|
||||
|
||||
/***************************************************************
|
||||
*
|
||||
* Copyright notice
|
||||
*
|
||||
* (c) 2018 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 EP\EpProducts\Utility\BookingUrlUtility;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface;
|
||||
use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
|
||||
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
|
||||
use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic;
|
||||
|
||||
class BookingViewHelper extends AbstractViewHelper
|
||||
{
|
||||
use CompileWithRenderStatic;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected static $settings = [];
|
||||
|
||||
/**
|
||||
* @param ConfigurationManagerInterface $configurationManager
|
||||
*/
|
||||
public function __construct(ConfigurationManagerInterface $configurationManager)
|
||||
{
|
||||
$settings = GeneralUtility::removeDotsFromTS(
|
||||
$configurationManager->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_FULL_TYPOSCRIPT)
|
||||
);
|
||||
static::$settings = $settings['plugin']['tx_theme'];
|
||||
}
|
||||
|
||||
public function initializeArguments()
|
||||
{
|
||||
parent::initializeArguments();
|
||||
|
||||
$this->registerArgument('bookingId', 'string', 'The booking id', true);
|
||||
$this->registerArgument('hotelId', 'string', 'The hotel id', true);
|
||||
$this->registerArgument('template', 'string', 'The booking template');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $arguments
|
||||
* @param \Closure $renderChildrenClosure
|
||||
* @param RenderingContextInterface $renderingContext
|
||||
* @return mixed
|
||||
*/
|
||||
public static function renderStatic(
|
||||
array $arguments,
|
||||
\Closure $renderChildrenClosure,
|
||||
RenderingContextInterface $renderingContext
|
||||
)
|
||||
{
|
||||
$template = $arguments['template'];
|
||||
|
||||
if ($template === null) {
|
||||
$template = static::$settings['bpnBookungUrlTemplateCode'];
|
||||
}
|
||||
|
||||
$options = [
|
||||
'dateId' => $arguments['bookingId'],
|
||||
'hotelId' => $arguments['hotelId'],
|
||||
'theme' => $template,
|
||||
];
|
||||
return BookingUrlUtility::generateUrl($options);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
<?php
|
||||
|
||||
namespace EP\EpTheme\ViewHelpers\Uri;
|
||||
|
||||
/***************************************************************
|
||||
*
|
||||
* Copyright notice
|
||||
*
|
||||
* (c) 2018 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 TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
|
||||
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
|
||||
use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic;
|
||||
|
||||
class ExternalImageViewHelper extends AbstractViewHelper
|
||||
{
|
||||
use CompileWithRenderStatic;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
protected $escapeOutput = false;
|
||||
|
||||
public function initializeArguments()
|
||||
{
|
||||
parent::initializeArguments();
|
||||
|
||||
$this->registerArgument('url', 'string', 'The url');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $arguments
|
||||
* @param \Closure $renderChildrenClosure
|
||||
* @param RenderingContextInterface $renderingContext
|
||||
* @return mixed
|
||||
*/
|
||||
public static function renderStatic(
|
||||
array $arguments,
|
||||
\Closure $renderChildrenClosure,
|
||||
RenderingContextInterface $renderingContext
|
||||
)
|
||||
{
|
||||
$url = $renderChildrenClosure();
|
||||
if ($url === null) {
|
||||
$url = $arguments['url'];
|
||||
}
|
||||
$encryptionKey = $GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey'];
|
||||
$token = sha1($url . $encryptionKey);
|
||||
return 'https://www.ep-reisen.de/typo3conf/ext/ep_theme/extimg.php?url=' . urlencode($url) . '&token=' . $token;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
<?php
|
||||
|
||||
namespace EP\EpTheme\ViewHelpers\Uri;
|
||||
|
||||
/***************************************************************
|
||||
*
|
||||
* Copyright notice
|
||||
*
|
||||
* (c) 2018 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 TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
|
||||
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
|
||||
use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic;
|
||||
|
||||
class ProductViewHelper extends AbstractViewHelper
|
||||
{
|
||||
use CompileWithRenderStatic;
|
||||
|
||||
public function initializeArguments()
|
||||
{
|
||||
parent::initializeArguments();
|
||||
|
||||
$this->registerArgument('product', 'mixed', 'The product');
|
||||
$this->registerArgument('hotel', 'array', 'The hotel');
|
||||
$this->registerArgument('forceHotelUid', 'bool', 'Whether to force link a 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)');
|
||||
$this->registerArgument('ref', 'string', 'Referring URL');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $arguments
|
||||
* @param \Closure $renderChildrenClosure
|
||||
* @param RenderingContextInterface $renderingContext
|
||||
* @return mixed
|
||||
*/
|
||||
public static function renderStatic(
|
||||
array $arguments,
|
||||
\Closure $renderChildrenClosure,
|
||||
RenderingContextInterface $renderingContext
|
||||
) {
|
||||
$product = $arguments['product'];
|
||||
$hotel = $arguments['hotel'];
|
||||
|
||||
if ($arguments['forceHotelUid']) {
|
||||
// Product detail page with forced hotel
|
||||
$linkArguments = [
|
||||
'product' => is_array($product) ? $product['uid'] : $product,
|
||||
'hotel' => is_array($hotel) ? $hotel['uid'] : $hotel,
|
||||
];
|
||||
} elseif ($arguments['dateFrom'] || $arguments['dateTo']) {
|
||||
// Product detail page with forced date range
|
||||
$linkArguments = [
|
||||
'dateFrom' => $arguments['dateFrom'],
|
||||
'dateTo' => $arguments['dateTo'],
|
||||
];
|
||||
} else {
|
||||
// Default product detail page by product uid
|
||||
$linkArguments = [
|
||||
'product' => is_array($product) ? $product['uid'] : $product,
|
||||
];
|
||||
}
|
||||
|
||||
$targetPageUid = is_array($product) ? (int)$product['detailPage'] : $product->getDetailPage();
|
||||
|
||||
$uri = $renderingContext
|
||||
->getControllerContext()
|
||||
->getUriBuilder()
|
||||
->reset()
|
||||
->setTargetPageUid($targetPageUid)
|
||||
->uriFor('detail', $linkArguments, 'Product', 'epproducts', 'product_detail')
|
||||
;
|
||||
|
||||
if ($arguments['ref']) {
|
||||
$referringPageUri = urlencode($arguments['ref']);
|
||||
$hasQuery = null !== parse_url($uri, PHP_URL_QUERY);
|
||||
$separator = $hasQuery ? '&' : '?';
|
||||
$uri .= $separator . 'ref=' . $referringPageUri;
|
||||
}
|
||||
|
||||
return $uri;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
<?php
|
||||
|
||||
namespace EP\EpTheme\ViewHelpers\Uri;
|
||||
|
||||
/***************************************************************
|
||||
*
|
||||
* 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 TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
|
||||
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
|
||||
use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic;
|
||||
|
||||
class VideoViewHelper extends AbstractViewHelper
|
||||
{
|
||||
use CompileWithRenderStatic;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
protected $escapeOutput = false;
|
||||
|
||||
public function initializeArguments()
|
||||
{
|
||||
parent::initializeArguments();
|
||||
|
||||
$this->registerArgument('value', 'string', 'The video url', true);
|
||||
$this->registerArgument('layout', 'int', 'The layout', false, 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $arguments
|
||||
* @param \Closure $renderChildrenClosure
|
||||
* @param RenderingContextInterface $renderingContext
|
||||
* @return mixed
|
||||
*/
|
||||
public static function renderStatic(
|
||||
array $arguments,
|
||||
\Closure $renderChildrenClosure,
|
||||
RenderingContextInterface $renderingContext
|
||||
)
|
||||
{
|
||||
// YouTube
|
||||
if ((int) $arguments['layout'] === 0) {
|
||||
return $arguments['value'] . '?rel=0&controls=0&showinfo=0';
|
||||
}
|
||||
// Vimeo
|
||||
if ((int) $arguments['layout'] === 1) {
|
||||
return sprintf('https://player.vimeo.com/video/%d?html5=1', $arguments['value']);
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
}
|
||||
Executable
+1
@@ -0,0 +1 @@
|
||||
deny from all
|
||||
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types = 1);
|
||||
|
||||
return [
|
||||
\EP\EpTheme\Domain\Model\Page::class => [
|
||||
'tableName' => 'pages',
|
||||
],
|
||||
];
|
||||
@@ -0,0 +1,64 @@
|
||||
<T3DataStructure>
|
||||
<meta>
|
||||
<langDisable>1</langDisable>
|
||||
</meta>
|
||||
<sheets>
|
||||
<sDEF>
|
||||
<ROOT>
|
||||
<TCEforms>
|
||||
<sheetTitle>Konfiguration</sheetTitle>
|
||||
</TCEforms>
|
||||
<type>array</type>
|
||||
<el>
|
||||
<buttons>
|
||||
<section>1</section>
|
||||
<type>array</type>
|
||||
<el>
|
||||
<container>
|
||||
<title>Button</title>
|
||||
<type>array</type>
|
||||
<el>
|
||||
<label>
|
||||
<TCEforms>
|
||||
<label>Label</label>
|
||||
<config>
|
||||
<type>input</type>
|
||||
<size>32</size>
|
||||
</config>
|
||||
</TCEforms>
|
||||
</label>
|
||||
<link>
|
||||
<TCEforms>
|
||||
<exclude>1</exclude>
|
||||
<label>Button</label>
|
||||
<config>
|
||||
<type>input</type>
|
||||
<eval>trim</eval>
|
||||
<size>30</size>
|
||||
<wizards type="array">
|
||||
<_PADDING type="integer">2</_PADDING>
|
||||
<link type="array">
|
||||
<type>popup</type>
|
||||
<title>Link</title>
|
||||
<icon>EXT:backend/Resources/Public/Images/FormFieldWizard/wizard_link.gif</icon>
|
||||
<module>
|
||||
<name>wizard_link</name>
|
||||
<urlParameters>
|
||||
<mode>wizard</mode>
|
||||
</urlParameters>
|
||||
</module>
|
||||
<JSopenParams>height=300,width=500,status=0,menubar=0,scrollbars=1</JSopenParams>
|
||||
</link>
|
||||
</wizards>
|
||||
</config>
|
||||
</TCEforms>
|
||||
</link>
|
||||
</el>
|
||||
</container>
|
||||
</el>
|
||||
</buttons>
|
||||
</el>
|
||||
</ROOT>
|
||||
</sDEF>
|
||||
</sheets>
|
||||
</T3DataStructure>
|
||||
@@ -0,0 +1,41 @@
|
||||
imports:
|
||||
- { resource: "EXT:rte_ckeditor/Configuration/RTE/Processing.yaml" }
|
||||
- { resource: "EXT:rte_ckeditor/Configuration/RTE/Editor/Base.yaml" }
|
||||
- { resource: "EXT:rte_ckeditor/Configuration/RTE/Editor/Plugins.yaml" }
|
||||
|
||||
editor:
|
||||
config:
|
||||
disableNativeSpellChecker: false
|
||||
contentsCss:
|
||||
- "EXT:ep_theme/Resources/Public/css/rte.css?v=2022.07-01"
|
||||
|
||||
stylesSet:
|
||||
- { name: "Button", element: "a", attributes: { 'class': 'rte-button' } }
|
||||
- { name: "Button volle Breite", element: "a", attributes: { 'class': 'rte-button--full' } }
|
||||
|
||||
toolbarGroups:
|
||||
- { name: styles, groups: [ format, styles ] }
|
||||
- { name: basicstyles, groups: [ basicstyles ] }
|
||||
- { name: paragraph, groups: [ list] }
|
||||
- "/"
|
||||
- { name: links, groups: [ links ] }
|
||||
- { name: clipboard, groups: [ clipboard, cleanup, undo ] }
|
||||
- { name: editing, groups: [ spellchecker ] }
|
||||
- { name: insert, groups: [ insert ] }
|
||||
- { name: tools, groups: [ table, specialchar ] }
|
||||
- { name: document, groups: [ mode ] }
|
||||
|
||||
format_tags: "p;h1;h2;h3;h4"
|
||||
|
||||
removePlugins:
|
||||
- image
|
||||
|
||||
removeButtons:
|
||||
- Anchor
|
||||
- Underline
|
||||
- Strike
|
||||
|
||||
buttons:
|
||||
link:
|
||||
queryParametersSelector:
|
||||
enabled: 1
|
||||
@@ -0,0 +1,37 @@
|
||||
imports:
|
||||
- { resource: "EXT:rte_ckeditor/Configuration/RTE/Processing.yaml" }
|
||||
- { resource: "EXT:rte_ckeditor/Configuration/RTE/Editor/Base.yaml" }
|
||||
- { resource: "EXT:rte_ckeditor/Configuration/RTE/Editor/Plugins.yaml" }
|
||||
|
||||
editor:
|
||||
config:
|
||||
height: 100
|
||||
disableNativeSpellChecker: false
|
||||
contentsCss:
|
||||
- "EXT:ep_theme/Resources/Public/css/rte.css?v=2020.02-01"
|
||||
|
||||
stylesSet:
|
||||
- { name: "Button", element: "a", attributes: { 'class': 'rte-button' } }
|
||||
- { name: "Button volle Breite", element: "a", attributes: { 'class': 'rte-button--full' } }
|
||||
|
||||
toolbarGroups:
|
||||
- { name: paragraph, groups: [ list] }
|
||||
- "/"
|
||||
- { name: links, groups: [ links ] }
|
||||
- { name: tools, groups: [ specialchar ] }
|
||||
- { name: document, groups: [ mode ] }
|
||||
|
||||
format_tags: "p;h1;h2;h3;h4"
|
||||
|
||||
removePlugins:
|
||||
- image
|
||||
|
||||
removeButtons:
|
||||
- Anchor
|
||||
- Underline
|
||||
- Strike
|
||||
|
||||
buttons:
|
||||
link:
|
||||
queryParametersSelector:
|
||||
enabled: 1
|
||||
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'frontend' => [
|
||||
'ep/referrer' => [
|
||||
'target' => \EP\EpTheme\Middleware\ReferrerMiddleware::class,
|
||||
'after' => [
|
||||
'typo3/cms-frontend/site',
|
||||
],
|
||||
],
|
||||
],
|
||||
];
|
||||
@@ -0,0 +1,9 @@
|
||||
services:
|
||||
_defaults:
|
||||
autowire: true
|
||||
autoconfigure: true
|
||||
public: false
|
||||
|
||||
EP\EpTheme\:
|
||||
resource: '../Classes/*'
|
||||
exclude: '../Classes/Domain/Model/*'
|
||||
@@ -0,0 +1,155 @@
|
||||
<?php
|
||||
|
||||
defined('TYPO3_MODE') or die();
|
||||
|
||||
call_user_func(function() {
|
||||
|
||||
$temporaryColumns = [
|
||||
'tx_eptheme_context_pacode' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'PA Code für diese Seite',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 8,
|
||||
'eval' => 'trim',
|
||||
],
|
||||
],
|
||||
'tx_eptheme_context_country_code' => [
|
||||
'config' => [
|
||||
'type' => 'passthrough'
|
||||
],
|
||||
],
|
||||
'tx_eptheme_context_country' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'Land',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'foreign_table' => 'tx_epproducts_domain_model_country',
|
||||
'foreign_table_where' => 'ORDER BY name',
|
||||
'items' => [
|
||||
['Keine Zuordnung', 0],
|
||||
],
|
||||
'minitems' => 0,
|
||||
'maxitems' => 1,
|
||||
]
|
||||
],
|
||||
'tx_eptheme_context_region' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'Gebiet',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'foreign_table' => 'tx_epproducts_domain_model_region',
|
||||
'foreign_table_where' => 'ORDER BY name',
|
||||
'items' => [
|
||||
['Keine Zuordnung', 0],
|
||||
],
|
||||
'minitems' => 0,
|
||||
'maxitems' => 1,
|
||||
]
|
||||
],
|
||||
'tx_eptheme_hide_searchbar' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'Suchschlitz NICHT anzeigen',
|
||||
'config' => [
|
||||
'type' => 'check'
|
||||
]
|
||||
],
|
||||
'tx_eptheme_new_tab' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'Seite in neuem Tab/Fenster öffnen',
|
||||
'config' => [
|
||||
'type' => 'check'
|
||||
]
|
||||
],
|
||||
'tx_eptheme_bodyclass' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'CSS Klasse(n) für Body Tag',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 30,
|
||||
'eval' => 'trim'
|
||||
]
|
||||
],
|
||||
'tx_eptheme_navitemclass' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'CSS Klasse(n) für Topnavigation',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 30,
|
||||
'eval' => 'trim'
|
||||
]
|
||||
],
|
||||
'tx_eptheme_slides' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'Slides',
|
||||
'displayCond' => 'FIELD:backend_layout:!IN:pagets__detail,pagets__booking',
|
||||
'config' => [
|
||||
'type' => 'inline',
|
||||
'foreign_table' => 'tx_eptheme_domain_model_slide',
|
||||
'foreign_field' => 'page',
|
||||
'foreign_sortby' => 'sorting',
|
||||
'maxitems' => 5,
|
||||
'appearance' => [
|
||||
'useSortable' => 1,
|
||||
'collapseAll' => 1,
|
||||
'levelLinksPosition' => 'top',
|
||||
'showSynchronizationLink' => 0,
|
||||
'showPossibleLocalizationRecords' => 0,
|
||||
'showAllLocalizationLink' => 0
|
||||
],
|
||||
],
|
||||
],
|
||||
'tx_eptheme_badge' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'Badge',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'foreign_table' => 'tx_epproducts_domain_model_badge',
|
||||
'foreign_table_where' => 'ORDER BY title',
|
||||
'items' => [
|
||||
['Keine Zuordnung', 0],
|
||||
],
|
||||
'minitems' => 0,
|
||||
'maxitems' => 1,
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns(
|
||||
'pages',
|
||||
$temporaryColumns
|
||||
);
|
||||
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes(
|
||||
'pages',
|
||||
'--div--;Kontext,
|
||||
tx_eptheme_context_pacode,tx_eptheme_context_country,tx_eptheme_context_region,
|
||||
tx_eptheme_hide_searchbar,tx_eptheme_new_tab,tx_eptheme_bodyclass,tx_eptheme_navitemclass,
|
||||
--div--;Slider,
|
||||
tx_eptheme_slides,
|
||||
--div--;Badge,
|
||||
tx_eptheme_badge',
|
||||
'1,4'
|
||||
);
|
||||
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::registerPageTSConfigFile(
|
||||
'ep_theme',
|
||||
'Configuration/TSconfig/Page/Main.tsconfig',
|
||||
'EP Theme'
|
||||
);
|
||||
|
||||
$GLOBALS['TCA']['pages']['columns']['slug']['config']['generatorOptions']['fields'] = [
|
||||
[
|
||||
'nav_title',
|
||||
'title'
|
||||
]
|
||||
];
|
||||
|
||||
});
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
if (!defined('TYPO3_MODE')) die ('Access denied.');
|
||||
|
||||
$tca = [
|
||||
'ctrl' => [
|
||||
'default_sortby' => 'name DESC'
|
||||
],
|
||||
];
|
||||
|
||||
\TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule($GLOBALS['TCA']['sys_file'], $tca);
|
||||
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
defined('TYPO3_MODE') or die();
|
||||
|
||||
call_user_func(function () {
|
||||
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile(
|
||||
'ep_theme',
|
||||
'Configuration/TypoScript',
|
||||
'EP Theme'
|
||||
);
|
||||
|
||||
});
|
||||
@@ -0,0 +1,193 @@
|
||||
<?php
|
||||
|
||||
defined('TYPO3_MODE') or die();
|
||||
|
||||
call_user_func(function () {
|
||||
|
||||
$ttContentColumns = [
|
||||
'button' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'Button Label',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'default' => 'Details',
|
||||
'size' => 30,
|
||||
'eval' => 'trim,required'
|
||||
],
|
||||
],
|
||||
'tx_eptheme_context_country' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'LLL:EXT:ep_products/Resources/Private/Language/locallang.xlf:tx_epproducts_domain_model_country',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'renderType' => 'selectSingle',
|
||||
'foreign_table' => 'tx_epproducts_domain_model_country',
|
||||
'foreign_table_where' => 'ORDER BY name ASC',
|
||||
'items' => [
|
||||
['Keine Zuordnung', 0],
|
||||
],
|
||||
'default' => 0,
|
||||
'minitems' => 0,
|
||||
'maxitems' => 1,
|
||||
]
|
||||
],
|
||||
'tx_eptheme_context_region' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'LLL:EXT:ep_products/Resources/Private/Language/locallang.xlf:tx_epproducts_domain_model_region',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'renderType' => 'selectSingle',
|
||||
'foreign_table' => 'tx_epproducts_domain_model_region',
|
||||
'foreign_table_where' => 'ORDER BY name ASC',
|
||||
'items' => [
|
||||
['Keine Zuordnung', 0],
|
||||
],
|
||||
'default' => 0,
|
||||
'minitems' => 0,
|
||||
'maxitems' => 1,
|
||||
]
|
||||
],
|
||||
'tx_eptheme_context_city' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'LLL:EXT:ep_products/Resources/Private/Language/locallang.xlf:tx_epproducts_domain_model_city',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'renderType' => 'selectSingle',
|
||||
'foreign_table' => 'tx_epproducts_domain_model_city',
|
||||
'foreign_table_where' => 'ORDER BY name ASC',
|
||||
'items' => [
|
||||
['Keine Zuordnung', 0],
|
||||
],
|
||||
'default' => 0,
|
||||
'minitems' => 0,
|
||||
'maxitems' => 1,
|
||||
]
|
||||
],
|
||||
'tx_eptheme_context_hotel' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'LLL:EXT:ep_products/Resources/Private/Language/locallang.xlf:tx_epproducts_domain_model_hotel',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'renderType' => 'selectSingle',
|
||||
'foreign_table' => 'tx_epproducts_domain_model_hotel',
|
||||
'foreign_table_where' => 'ORDER BY name ASC',
|
||||
'items' => [
|
||||
['Keine Zuordnung', 0],
|
||||
],
|
||||
'default' => 0,
|
||||
'minitems' => 0,
|
||||
'maxitems' => 1,
|
||||
]
|
||||
],
|
||||
'tx_eptheme_context_concept' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'LLL:EXT:ep_products/Resources/Private/Language/locallang.xlf:tx_epproducts_domain_model_concept',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'renderType' => 'selectSingle',
|
||||
'foreign_table' => 'tx_epproducts_domain_model_concept',
|
||||
'foreign_table_where' => 'ORDER BY name ASC',
|
||||
'items' => [
|
||||
['Keine Zuordnung', 0],
|
||||
],
|
||||
'default' => 0,
|
||||
'minitems' => 0,
|
||||
'maxitems' => 1,
|
||||
]
|
||||
],
|
||||
'tx_eptheme_context_product' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'LLL:EXT:ep_products/Resources/Private/Language/locallang.xlf:tx_epproducts_domain_model_product',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'renderType' => 'selectSingle',
|
||||
'foreign_table' => 'tx_epproducts_domain_model_product',
|
||||
'foreign_table_where' => 'ORDER BY name_internal, name ASC',
|
||||
'items' => [
|
||||
['Keine Zuordnung', 0],
|
||||
],
|
||||
'default' => 0,
|
||||
'minitems' => 0,
|
||||
'maxitems' => 1,
|
||||
]
|
||||
],
|
||||
'tx_eptheme_context_date_from' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'LLL:EXT:ep_theme/Resources/Private/Language/locallang.xlf:tx_eptheme_context.date_from',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 12,
|
||||
'eval' => 'date,int',
|
||||
'renderType' => 'inputDateTime',
|
||||
]
|
||||
],
|
||||
'tx_eptheme_context_date_to' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'LLL:EXT:ep_theme/Resources/Private/Language/locallang.xlf:tx_eptheme_context.date_to',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 12,
|
||||
'eval' => 'date,int',
|
||||
'renderType' => 'inputDateTime',
|
||||
]
|
||||
],
|
||||
'tx_eptheme_background' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'Hintergrundfarbe',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'renderType' => 'selectSingle',
|
||||
'default' => 0,
|
||||
'items' => [
|
||||
[ 'ohne', 0 ],
|
||||
[ 'oben', 1 ],
|
||||
[ 'unten', 2 ],
|
||||
[ 'oben und unten', 3 ],
|
||||
],
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('tt_content', $ttContentColumns);
|
||||
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addFieldsToPalette(
|
||||
'tt_content',
|
||||
'header',
|
||||
'--linebreak--,
|
||||
subheader;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:subheader_formlabel,--linebreak--',
|
||||
'after:header_layout'
|
||||
);
|
||||
|
||||
$GLOBALS['TCA']['tt_content']['types']['textmedia']['columnsOverrides']['assets']['config']['overrideChildTca'] = [
|
||||
'columns' => [
|
||||
'crop' => [
|
||||
'config' => [
|
||||
'cropVariants' => [
|
||||
'default' => [
|
||||
'title' => 'Preview',
|
||||
'allowedAspectRatios' => [
|
||||
'preview' => [
|
||||
'title' => 'Standard',
|
||||
'value' => 1.8,
|
||||
],
|
||||
'free' => [
|
||||
'title' => 'frei',
|
||||
'value' => 'NaN',
|
||||
],
|
||||
],
|
||||
],
|
||||
'zoom' => [
|
||||
'title' => 'Zoom',
|
||||
'allowedAspectRatios' => [
|
||||
'free' => [
|
||||
'title' => 'frei',
|
||||
'value' => 'NaN',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
];
|
||||
});
|
||||
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
defined('TYPO3_MODE') or die();
|
||||
|
||||
call_user_func(function() {
|
||||
$frontendLanguageFilePrefix = 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:';
|
||||
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem(
|
||||
'tt_content',
|
||||
'CType',
|
||||
[
|
||||
'Button',
|
||||
'button',
|
||||
'content-image'
|
||||
],
|
||||
'ytvideo',
|
||||
'after'
|
||||
);
|
||||
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addFieldsToPalette(
|
||||
'tt_content',
|
||||
'tx_eptheme_button',
|
||||
'header,header_link'
|
||||
);
|
||||
|
||||
$GLOBALS['TCA']['tt_content']['types']['button'] = [
|
||||
'showitem' => '
|
||||
--palette--;' . $frontendLanguageFilePrefix . 'palette.general;general,
|
||||
--palette--;;tx_eptheme_button,
|
||||
--div--;' . $frontendLanguageFilePrefix . 'tabs.access,
|
||||
hidden;' . $frontendLanguageFilePrefix . 'field.default.hidden,
|
||||
--div--;' . $frontendLanguageFilePrefix . 'tabs.extended
|
||||
',
|
||||
'columnsOverrides' => [
|
||||
'header' => [
|
||||
'label' => 'Buttonlabel',
|
||||
],
|
||||
'header_link' => [
|
||||
'label' => 'URL/Seite',
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
});
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
defined('TYPO3_MODE') or die();
|
||||
|
||||
call_user_func(function() {
|
||||
$frontendLanguageFilePrefix = 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:';
|
||||
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem(
|
||||
'tt_content',
|
||||
'CType',
|
||||
[
|
||||
'Belegungskalender',
|
||||
'calendar',
|
||||
'content-image'
|
||||
],
|
||||
'contact',
|
||||
'after'
|
||||
);
|
||||
|
||||
$GLOBALS['TCA']['tt_content']['types']['calendar'] = [
|
||||
'showitem' => '
|
||||
--palette--;' . $frontendLanguageFilePrefix . 'palette.general;general,
|
||||
tx_eptheme_context_hotel,
|
||||
--div--;' . $frontendLanguageFilePrefix . 'tabs.access,
|
||||
hidden;' . $frontendLanguageFilePrefix . 'field.default.hidden,
|
||||
--div--;' . $frontendLanguageFilePrefix . 'tabs.extended
|
||||
',
|
||||
];
|
||||
|
||||
});
|
||||
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
defined('TYPO3_MODE') or die();
|
||||
|
||||
call_user_func(function() {
|
||||
$frontendLanguageFilePrefix = 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:';
|
||||
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem(
|
||||
'tt_content',
|
||||
'CType',
|
||||
[
|
||||
'Ansprechpartner',
|
||||
'contact',
|
||||
'content-image'
|
||||
],
|
||||
'gmap',
|
||||
'after'
|
||||
);
|
||||
|
||||
$GLOBALS['TCA']['tt_content']['columns']['tx_eptheme_contact'] = [
|
||||
'exclude' => 0,
|
||||
'label' => 'Mitarbeiter',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'foreign_table' => 'tx_epproducts_domain_model_teammember',
|
||||
'foreign_table_where' => 'ORDER BY name',
|
||||
'minitems' => 1,
|
||||
'maxitems' => 1,
|
||||
]
|
||||
];
|
||||
|
||||
$GLOBALS['TCA']['tt_content']['types']['contact'] = [
|
||||
'showitem' => '
|
||||
--palette--;' . $frontendLanguageFilePrefix . 'palette.general;general,
|
||||
tx_eptheme_contact,
|
||||
--div--;' . $frontendLanguageFilePrefix . 'tabs.access,
|
||||
hidden;' . $frontendLanguageFilePrefix . 'field.default.hidden,
|
||||
--div--;' . $frontendLanguageFilePrefix . 'tabs.extended
|
||||
',
|
||||
];
|
||||
|
||||
});
|
||||
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
|
||||
call_user_func(function () {
|
||||
\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\B13\Container\Tca\Registry::class)->configureContainer(
|
||||
new \B13\Container\Tca\ContainerConfiguration(
|
||||
'ep_container_quarters',
|
||||
'Vierspalter',
|
||||
'25/25/25/25 Aufteilung mit groß/klein Umschaltung',
|
||||
[
|
||||
[
|
||||
['name' => 'Elemente', 'colPos' => 300],
|
||||
]
|
||||
]
|
||||
)
|
||||
);
|
||||
|
||||
\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\B13\Container\Tca\Registry::class)->configureContainer(
|
||||
new \B13\Container\Tca\ContainerConfiguration(
|
||||
'ep_container_teasergroup',
|
||||
'Dreispalter',
|
||||
'33/33/33 Aufteilung mit groß/klein Umschaltung',
|
||||
[
|
||||
[
|
||||
['name' => 'Teaser', 'colPos' => 300],
|
||||
]
|
||||
]
|
||||
)
|
||||
);
|
||||
|
||||
$headerConfig = [
|
||||
'showitem' => '
|
||||
--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.general,
|
||||
--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.general;general,
|
||||
--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.header;header,
|
||||
--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.appearance,
|
||||
--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.frames;frames,
|
||||
--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.appearanceLinks;appearanceLinks,
|
||||
--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:language,
|
||||
--palette--;;language,
|
||||
--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access,
|
||||
--palette--;;hidden,
|
||||
--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.access;access
|
||||
'
|
||||
];
|
||||
|
||||
foreach (['ep_container_quarters', 'ep_container_teasergroup'] as $field) {
|
||||
$GLOBALS['TCA']['tt_content']['types'][$field] = array_replace_recursive(
|
||||
$GLOBALS['TCA']['tt_content']['types'][$field],
|
||||
$headerConfig
|
||||
);
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
defined('TYPO3_MODE') or die();
|
||||
|
||||
call_user_func(function() {
|
||||
$frontendLanguageFilePrefix = 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:';
|
||||
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem(
|
||||
'tt_content',
|
||||
'CType',
|
||||
[
|
||||
'Deal der Woche',
|
||||
'deal_of_the_week',
|
||||
'content-image'
|
||||
],
|
||||
'disturber',
|
||||
'after'
|
||||
);
|
||||
|
||||
$GLOBALS['TCA']['tt_content']['types']['deal_of_the_week'] = [
|
||||
'showitem' => '
|
||||
--palette--;' . $frontendLanguageFilePrefix . 'palette.general;general, header, header_link, bodytext,
|
||||
--div--;' . $frontendLanguageFilePrefix . 'tabs.appearance,
|
||||
layout;' . $frontendLanguageFilePrefix . 'layout_formlabel, tx_eptheme_background,
|
||||
--div--;' . $frontendLanguageFilePrefix . 'tabs.access,
|
||||
hidden;' . $frontendLanguageFilePrefix . 'field.default.hidden,
|
||||
--div--;' . $frontendLanguageFilePrefix . 'tabs.extended
|
||||
',
|
||||
'columnsOverrides' => [
|
||||
'bodytext' => [
|
||||
'label' => 'Text',
|
||||
'config' => [
|
||||
'rows' => 2,
|
||||
]
|
||||
],
|
||||
]
|
||||
];
|
||||
|
||||
});
|
||||
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
|
||||
defined('TYPO3_MODE') or die();
|
||||
|
||||
call_user_func(function() {
|
||||
$frontendLanguageFilePrefix = 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:';
|
||||
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem(
|
||||
'tt_content',
|
||||
'CType',
|
||||
[
|
||||
'Störer (neu)',
|
||||
'disrupter',
|
||||
'content-image'
|
||||
],
|
||||
'teaser_product',
|
||||
'after'
|
||||
);
|
||||
|
||||
$GLOBALS['TCA']['tt_content']['columns']['tx_eptheme_disrupter'] = [
|
||||
'exclude' => 0,
|
||||
'label' => 'Störer',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'renderType' => 'selectSingle',
|
||||
'foreign_table' => 'tx_eptheme_domain_model_disrupter',
|
||||
'foreign_field' => 'tt_content',
|
||||
'maxitems' => 1,
|
||||
'minitems' => 1,
|
||||
'foreign_table_where' => 'ORDER BY headline ASC',
|
||||
'MM' => 'tx_eptheme_ttcontent_tx_eptheme_disrupter_mm',
|
||||
],
|
||||
];
|
||||
|
||||
$GLOBALS['TCA']['tt_content']['types']['disrupter'] = [
|
||||
'showitem' => '
|
||||
--palette--;' . $frontendLanguageFilePrefix . 'palette.general;general, tx_eptheme_disrupter,
|
||||
--div--;' . $frontendLanguageFilePrefix . 'tabs.appearance,
|
||||
layout;' . $frontendLanguageFilePrefix . 'layout_formlabel, tx_eptheme_background,
|
||||
--div--;' . $frontendLanguageFilePrefix . 'tabs.access,
|
||||
hidden;' . $frontendLanguageFilePrefix . 'field.default.hidden,
|
||||
--div--;' . $frontendLanguageFilePrefix . 'tabs.extended
|
||||
',
|
||||
'columnsOverrides' => [
|
||||
]
|
||||
];
|
||||
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue(
|
||||
'*',
|
||||
'FILE:EXT:ep_theme/Configuration/FlexForms/flexform_disturber.xml',
|
||||
'disrupter'
|
||||
);
|
||||
|
||||
});
|
||||
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
|
||||
defined('TYPO3_MODE') or die();
|
||||
|
||||
call_user_func(function() {
|
||||
$frontendLanguageFilePrefix = 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:';
|
||||
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem(
|
||||
'tt_content',
|
||||
'CType',
|
||||
[
|
||||
'Störer',
|
||||
'disturber',
|
||||
'content-image'
|
||||
],
|
||||
'teaser_product',
|
||||
'after'
|
||||
);
|
||||
|
||||
$GLOBALS['TCA']['tt_content']['types']['disturber'] = [
|
||||
'showitem' => '
|
||||
--palette--;' . $frontendLanguageFilePrefix . 'palette.general;general,
|
||||
--palette--;' . $frontendLanguageFilePrefix . 'palette.header;header, bodytext, pi_flexform,
|
||||
--div--;Bild,
|
||||
assets,
|
||||
--div--;' . $frontendLanguageFilePrefix . 'tabs.appearance,
|
||||
layout;' . $frontendLanguageFilePrefix . 'layout_formlabel, tx_eptheme_background,
|
||||
--div--;' . $frontendLanguageFilePrefix . 'tabs.access,
|
||||
hidden;' . $frontendLanguageFilePrefix . 'field.default.hidden,
|
||||
--div--;' . $frontendLanguageFilePrefix . 'tabs.extended
|
||||
',
|
||||
'columnsOverrides' => [
|
||||
'bodytext' => [
|
||||
'label' => 'Text',
|
||||
'config' => [
|
||||
'enableRichtext' => true,
|
||||
]
|
||||
],
|
||||
'assets' => [
|
||||
'label' => 'Bild',
|
||||
'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig('assets', [
|
||||
'appearance' => [
|
||||
'createNewRelationLinkTitle' => 'Hinzufügen'
|
||||
],
|
||||
'foreign_types' => $GLOBALS['TCA']['tt_content']['columns']['image']['config']['foreign_types'],
|
||||
'maxitems' => 1,
|
||||
'minitems' => 0,
|
||||
], $GLOBALS['TYPO3_CONF_VARS']['SYS']['mediafile_ext'])
|
||||
]
|
||||
]
|
||||
];
|
||||
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue(
|
||||
'*',
|
||||
'FILE:EXT:ep_theme/Configuration/FlexForms/flexform_disturber.xml',
|
||||
'disturber'
|
||||
);
|
||||
|
||||
});
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
defined('TYPO3_MODE') or die();
|
||||
|
||||
call_user_func(function() {
|
||||
$frontendLanguageFilePrefix = 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:';
|
||||
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem(
|
||||
'tt_content',
|
||||
'CType',
|
||||
[
|
||||
'Event Preistabelle',
|
||||
'event_pricetable',
|
||||
'content-image'
|
||||
],
|
||||
'contact',
|
||||
'after'
|
||||
);
|
||||
|
||||
$GLOBALS['TCA']['tt_content']['types']['event_pricetable'] = [
|
||||
'showitem' => '
|
||||
--palette--;' . $frontendLanguageFilePrefix . 'palette.general;general,
|
||||
tx_eptheme_context_product,
|
||||
--div--;' . $frontendLanguageFilePrefix . 'tabs.access,
|
||||
hidden;' . $frontendLanguageFilePrefix . 'field.default.hidden,
|
||||
--div--;' . $frontendLanguageFilePrefix . 'tabs.extended
|
||||
',
|
||||
];
|
||||
|
||||
});
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
defined('TYPO3_MODE') or die();
|
||||
|
||||
call_user_func(function() {
|
||||
$frontendLanguageFilePrefix = 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:';
|
||||
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem(
|
||||
'tt_content',
|
||||
'CType',
|
||||
[
|
||||
'FAQ Alle Kategorien',
|
||||
'faq_overview',
|
||||
'content-ep_theme-ce',
|
||||
],
|
||||
'nlform',
|
||||
'after'
|
||||
);
|
||||
|
||||
$GLOBALS['TCA']['tt_content']['types']['faq_overview'] = [
|
||||
'showitem' => '
|
||||
--palette--;' . $frontendLanguageFilePrefix . 'palette.general;general,
|
||||
--div--;' . $frontendLanguageFilePrefix . 'tabs.access,
|
||||
hidden;' . $frontendLanguageFilePrefix . 'field.default.hidden,
|
||||
--div--;' . $frontendLanguageFilePrefix . 'tabs.extended
|
||||
',
|
||||
];
|
||||
});
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
defined('TYPO3_MODE') or die();
|
||||
|
||||
call_user_func(function() {
|
||||
$frontendLanguageFilePrefix = 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:';
|
||||
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem(
|
||||
'tt_content',
|
||||
'CType',
|
||||
[
|
||||
'Google Map',
|
||||
'gmap',
|
||||
'content-image'
|
||||
],
|
||||
'lineup',
|
||||
'after'
|
||||
);
|
||||
|
||||
$GLOBALS['TCA']['tt_content']['types']['gmap'] = [
|
||||
'showitem' => '
|
||||
--palette--;' . $frontendLanguageFilePrefix . 'palette.general;general,
|
||||
tx_eptheme_context_region, tx_eptheme_context_hotel,
|
||||
--div--;' . $frontendLanguageFilePrefix . 'tabs.access,
|
||||
hidden;' . $frontendLanguageFilePrefix . 'field.default.hidden,
|
||||
--div--;' . $frontendLanguageFilePrefix . 'tabs.extended
|
||||
',
|
||||
];
|
||||
|
||||
});
|
||||
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
defined('TYPO3_MODE') or die();
|
||||
|
||||
call_user_func(function() {
|
||||
$frontendLanguageFilePrefix = 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:';
|
||||
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem(
|
||||
'tt_content',
|
||||
'CType',
|
||||
[
|
||||
'Lineup',
|
||||
'lineup',
|
||||
'content-image'
|
||||
],
|
||||
'deal_of_the_week',
|
||||
'after'
|
||||
);
|
||||
|
||||
$GLOBALS['TCA']['tt_content']['columns']['tx_eptheme_lineup'] = [
|
||||
'exclude' => 0,
|
||||
'label' => 'LLL:EXT:ep_theme/Resources/Private/Language/locallang_db.xlf:tx_eptheme_domain_model_lineup.items',
|
||||
'config' => [
|
||||
'type' => 'inline',
|
||||
'foreign_table' => 'tx_eptheme_domain_model_lineup',
|
||||
'foreign_field' => 'tt_content',
|
||||
'foreign_sortby' => 'sorting',
|
||||
'maxitems' => 99,
|
||||
'appearance' => [
|
||||
'useSortable' => 1,
|
||||
'collapseAll' => 1,
|
||||
'levelLinksPosition' => 'top',
|
||||
'showSynchronizationLink' => 0,
|
||||
'showPossibleLocalizationRecords' => 0,
|
||||
'showAllLocalizationLink' => 0
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
$GLOBALS['TCA']['tt_content']['types']['lineup'] = [
|
||||
'showitem' => '
|
||||
--palette--;' . $frontendLanguageFilePrefix . 'palette.general;general,
|
||||
tx_eptheme_lineup,
|
||||
--div--;' . $frontendLanguageFilePrefix . 'tabs.access,
|
||||
hidden;' . $frontendLanguageFilePrefix . 'field.default.hidden,
|
||||
--div--;' . $frontendLanguageFilePrefix . 'tabs.extended
|
||||
',
|
||||
];
|
||||
|
||||
});
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
defined('TYPO3_MODE') or die();
|
||||
|
||||
call_user_func(function() {
|
||||
$frontendLanguageFilePrefix = 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:';
|
||||
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem(
|
||||
'tt_content',
|
||||
'CType',
|
||||
[
|
||||
'Newsletter Anmeldung',
|
||||
'nlform',
|
||||
'content-image'
|
||||
],
|
||||
'ytvideo',
|
||||
'after'
|
||||
);
|
||||
|
||||
$GLOBALS['TCA']['tt_content']['types']['nlform'] = [
|
||||
'showitem' => '
|
||||
--palette--;' . $frontendLanguageFilePrefix . 'palette.general;general',
|
||||
'columnsOverrides' => [
|
||||
'header_link' => [
|
||||
'label' => 'YouTube URL/Vimeo ID',
|
||||
],
|
||||
'layout' => [
|
||||
'label' => 'Typ',
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
});
|
||||
@@ -0,0 +1,256 @@
|
||||
<?php
|
||||
|
||||
defined('TYPO3_MODE') or die();
|
||||
|
||||
call_user_func(function() {
|
||||
$frontendLanguageFilePrefix = 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:';
|
||||
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem(
|
||||
'tt_content',
|
||||
'CType',
|
||||
[
|
||||
'Teaser allgemein',
|
||||
'teaser',
|
||||
'content-image'
|
||||
],
|
||||
'textmedia',
|
||||
'after'
|
||||
);
|
||||
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem(
|
||||
'tt_content',
|
||||
'CType',
|
||||
[
|
||||
'Teaser Land',
|
||||
'teaser_country',
|
||||
'content-image'
|
||||
],
|
||||
'teaser',
|
||||
'after'
|
||||
);
|
||||
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem(
|
||||
'tt_content',
|
||||
'CType',
|
||||
[
|
||||
'Teaser Gebiet',
|
||||
'teaser_region',
|
||||
'content-image'
|
||||
],
|
||||
'teaser_country',
|
||||
'after'
|
||||
);
|
||||
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem(
|
||||
'tt_content',
|
||||
'CType',
|
||||
[
|
||||
'Teaser Ort',
|
||||
'teaser_city',
|
||||
'content-image'
|
||||
],
|
||||
'teaser_region',
|
||||
'after'
|
||||
);
|
||||
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem(
|
||||
'tt_content',
|
||||
'CType',
|
||||
[
|
||||
'Teaser Hotel',
|
||||
'teaser_hotel',
|
||||
'content-image'
|
||||
],
|
||||
'teaser_city',
|
||||
'after'
|
||||
);
|
||||
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem(
|
||||
'tt_content',
|
||||
'CType',
|
||||
[
|
||||
'Teaser Konzept',
|
||||
'teaser_concept',
|
||||
'content-image'
|
||||
],
|
||||
'teaser_hotel',
|
||||
'after'
|
||||
);
|
||||
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem(
|
||||
'tt_content',
|
||||
'CType',
|
||||
[
|
||||
'Teaser Produkt',
|
||||
'teaser_product',
|
||||
'content-image'
|
||||
],
|
||||
'teaser_concept',
|
||||
'after'
|
||||
);
|
||||
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem(
|
||||
'tt_content',
|
||||
'CType',
|
||||
[
|
||||
'Teaser Buchungslink',
|
||||
'teaser_booking_link',
|
||||
'content-image'
|
||||
],
|
||||
'teaser_concept',
|
||||
'after'
|
||||
);
|
||||
|
||||
$GLOBALS['TCA']['tt_content']['types']['teaser'] = [
|
||||
'showitem' => '
|
||||
--palette--;' . $frontendLanguageFilePrefix . 'palette.general;general,
|
||||
--palette--;' . $frontendLanguageFilePrefix . 'palette.header;header,bodytext,button,
|
||||
--div--;Bild,
|
||||
assets,
|
||||
--div--;Kontext,
|
||||
tx_eptheme_context_country,tx_eptheme_context_region, tx_eptheme_context_hotel, tx_eptheme_context_concept,
|
||||
--div--;' . $frontendLanguageFilePrefix . 'tabs.appearance,
|
||||
layout;' . $frontendLanguageFilePrefix . 'layout_formlabel,
|
||||
--div--;' . $frontendLanguageFilePrefix . 'tabs.access,
|
||||
hidden;' . $frontendLanguageFilePrefix . 'field.default.hidden,
|
||||
--div--;' . $frontendLanguageFilePrefix . 'tabs.extended
|
||||
',
|
||||
'columnsOverrides' => [
|
||||
'bodytext' => [
|
||||
'label' => 'Teasertext',
|
||||
'config' => [
|
||||
'enableRichtext' => true,
|
||||
],
|
||||
],
|
||||
'header' => [
|
||||
'config' => [
|
||||
'type' => 'text',
|
||||
'rows' => 2,
|
||||
]
|
||||
],
|
||||
'assets' => [
|
||||
'label' => 'Teaserbild',
|
||||
'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig('assets', [
|
||||
'appearance' => [
|
||||
'createNewRelationLinkTitle' => 'Hinzufügen'
|
||||
],
|
||||
'overrideChildTca' => [
|
||||
'columns' => [
|
||||
'crop' => [
|
||||
'config' => [
|
||||
'cropVariants' => [
|
||||
'default' => [
|
||||
'title' => 'Alle Geräte',
|
||||
'allowedAspectRatios' => [
|
||||
'teaserEven' => [
|
||||
'title' => 'Teaser gerade',
|
||||
'value' => 1.3333333333333334,
|
||||
],
|
||||
'teaserOdd' => [
|
||||
'title' => 'Teaser ungerade',
|
||||
'value' => 2.0555555555555556,
|
||||
],
|
||||
'free' => [
|
||||
'title' => 'Frei',
|
||||
'value' => 'NaN',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
'maxitems' => 1,
|
||||
'minitems' => 0,
|
||||
], $GLOBALS['TYPO3_CONF_VARS']['SYS']['mediafile_ext'])
|
||||
]
|
||||
]
|
||||
];
|
||||
|
||||
$GLOBALS['TCA']['tt_content']['types']['teaser_country'] = [
|
||||
'showitem' => '
|
||||
--palette--;' . $frontendLanguageFilePrefix . 'palette.general;general,
|
||||
--palette--;Kontext, tx_eptheme_context_country,
|
||||
--div--;' . $frontendLanguageFilePrefix . 'tabs.appearance,
|
||||
layout;' . $frontendLanguageFilePrefix . 'layout_formlabel,
|
||||
--div--;' . $frontendLanguageFilePrefix . 'tabs.access,
|
||||
hidden;' . $frontendLanguageFilePrefix . 'field.default.hidden,
|
||||
--div--;' . $frontendLanguageFilePrefix . 'tabs.extended
|
||||
',
|
||||
];
|
||||
|
||||
$GLOBALS['TCA']['tt_content']['types']['teaser_region'] = [
|
||||
'showitem' => '
|
||||
--palette--;' . $frontendLanguageFilePrefix . 'palette.general;general,
|
||||
--palette--;Kontext, tx_eptheme_context_region,
|
||||
--div--;' . $frontendLanguageFilePrefix . 'tabs.appearance,
|
||||
layout;' . $frontendLanguageFilePrefix . 'layout_formlabel,
|
||||
--div--;' . $frontendLanguageFilePrefix . 'tabs.access,
|
||||
hidden;' . $frontendLanguageFilePrefix . 'field.default.hidden,
|
||||
--div--;' . $frontendLanguageFilePrefix . 'tabs.extended
|
||||
',
|
||||
];
|
||||
|
||||
$GLOBALS['TCA']['tt_content']['types']['teaser_city'] = [
|
||||
'showitem' => '
|
||||
--palette--;' . $frontendLanguageFilePrefix . 'palette.general;general,
|
||||
--palette--;Kontext, tx_eptheme_context_city,
|
||||
--div--;' . $frontendLanguageFilePrefix . 'tabs.appearance,
|
||||
layout;' . $frontendLanguageFilePrefix . 'layout_formlabel,
|
||||
--div--;' . $frontendLanguageFilePrefix . 'tabs.access,
|
||||
hidden;' . $frontendLanguageFilePrefix . 'field.default.hidden,
|
||||
--div--;' . $frontendLanguageFilePrefix . 'tabs.extended
|
||||
',
|
||||
];
|
||||
|
||||
$GLOBALS['TCA']['tt_content']['types']['teaser_hotel'] = [
|
||||
'showitem' => '
|
||||
--palette--;' . $frontendLanguageFilePrefix . 'palette.general;general,
|
||||
--palette--;Kontext, tx_eptheme_context_hotel,
|
||||
--div--;' . $frontendLanguageFilePrefix . 'tabs.appearance,
|
||||
layout;' . $frontendLanguageFilePrefix . 'layout_formlabel,
|
||||
--div--;' . $frontendLanguageFilePrefix . 'tabs.access,
|
||||
hidden;' . $frontendLanguageFilePrefix . 'field.default.hidden,
|
||||
--div--;' . $frontendLanguageFilePrefix . 'tabs.extended
|
||||
',
|
||||
];
|
||||
|
||||
$GLOBALS['TCA']['tt_content']['types']['teaser_concept'] = [
|
||||
'showitem' => '
|
||||
--palette--;' . $frontendLanguageFilePrefix . 'palette.general;general,
|
||||
--palette--;Kontext, tx_eptheme_context_concept,
|
||||
--div--;' . $frontendLanguageFilePrefix . 'tabs.appearance,
|
||||
layout;' . $frontendLanguageFilePrefix . 'layout_formlabel,
|
||||
--div--;' . $frontendLanguageFilePrefix . 'tabs.access,
|
||||
hidden;' . $frontendLanguageFilePrefix . 'field.default.hidden,
|
||||
--div--;' . $frontendLanguageFilePrefix . 'tabs.extended
|
||||
',
|
||||
];
|
||||
|
||||
$GLOBALS['TCA']['tt_content']['types']['teaser_product'] = [
|
||||
'showitem' => '
|
||||
--palette--;' . $frontendLanguageFilePrefix . 'palette.general;general,
|
||||
--palette--;Kontext, tx_eptheme_context_product, tx_eptheme_context_hotel,
|
||||
tx_eptheme_context_date_from, tx_eptheme_context_date_to,
|
||||
--div--;' . $frontendLanguageFilePrefix . 'tabs.appearance,
|
||||
layout;' . $frontendLanguageFilePrefix . 'layout_formlabel,
|
||||
--div--;' . $frontendLanguageFilePrefix . 'tabs.access,
|
||||
hidden;' . $frontendLanguageFilePrefix . 'field.default.hidden,
|
||||
--div--;' . $frontendLanguageFilePrefix . 'tabs.extended
|
||||
',
|
||||
];
|
||||
|
||||
$GLOBALS['TCA']['tt_content']['types']['teaser_booking_link'] = [
|
||||
'showitem' => '
|
||||
--palette--;' . $frontendLanguageFilePrefix . 'palette.general;general,
|
||||
--palette--;Kontext, tx_eptheme_context_product,
|
||||
--div--;' . $frontendLanguageFilePrefix . 'tabs.appearance,
|
||||
layout;' . $frontendLanguageFilePrefix . 'layout_formlabel,
|
||||
--div--;' . $frontendLanguageFilePrefix . 'tabs.access,
|
||||
hidden;' . $frontendLanguageFilePrefix . 'field.default.hidden,
|
||||
--div--;' . $frontendLanguageFilePrefix . 'tabs.extended
|
||||
',
|
||||
];
|
||||
|
||||
});
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
defined('TYPO3_MODE') or die();
|
||||
|
||||
call_user_func(function() {
|
||||
$frontendLanguageFilePrefix = 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:';
|
||||
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem(
|
||||
'tt_content',
|
||||
'CType',
|
||||
[
|
||||
'YouTube/Vimeo Video',
|
||||
'ytvideo',
|
||||
'content-image'
|
||||
],
|
||||
'calendar',
|
||||
'after'
|
||||
);
|
||||
|
||||
$GLOBALS['TCA']['tt_content']['types']['ytvideo'] = [
|
||||
'showitem' => '
|
||||
--palette--;' . $frontendLanguageFilePrefix . 'palette.general;general,
|
||||
layout, header_link,
|
||||
--div--;' . $frontendLanguageFilePrefix . 'tabs.access,
|
||||
hidden;' . $frontendLanguageFilePrefix . 'field.default.hidden,
|
||||
--div--;' . $frontendLanguageFilePrefix . 'tabs.extended
|
||||
',
|
||||
'columnsOverrides' => [
|
||||
'header_link' => [
|
||||
'label' => 'YouTube URL/Vimeo ID',
|
||||
],
|
||||
'layout' => [
|
||||
'label' => 'Typ',
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
});
|
||||
@@ -0,0 +1,169 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'ctrl' => [
|
||||
'label' => 'name',
|
||||
'label_alt' => 'email',
|
||||
'default_sortby' => 'ORDER BY last_name, first_name',
|
||||
'tstamp' => 'tstamp',
|
||||
'crdate' => 'crdate',
|
||||
'cruser_id' => 'cruser_id',
|
||||
'prependAtCopy' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.prependAtCopy',
|
||||
'delete' => 'deleted',
|
||||
'title' => 'Adresscheck',
|
||||
'versioningWS' => true,
|
||||
'origUid' => 't3_origuid',
|
||||
'enablecolumns' => [
|
||||
'disabled' => 'hidden'
|
||||
],
|
||||
'iconfile' => 'EXT:ep_theme/Resources/Public/images/icon_ce.svg',
|
||||
'searchFields' => 'name, first_name, last_name, email',
|
||||
'dividers2tabs' => 1,
|
||||
],
|
||||
'columns' => [
|
||||
'pid' => [
|
||||
'label' => 'pid',
|
||||
'config' => [
|
||||
'type' => 'passthrough'
|
||||
]
|
||||
],
|
||||
'crdate' => [
|
||||
'label' => 'crdate',
|
||||
'config' => [
|
||||
'type' => 'passthrough',
|
||||
]
|
||||
],
|
||||
'cruser_id' => [
|
||||
'label' => 'cruser_id',
|
||||
'config' => [
|
||||
'type' => 'passthrough'
|
||||
]
|
||||
],
|
||||
'tstamp' => [
|
||||
'label' => 'tstamp',
|
||||
'config' => [
|
||||
'type' => 'passthrough',
|
||||
]
|
||||
],
|
||||
'hidden' => [
|
||||
'exclude' => 1,
|
||||
'label' => 'Versteckt',
|
||||
'config' => [
|
||||
'type' => 'check'
|
||||
]
|
||||
],
|
||||
'customer_id' => [
|
||||
'exclude' => 1,
|
||||
'label' => 'Kundennummer',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => '8',
|
||||
'eval' => 'trim',
|
||||
'max' => '255'
|
||||
]
|
||||
],
|
||||
'title' => [
|
||||
'exclude' => 1,
|
||||
'label' => 'Anrede',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => '8',
|
||||
'eval' => 'trim',
|
||||
'max' => '255'
|
||||
]
|
||||
],
|
||||
'first_name' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'Vorname',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => '20',
|
||||
'eval' => 'trim',
|
||||
'max' => '255'
|
||||
]
|
||||
],
|
||||
'last_name' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'Name',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => '20',
|
||||
'eval' => 'trim',
|
||||
'max' => '255'
|
||||
]
|
||||
],
|
||||
'address' => [
|
||||
'label' => 'Strasse / Nr.',
|
||||
'config' => [
|
||||
'type' => 'text',
|
||||
'cols' => '20',
|
||||
'rows' => '3'
|
||||
]
|
||||
],
|
||||
'email' => [
|
||||
'label' => 'E-Mail',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => '20',
|
||||
'eval' => 'trim',
|
||||
'max' => '255',
|
||||
'softref' => 'email'
|
||||
]
|
||||
],
|
||||
'city' => [
|
||||
'label' => 'Stadt',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => '20',
|
||||
'eval' => 'trim',
|
||||
'max' => '255'
|
||||
]
|
||||
],
|
||||
'zip' => [
|
||||
'label' => 'PLZ',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'eval' => 'trim',
|
||||
'size' => '10',
|
||||
'max' => '20'
|
||||
]
|
||||
],
|
||||
'country' => [
|
||||
'exclude' => 1,
|
||||
'label' => 'Land',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => '20',
|
||||
'eval' => 'trim',
|
||||
'max' => '128'
|
||||
]
|
||||
],
|
||||
'no_postal' => [
|
||||
'exclude' => 1,
|
||||
'label' => 'Keine Postalische Werbung',
|
||||
'config' => [
|
||||
'type' => 'check'
|
||||
]
|
||||
],
|
||||
'no_email' => [
|
||||
'exclude' => 1,
|
||||
'label' => 'Keine E-Mails mehr',
|
||||
'config' => [
|
||||
'type' => 'check'
|
||||
]
|
||||
],
|
||||
'address_current' => [
|
||||
'exclude' => 1,
|
||||
'label' => 'Adresse ist aktuell',
|
||||
'config' => [
|
||||
'type' => 'check'
|
||||
]
|
||||
],
|
||||
],
|
||||
'types' => [
|
||||
'0' => ['showitem' =>
|
||||
'hidden,
|
||||
title,first_name,last_name,address,zip,city,country,email,no_postal,no_email,address_current,
|
||||
']
|
||||
],
|
||||
];
|
||||
@@ -0,0 +1,211 @@
|
||||
<?php
|
||||
return [
|
||||
'ctrl' => [
|
||||
'title' => 'Störer',
|
||||
'default_sortby' => 'ORDER BY headline',
|
||||
'label' => 'headline',
|
||||
'tstamp' => 'tstamp',
|
||||
'crdate' => 'crdate',
|
||||
'cruser_id' => 'cruser_id',
|
||||
'dividers2tabs' => true,
|
||||
'versioningWS' => true,
|
||||
'languageField' => 'sys_language_uid',
|
||||
'transOrigPointerField' => 'l10n_parent',
|
||||
'transOrigDiffSourceField' => 'l10n_diffsource',
|
||||
'delete' => 'deleted',
|
||||
'enablecolumns' => [
|
||||
'disabled' => 'hidden',
|
||||
'starttime' => 'starttime',
|
||||
'endtime' => 'endtime',
|
||||
],
|
||||
'searchFields' => 'headline,text',
|
||||
'iconfile' => 'EXT:ep_theme/Resources/Public/images/icon_ce.svg',
|
||||
],
|
||||
'types' => [
|
||||
'1' => [
|
||||
'showitem' => 'sys_language_uid, hidden, layout, headline, text, image, pi_flexform',
|
||||
],
|
||||
],
|
||||
'palettes' => [
|
||||
],
|
||||
'columns' => [
|
||||
|
||||
'sys_language_uid' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'foreign_table' => 'sys_language',
|
||||
'foreign_table_where' => 'ORDER BY sys_language.title',
|
||||
'items' => [
|
||||
['LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.allLanguages', -1],
|
||||
['LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.default_value', 0]
|
||||
],
|
||||
],
|
||||
],
|
||||
'l10n_parent' => [
|
||||
'displayCond' => 'FIELD:sys_language_uid:>:0',
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'items' => [
|
||||
['', 0],
|
||||
],
|
||||
'foreign_table' => 'tx_eptheme_domain_model_disrupter',
|
||||
'foreign_table_where' => 'AND tx_eptheme_domain_model_disrupter.pid=###CURRENT_PID### AND tx_eptheme_domain_model_disrupter.sys_language_uid IN (-1,0)',
|
||||
],
|
||||
],
|
||||
'l10n_diffsource' => [
|
||||
'config' => [
|
||||
'type' => 'passthrough',
|
||||
],
|
||||
],
|
||||
|
||||
't3ver_label' => [
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.versionLabel',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 30,
|
||||
'max' => 255,
|
||||
]
|
||||
],
|
||||
|
||||
'hidden' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.hidden',
|
||||
'config' => [
|
||||
'type' => 'check',
|
||||
],
|
||||
],
|
||||
'starttime' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.starttime',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 13,
|
||||
'eval' => 'datetime',
|
||||
'checkbox' => 0,
|
||||
'default' => 0,
|
||||
'behaviour' => [
|
||||
'allowLanguageSynchronization' => true,
|
||||
],
|
||||
'renderType' => 'inputDateTime',
|
||||
],
|
||||
],
|
||||
'endtime' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.endtime',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 13,
|
||||
'eval' => 'datetime',
|
||||
'checkbox' => 0,
|
||||
'default' => 0,
|
||||
'behaviour' => [
|
||||
'allowLanguageSynchronization' => true,
|
||||
],
|
||||
'renderType' => 'inputDateTime',
|
||||
],
|
||||
],
|
||||
|
||||
'headline' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'Headline',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 30,
|
||||
'eval' => 'trim'
|
||||
],
|
||||
],
|
||||
'layout' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'Layout',
|
||||
'config' => [
|
||||
'type' => 'selectSingle',
|
||||
'items' => [
|
||||
['klein', 0],
|
||||
['groß', 1],
|
||||
['Event klein', 2],
|
||||
['Event groß', 3],
|
||||
],
|
||||
],
|
||||
],
|
||||
'text' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'Text',
|
||||
'config' => [
|
||||
'type' => 'text',
|
||||
'cols' => 40,
|
||||
'rows' => 5,
|
||||
'eval' => 'trim',
|
||||
'enableRichtext' => true,
|
||||
],
|
||||
],
|
||||
'image' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'Bild',
|
||||
'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
|
||||
'image',
|
||||
[
|
||||
'appearance' => [
|
||||
'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference',
|
||||
'fileUploadAllowed' => false,
|
||||
],
|
||||
'overrideChildTca' => [
|
||||
'types' => [
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [
|
||||
'showitem' => '
|
||||
--palette--;LLL:EXT:lang/Resources/Private/Language/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
|
||||
--palette--;;filePalette'
|
||||
],
|
||||
],
|
||||
'columns' => [
|
||||
'crop' => [
|
||||
'config' => [
|
||||
'cropVariants' => [
|
||||
'default' => [
|
||||
'title' => 'Alle Geräte',
|
||||
'allowedAspectRatios' => [
|
||||
'square' => [
|
||||
'title' => 'quadratisch',
|
||||
'value' => 1,
|
||||
],
|
||||
'free' => [
|
||||
'title' => 'Frei',
|
||||
'value' => 'NaN',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
'maxitems' => 1,
|
||||
'minitems' => 1,
|
||||
],
|
||||
'jpg,jpeg'
|
||||
),
|
||||
],
|
||||
'pi_flexform' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'Buttons',
|
||||
'config' => [
|
||||
'type' => 'flex',
|
||||
'ds' => [
|
||||
'default' => 'FILE:EXT:ep_theme/Configuration/FlexForms/flexform_disturber.xml',
|
||||
],
|
||||
]
|
||||
],
|
||||
'tt_content' => [
|
||||
'exclude' => 0,
|
||||
'config' => [
|
||||
'type' => 'passthrough',
|
||||
],
|
||||
],
|
||||
],
|
||||
];
|
||||
@@ -0,0 +1,224 @@
|
||||
<?php
|
||||
return [
|
||||
'ctrl' => [
|
||||
'title' => 'LLL:EXT:ep_theme/Resources/Private/Language/locallang_db.xlf:tx_eptheme_domain_model_lineup',
|
||||
'default_sortby' => 'ORDER BY name',
|
||||
'label' => 'name',
|
||||
'tstamp' => 'tstamp',
|
||||
'crdate' => 'crdate',
|
||||
'cruser_id' => 'cruser_id',
|
||||
'dividers2tabs' => true,
|
||||
'versioningWS' => true,
|
||||
'hideTable' => true,
|
||||
'languageField' => 'sys_language_uid',
|
||||
'transOrigPointerField' => 'l10n_parent',
|
||||
'transOrigDiffSourceField' => 'l10n_diffsource',
|
||||
'delete' => 'deleted',
|
||||
'enablecolumns' => [
|
||||
'disabled' => 'hidden',
|
||||
'starttime' => 'starttime',
|
||||
'endtime' => 'endtime',
|
||||
],
|
||||
'searchFields' => 'headline,subline',
|
||||
'iconfile' => 'EXT:ep_theme/Resources/Public/images/icon_ce.svg',
|
||||
],
|
||||
'types' => [
|
||||
'1' => [
|
||||
'showitem' => 'hidden, name, description, image, --palette--;;social',
|
||||
],
|
||||
],
|
||||
'palettes' => [
|
||||
'social' => ['showitem' => 'facebook_url, twitter_url, youtube_url, instagram_url, soundcloud_url'],
|
||||
],
|
||||
'columns' => [
|
||||
|
||||
'sys_language_uid' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'foreign_table' => 'sys_language',
|
||||
'foreign_table_where' => 'ORDER BY sys_language.title',
|
||||
'items' => [
|
||||
['LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.allLanguages', -1],
|
||||
['LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.default_value', 0]
|
||||
],
|
||||
],
|
||||
],
|
||||
'l10n_parent' => [
|
||||
'displayCond' => 'FIELD:sys_language_uid:>:0',
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'items' => [
|
||||
['', 0],
|
||||
],
|
||||
'foreign_table' => 'tx_eptheme_domain_model_lineup',
|
||||
'foreign_table_where' => 'AND tx_eptheme_domain_model_lineup.pid=###CURRENT_PID### AND tx_eptheme_domain_model_lineup.sys_language_uid IN (-1,0)',
|
||||
],
|
||||
],
|
||||
'l10n_diffsource' => [
|
||||
'config' => [
|
||||
'type' => 'passthrough',
|
||||
],
|
||||
],
|
||||
|
||||
't3ver_label' => [
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.versionLabel',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 30,
|
||||
'max' => 255,
|
||||
]
|
||||
],
|
||||
|
||||
'hidden' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.hidden',
|
||||
'config' => [
|
||||
'type' => 'check',
|
||||
],
|
||||
],
|
||||
'starttime' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.starttime',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 13,
|
||||
'eval' => 'datetime',
|
||||
'checkbox' => 0,
|
||||
'default' => 0,
|
||||
'behaviour' => [
|
||||
'allowLanguageSynchronization' => true,
|
||||
],
|
||||
'renderType' => 'inputDateTime',
|
||||
],
|
||||
],
|
||||
'endtime' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.endtime',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 13,
|
||||
'eval' => 'datetime',
|
||||
'checkbox' => 0,
|
||||
'default' => 0,
|
||||
'behaviour' => [
|
||||
'allowLanguageSynchronization' => true,
|
||||
],
|
||||
'renderType' => 'inputDateTime',
|
||||
],
|
||||
],
|
||||
'sorting' => [
|
||||
'config' => [
|
||||
'type' => 'passthrough'
|
||||
],
|
||||
],
|
||||
|
||||
'name' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'LLL:EXT:ep_theme/Resources/Private/Language/locallang_db.xlf:tx_eptheme_domain_model_lineup.name',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 30,
|
||||
'eval' => 'trim,required'
|
||||
],
|
||||
],
|
||||
'description' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'LLL:EXT:ep_theme/Resources/Private/Language/locallang.xlf:tx_eptheme_domain_model_lineup.description',
|
||||
'config' => [
|
||||
'type' => 'text',
|
||||
'cols' => 40,
|
||||
'rows' => 10,
|
||||
'eval' => 'trim',
|
||||
'enableRichtext' => true,
|
||||
],
|
||||
],
|
||||
'image' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'LLL:EXT:ep_theme/Resources/Private/Language/locallang_db.xlf:tx_eptheme_domain_model_lineup.image',
|
||||
'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
|
||||
'image',
|
||||
[
|
||||
'appearance' => [
|
||||
'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference',
|
||||
'useSortable' => false,
|
||||
],
|
||||
'overrideChildTca' => [
|
||||
'types' => [
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [
|
||||
'showitem' => '
|
||||
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
|
||||
--palette--;;filePalette',
|
||||
],
|
||||
],
|
||||
],
|
||||
'maxitems' => 1
|
||||
],
|
||||
$GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext']
|
||||
),
|
||||
],
|
||||
'facebook_url' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'Facebook URL',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 30,
|
||||
'eval' => 'trim'
|
||||
],
|
||||
],
|
||||
'twitter_url' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'Twitter URL',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 30,
|
||||
'eval' => 'trim'
|
||||
],
|
||||
],
|
||||
'instagram_url' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'Instagram URL',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 30,
|
||||
'eval' => 'trim'
|
||||
],
|
||||
],
|
||||
'youtube_url' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'YouTube URL',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 30,
|
||||
'eval' => 'trim'
|
||||
],
|
||||
],
|
||||
'soundcloud_url' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'Soundcloud URL',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 30,
|
||||
'eval' => 'trim'
|
||||
],
|
||||
],
|
||||
'tt_content' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'LLL:EXT:ep_theme/Resources/Private/Language/locallang_db.xlf:tx_eptheme_domain_model_lineup.tt_content',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'foreign_table' => 'tt_content',
|
||||
'minitems' => 0,
|
||||
'maxitems' => 1,
|
||||
],
|
||||
],
|
||||
],
|
||||
];
|
||||
@@ -0,0 +1,255 @@
|
||||
<?php
|
||||
return [
|
||||
'ctrl' => [
|
||||
'title' => 'Slide',
|
||||
'default_sortby' => 'ORDER BY headline',
|
||||
'label' => 'headline',
|
||||
'tstamp' => 'tstamp',
|
||||
'crdate' => 'crdate',
|
||||
'cruser_id' => 'cruser_id',
|
||||
'dividers2tabs' => true,
|
||||
'versioningWS' => true,
|
||||
'hideTable' => true,
|
||||
'languageField' => 'sys_language_uid',
|
||||
'transOrigPointerField' => 'l10n_parent',
|
||||
'transOrigDiffSourceField' => 'l10n_diffsource',
|
||||
'delete' => 'deleted',
|
||||
'enablecolumns' => [
|
||||
'disabled' => 'hidden',
|
||||
'starttime' => 'starttime',
|
||||
'endtime' => 'endtime',
|
||||
],
|
||||
'searchFields' => 'headline,subline',
|
||||
'iconfile' => 'EXT:ep_theme/Resources/Public/images/icon_ce.svg',
|
||||
],
|
||||
'types' => [
|
||||
'1' => [
|
||||
'showitem' => '--palette--;;top, --palette--;;headlines, --palette--;;linkbutton, image',
|
||||
],
|
||||
],
|
||||
'palettes' => [
|
||||
'top' => ['showitem' => 'hidden, skipass'],
|
||||
'headlines' => ['showitem' => 'headline, subline'],
|
||||
'linkbutton' => ['showitem' => 'button, page_uid'],
|
||||
],
|
||||
'columns' => [
|
||||
|
||||
'sys_language_uid' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'foreign_table' => 'sys_language',
|
||||
'foreign_table_where' => 'ORDER BY sys_language.title',
|
||||
'items' => [
|
||||
['LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.allLanguages', -1],
|
||||
['LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.default_value', 0]
|
||||
],
|
||||
],
|
||||
],
|
||||
'l10n_parent' => [
|
||||
'displayCond' => 'FIELD:sys_language_uid:>:0',
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'items' => [
|
||||
['', 0],
|
||||
],
|
||||
'foreign_table' => 'tx_eptheme_domain_model_slide',
|
||||
'foreign_table_where' => 'AND tx_eptheme_domain_model_slide.pid=###CURRENT_PID### AND tx_eptheme_domain_model_slide.sys_language_uid IN (-1,0)',
|
||||
],
|
||||
],
|
||||
'l10n_diffsource' => [
|
||||
'config' => [
|
||||
'type' => 'passthrough',
|
||||
],
|
||||
],
|
||||
|
||||
't3ver_label' => [
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.versionLabel',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 30,
|
||||
'max' => 255,
|
||||
]
|
||||
],
|
||||
|
||||
'hidden' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.hidden',
|
||||
'config' => [
|
||||
'type' => 'check',
|
||||
],
|
||||
],
|
||||
'starttime' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.starttime',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 13,
|
||||
'eval' => 'datetime',
|
||||
'checkbox' => 0,
|
||||
'default' => 0,
|
||||
'behaviour' => [
|
||||
'allowLanguageSynchronization' => true,
|
||||
],
|
||||
'renderType' => 'inputDateTime',
|
||||
],
|
||||
],
|
||||
'endtime' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.endtime',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 13,
|
||||
'eval' => 'datetime',
|
||||
'checkbox' => 0,
|
||||
'default' => 0,
|
||||
'behaviour' => [
|
||||
'allowLanguageSynchronization' => true,
|
||||
],
|
||||
'renderType' => 'inputDateTime',
|
||||
],
|
||||
],
|
||||
'sorting' => [
|
||||
'config' => [
|
||||
'type' => 'passthrough'
|
||||
],
|
||||
],
|
||||
|
||||
'headline' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'LLL:EXT:ep_theme/Resources/Private/Language/locallang_db.xlf:tx_eptheme_domain_model_slide.headline',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 30,
|
||||
'eval' => 'trim'
|
||||
],
|
||||
],
|
||||
'subline' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'LLL:EXT:ep_theme/Resources/Private/Language/locallang_db.xlf:tx_eptheme_domain_model_slide.subline',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 30,
|
||||
'eval' => 'trim'
|
||||
],
|
||||
],
|
||||
'button' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'LLL:EXT:ep_theme/Resources/Private/Language/locallang_db.xlf:tx_eptheme_domain_model_slide.button',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 20,
|
||||
'eval' => 'trim'
|
||||
],
|
||||
],
|
||||
'skipass' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'Skipass Badge',
|
||||
'config' => [
|
||||
'type' => 'check',
|
||||
],
|
||||
],
|
||||
'page_uid' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'LLL:EXT:ep_theme/Resources/Private/Language/locallang_db.xlf:tx_eptheme_domain_model_slide.page_uid',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 20,
|
||||
'renderType' => 'inputLink',
|
||||
]
|
||||
],
|
||||
'image' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'Bild',
|
||||
'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
|
||||
'images',
|
||||
[
|
||||
'appearance' => [
|
||||
'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference',
|
||||
'fileUploadAllowed' => false,
|
||||
],
|
||||
'overrideChildTca' => [
|
||||
'types' => [
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [
|
||||
'showitem' => '
|
||||
--palette--;LLL:EXT:lang/Resources/Private/Language/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
|
||||
--palette--;;filePalette'
|
||||
],
|
||||
],
|
||||
'columns' => [
|
||||
'crop' => [
|
||||
'config' => [
|
||||
'cropVariants' => [
|
||||
'default' => [
|
||||
'title' => 'Alle Geräte',
|
||||
'allowedAspectRatios' => [
|
||||
'contentSlider' => [
|
||||
'title' => 'Content Slider/Galerie',
|
||||
'value' => 1.59,
|
||||
],
|
||||
'contentSliderProduct' => [
|
||||
'title' => 'Content Slider/Galerie Produkttexte',
|
||||
'value' => 1.79069767,
|
||||
],
|
||||
'sliderProductHeader' => [
|
||||
'title' => 'Slider Produkt-Header',
|
||||
'value' => 1.625,
|
||||
],
|
||||
'sliderPageHeader' => [
|
||||
'title' => 'Slider Seiten-Header',
|
||||
'value' => 3.805,
|
||||
],
|
||||
'sliderPageHeaderHome' => [
|
||||
'title' => 'Slider Seiten-Header Startseite',
|
||||
'value' => 1370 / 585,
|
||||
],
|
||||
'free' => [
|
||||
'title' => 'Frei',
|
||||
'value' => 'NaN',
|
||||
],
|
||||
],
|
||||
],
|
||||
'mobile' => [
|
||||
'title' => 'Mobile',
|
||||
'allowedAspectRatios' => [
|
||||
'sliderPageHeader' => [
|
||||
'title' => 'Slider Seiten-Header',
|
||||
'value' => 1,
|
||||
],
|
||||
'free' => [
|
||||
'title' => 'Frei',
|
||||
'value' => 'NaN',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
'maxitems' => 1,
|
||||
'minitems' => 1,
|
||||
],
|
||||
'jpg,jpeg'
|
||||
),
|
||||
],
|
||||
'page' => [
|
||||
'exclude' => 0,
|
||||
'label' => 'LLL:EXT:ep_theme/Resources/Private/Language/locallang_db.xlf:tx_eptheme_domain_model_slide.page',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'default' => 0,
|
||||
'renderType' => 'selectSingle',
|
||||
'foreign_table' => 'pages',
|
||||
'minitems' => 0,
|
||||
'maxitems' => 1,
|
||||
],
|
||||
],
|
||||
],
|
||||
];
|
||||
@@ -0,0 +1,180 @@
|
||||
tx_gridelements.setup {
|
||||
quarters {
|
||||
title = Teaserreihe vierspaltig (25%/25%/25%/25%)
|
||||
topLevelLayout = 1
|
||||
icon = EXT:ep_theme/Resources/Public/images/tx_eptheme_gridelements_quarters.png
|
||||
config {
|
||||
colCount = 4
|
||||
rowCount = 1
|
||||
rows {
|
||||
1 {
|
||||
columns {
|
||||
1 {
|
||||
name = Spalte 1
|
||||
colPos = 41
|
||||
disallowed {
|
||||
CType = menu_abstract,menu_categorized_content,menu_categorized_pages,menu_recently_updated,menu_related_pages,menu_section_pages,menu_sitemap,menu_sitemap_pages
|
||||
}
|
||||
}
|
||||
2 {
|
||||
name = Spalte 2
|
||||
colPos = 42
|
||||
disallowed {
|
||||
CType = menu_abstract,menu_categorized_content,menu_categorized_pages,menu_recently_updated,menu_related_pages,menu_section_pages,menu_sitemap,menu_sitemap_pages
|
||||
}
|
||||
}
|
||||
3 {
|
||||
name = Spalte 3
|
||||
colPos = 43
|
||||
disallowed {
|
||||
CType = menu_abstract,menu_categorized_content,menu_categorized_pages,menu_recently_updated,menu_related_pages,menu_section_pages,menu_sitemap,menu_sitemap_pages
|
||||
}
|
||||
}
|
||||
4 {
|
||||
name = Spalte 4
|
||||
colPos = 44
|
||||
disallowed {
|
||||
CType = menu_abstract,menu_categorized_content,menu_categorized_pages,menu_recently_updated,menu_related_pages,menu_section_pages,menu_sitemap,menu_sitemap_pages
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
thirds {
|
||||
title = Teaserreihe dreispaltig (33%/33%/33%)
|
||||
topLevelLayout = 1
|
||||
icon = EXT:ep_theme/Resources/Public/images/tx_eptheme_gridelements_thirds.png
|
||||
config {
|
||||
colCount = 3
|
||||
rowCount = 1
|
||||
rows {
|
||||
1 {
|
||||
columns {
|
||||
1 {
|
||||
name = Spalte 1
|
||||
colPos = 31
|
||||
disallowed {
|
||||
CType = menu_abstract,menu_categorized_content,menu_categorized_pages,menu_recently_updated,menu_related_pages,menu_section_pages,menu_sitemap,menu_sitemap_pages
|
||||
}
|
||||
}
|
||||
2 {
|
||||
name = Spalte 2
|
||||
colPos = 32
|
||||
disallowed {
|
||||
CType = menu_abstract,menu_categorized_content,menu_categorized_pages,menu_recently_updated,menu_related_pages,menu_section_pages,menu_sitemap,menu_sitemap_pages
|
||||
}
|
||||
}
|
||||
3 {
|
||||
name = Spalte 3
|
||||
colPos = 33
|
||||
disallowed {
|
||||
CType = menu_abstract,menu_categorized_content,menu_categorized_pages,menu_recently_updated,menu_related_pages,menu_section_pages,menu_sitemap,menu_sitemap_pages
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
halves {
|
||||
title = Teaserreihe zweispaltig (50%/50%)
|
||||
topLevelLayout = 1
|
||||
icon = EXT:ep_theme/Resources/Public/images/tx_eptheme_gridelements_halves.png
|
||||
config {
|
||||
colCount = 2
|
||||
rowCount = 1
|
||||
rows {
|
||||
1 {
|
||||
columns {
|
||||
1 {
|
||||
name = Spalte 1
|
||||
colPos = 21
|
||||
disallowed {
|
||||
CType = menu_abstract,menu_categorized_content,menu_categorized_pages,menu_recently_updated,menu_related_pages,menu_section_pages,menu_sitemap,menu_sitemap_pages
|
||||
}
|
||||
}
|
||||
2 {
|
||||
name = Spalte 2
|
||||
colPos = 22
|
||||
disallowed {
|
||||
CType = menu_abstract,menu_categorized_content,menu_categorized_pages,menu_recently_updated,menu_related_pages,menu_section_pages,menu_sitemap,menu_sitemap_pages
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
halfAndTwoQuarters {
|
||||
title = Teaserreihe dreispaltig (50%/25%/25%)
|
||||
topLevelLayout = 1
|
||||
icon = EXT:ep_theme/Resources/Public/images/tx_eptheme_gridelements_half_and_two_quarters.png
|
||||
config {
|
||||
colCount = 4
|
||||
rowCount = 1
|
||||
rows {
|
||||
1 {
|
||||
columns {
|
||||
1 {
|
||||
name = Spalte 1
|
||||
colPos = 51
|
||||
colspan = 2
|
||||
allowed = textmedia,teaser,list,form_formframework
|
||||
}
|
||||
2 {
|
||||
name = Spalte 2
|
||||
colPos = 52
|
||||
disallowed {
|
||||
CType = menu_abstract,menu_categorized_content,menu_categorized_pages,menu_recently_updated,menu_related_pages,menu_section_pages,menu_sitemap,menu_sitemap_pages
|
||||
}
|
||||
}
|
||||
3 {
|
||||
name = Spalte 3
|
||||
colPos = 53
|
||||
disallowed {
|
||||
CType = menu_abstract,menu_categorized_content,menu_categorized_pages,menu_recently_updated,menu_related_pages,menu_section_pages,menu_sitemap,menu_sitemap_pages
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
twoQuartersAndHalf {
|
||||
title = Teaserreihe dreispaltig (25%/25%/50%)
|
||||
topLevelLayout = 1
|
||||
icon = EXT:ep_theme/Resources/Public/images/tx_eptheme_gridelements_two_quarters_and_half.png
|
||||
config {
|
||||
colCount = 4
|
||||
rowCount = 1
|
||||
rows {
|
||||
1 {
|
||||
columns {
|
||||
1 {
|
||||
name = Spalte 1
|
||||
colPos = 61
|
||||
disallowed {
|
||||
CType = menu_abstract,menu_categorized_content,menu_categorized_pages,menu_recently_updated,menu_related_pages,menu_section_pages,menu_sitemap,menu_sitemap_pages
|
||||
}
|
||||
}
|
||||
2 {
|
||||
name = Spalte 2
|
||||
colPos = 62
|
||||
disallowed {
|
||||
CType = menu_abstract,menu_categorized_content,menu_categorized_pages,menu_recently_updated,menu_related_pages,menu_section_pages,menu_sitemap,menu_sitemap_pages
|
||||
}
|
||||
}
|
||||
3 {
|
||||
name = Spalte 3
|
||||
colPos = 63
|
||||
colspan = 2
|
||||
allowed = textmedia,teaser,list,gmap,nlform,form_formframework,menu_pages,menu_subpages,menu_section
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
@import 'EXT:ep_theme/Configuration/TSconfig/Page/Extensions/GridElements.tsconfig'
|
||||
@import 'EXT:ep_theme/Configuration/TSconfig/Page/Mod/SHARED.tsconfig'
|
||||
@import 'EXT:ep_theme/Configuration/TSconfig/Page/Mod/WebLayout/BackendLayouts.tsconfig'
|
||||
@import 'EXT:ep_theme/Configuration/TSconfig/Page/Mod/Wizards/NewContentElement.tsconfig'
|
||||
@import 'EXT:ep_theme/Configuration/TSconfig/Page/RTE.tsconfig'
|
||||
@import 'EXT:ep_theme/Configuration/TSconfig/Page/TCEFORM.tsconfig'
|
||||
@import 'EXT:ep_theme/Configuration/TSconfig/Page/TCEMAIN.tsconfig'
|
||||
@@ -0,0 +1,6 @@
|
||||
mod {
|
||||
SHARED {
|
||||
defaultLanguageFlag = de
|
||||
defaultLanguageLabel = Deutsch
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
@import 'EXT:ep_theme/Configuration/TSconfig/Page/Mod/WebLayout/BackendLayouts/*'
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
mod.web_layout.BackendLayouts {
|
||||
detail {
|
||||
title = Detailseite
|
||||
config {
|
||||
backend_layout {
|
||||
colCount = 1
|
||||
rowCount = 2
|
||||
rows {
|
||||
1 {
|
||||
columns {
|
||||
1 {
|
||||
name = Content
|
||||
colPos = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
2 {
|
||||
columns {
|
||||
1 {
|
||||
name = Teaserbereich
|
||||
colPos = 1
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
mod.web_layout.BackendLayouts {
|
||||
frontpage {
|
||||
title = Startseite
|
||||
config {
|
||||
backend_layout {
|
||||
colCount = 1
|
||||
rowCount = 1
|
||||
rows {
|
||||
1 {
|
||||
columns {
|
||||
1 {
|
||||
name = Content
|
||||
colPos = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
mod.web_layout.BackendLayouts {
|
||||
frontpageEvent {
|
||||
title = Startseite Events
|
||||
config {
|
||||
backend_layout {
|
||||
colCount = 1
|
||||
rowCount = 1
|
||||
rows {
|
||||
1 {
|
||||
columns {
|
||||
1 {
|
||||
name = Content
|
||||
colPos = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
mod.web_layout.BackendLayouts {
|
||||
popup {
|
||||
title = Popup
|
||||
config {
|
||||
backend_layout {
|
||||
colCount = 1
|
||||
rowCount = 1
|
||||
rows {
|
||||
1 {
|
||||
columns {
|
||||
1 {
|
||||
name = Content
|
||||
colPos = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
mod.web_layout.BackendLayouts {
|
||||
search {
|
||||
title = Suchergebnis
|
||||
config {
|
||||
backend_layout {
|
||||
colCount = 1
|
||||
rowCount = 2
|
||||
rows {
|
||||
1 {
|
||||
columns {
|
||||
1 {
|
||||
name = Content
|
||||
colPos = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
2 {
|
||||
columns {
|
||||
1 {
|
||||
name = Teaserbereich
|
||||
colPos = 1
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
mod.web_layout.BackendLayouts {
|
||||
subpage {
|
||||
title = Unterseite
|
||||
config {
|
||||
backend_layout {
|
||||
colCount = 1
|
||||
rowCount = 2
|
||||
rows {
|
||||
1 {
|
||||
columns {
|
||||
1 {
|
||||
name = Content
|
||||
colPos = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
2 {
|
||||
columns {
|
||||
1 {
|
||||
name = Teaserbereich
|
||||
colPos = 1
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
mod.web_layout.BackendLayouts {
|
||||
subpageSidebarLeft {
|
||||
title = Unterseite mit Sidebar (links)
|
||||
config {
|
||||
backend_layout {
|
||||
colCount = 4
|
||||
rowCount = 3
|
||||
rows {
|
||||
1 {
|
||||
columns {
|
||||
1 {
|
||||
name = Headline
|
||||
colPos = 3
|
||||
colspan = 4
|
||||
}
|
||||
}
|
||||
}
|
||||
2 {
|
||||
columns {
|
||||
1 {
|
||||
name = Sidebar
|
||||
colPos = 2
|
||||
colspan = 1
|
||||
}
|
||||
}
|
||||
columns {
|
||||
2 {
|
||||
name = Content
|
||||
colPos = 4
|
||||
colspan = 3
|
||||
}
|
||||
}
|
||||
}
|
||||
3 {
|
||||
columns {
|
||||
1 {
|
||||
name = Teaserbereich
|
||||
colPos = 1
|
||||
colspan = 4
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loaded 100 of 778 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user