Implement model and TCA

This commit is contained in:
Björn Fromme
2020-01-10 13:46:02 +01:00
parent ead6bb36ef
commit ba18a1c5a8
10 changed files with 1117 additions and 77 deletions
@@ -0,0 +1,75 @@
<?php
namespace EP\EpProducts\Domain\Model;
use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
/***************************************************************
*
* 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!
***************************************************************/
class GroupsPriceBoard extends AbstractEntity
{
/**
* @var string
*/
protected $title;
/**
* @var float
*/
protected $price;
/**
* @return string
*/
public function getTitle(): string
{
return $this->title;
}
/**
* @param string $title
*/
public function setTitle(string $title): void
{
$this->title = $title;
}
/**
* @return float
*/
public function getPrice(): float
{
return $this->price;
}
/**
* @param float $price
*/
public function setPrice(float $price): void
{
$this->price = $price;
}
}
@@ -0,0 +1,138 @@
<?php
namespace EP\EpProducts\Domain\Model;
use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
/***************************************************************
*
* 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!
***************************************************************/
class GroupsPriceConfig extends AbstractEntity
{
/**
* @var \DateTime
*/
protected $dateFrom;
/**
* @var \DateTime
*/
protected $dateTo;
/**
* @var int
*/
protected $personsIncluded;
/**
* @var float
*/
protected $price;
/**
* @var float
*/
protected $priceAdditionalPerson;
/**
* @return \DateTime
*/
public function getDateFrom(): \DateTime
{
return $this->dateFrom;
}
/**
* @param \DateTime $dateFrom
*/
public function setDateFrom(\DateTime $dateFrom): void
{
$this->dateFrom = $dateFrom;
}
/**
* @return \DateTime
*/
public function getDateTo(): \DateTime
{
return $this->dateTo;
}
/**
* @param \DateTime $dateTo
*/
public function setDateTo(\DateTime $dateTo): void
{
$this->dateTo = $dateTo;
}
/**
* @return int
*/
public function getPersonsIncluded(): int
{
return $this->personsIncluded;
}
/**
* @param int $personsIncluded
*/
public function setPersonsIncluded(int $personsIncluded): void
{
$this->personsIncluded = $personsIncluded;
}
/**
* @return float
*/
public function getPrice(): float
{
return $this->price;
}
/**
* @param float $price
*/
public function setPrice(float $price): void
{
$this->price = $price;
}
/**
* @return float
*/
public function getPriceAdditionalPerson(): float
{
return $this->priceAdditionalPerson;
}
/**
* @param float $priceAdditionalPerson
*/
public function setPriceAdditionalPerson(float $priceAdditionalPerson): void
{
$this->priceAdditionalPerson = $priceAdditionalPerson;
}
}
@@ -0,0 +1,75 @@
<?php
namespace EP\EpProducts\Domain\Model;
use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
/***************************************************************
*
* 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!
***************************************************************/
class GroupsPriceOption extends AbstractEntity
{
/**
* @var string
*/
protected $title;
/**
* @var float
*/
protected $price;
/**
* @return string
*/
public function getTitle(): string
{
return $this->title;
}
/**
* @param string $title
*/
public function setTitle(string $title): void
{
$this->title = $title;
}
/**
* @return float
*/
public function getPrice(): float
{
return $this->price;
}
/**
* @param float $price
*/
public function setPrice(float $price): void
{
$this->price = $price;
}
}
@@ -27,7 +27,10 @@ namespace EP\EpProducts\Domain\Model;
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
class Hotel extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements TeaserInterface
use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
use TYPO3\CMS\Extbase\Persistence\ObjectStorage;
class Hotel extends AbstractEntity implements TeaserInterface
{
const CATEGORY_STANDARD = 1;
@@ -166,22 +169,22 @@ class Hotel extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements Te
protected $address = '';
/**
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference>
* @var ObjectStorage
*/
protected $images;
/**
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference>
* @var ObjectStorage
*/
protected $resellerImages;
/**
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference>
* @var ObjectStorage
*/
protected $teaserImages;
/**
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference>
* @var ObjectStorage
*/
protected $headerImages;
@@ -191,7 +194,7 @@ class Hotel extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements Te
protected $code = '';
/**
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EP\EpProducts\Domain\Model\MatchCode>
* @var ObjectStorage
* @TYPO3\CMS\Extbase\Annotation\ORM\Lazy
*/
protected $additionalCodes;
@@ -207,32 +210,32 @@ class Hotel extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements Te
protected $category = self::CATEGORY_STANDARD;
/**
* @var \EP\EpProducts\Domain\Model\Country
* @var Country
*/
protected $country;
/**
* @var \EP\EpProducts\Domain\Model\Region
* @var Region
*/
protected $region;
/**
* @var \EP\EpProducts\Domain\Model\City
* @var City
*/
protected $city;
/**
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EP\EpProducts\Domain\Model\Teammember>
* @var ObjectStorage
*/
protected $teamer;
/**
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EP\EpProducts\Domain\Model\Product>
* @var ObjectStorage
*/
protected $products;
/**
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EP\EpProducts\Domain\Model\Fact>
* @var ObjectStorage
*/
protected $facts;
@@ -246,6 +249,24 @@ class Hotel extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements Te
*/
protected $pathSegment;
/**
* @var ObjectStorage
* @TYPO3\CMS\Extbase\Annotation\ORM\Lazy
*/
protected $groupsPriceConfigs;
/**
* @var ObjectStorage
* @TYPO3\CMS\Extbase\Annotation\ORM\Lazy
*/
protected $groupsPriceOptions;
/**
* @var ObjectStorage
* @TYPO3\CMS\Extbase\Annotation\ORM\Lazy
*/
protected $groupsPriceBoards;
public function __construct()
{
$this->initStorageObjects();
@@ -253,14 +274,15 @@ class Hotel extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements Te
protected function initStorageObjects()
{
$this->images = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
$this->resellerImages = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
$this->teaserImages = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
$this->headerImages = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
$this->teamer = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
$this->products = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
$this->facts = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
$this->additionalCodes = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
$this->images = new ObjectStorage();
$this->resellerImages = new ObjectStorage();
$this->teaserImages = new ObjectStorage();
$this->headerImages = new ObjectStorage();
$this->teamer = new ObjectStorage();
$this->products = new ObjectStorage();
$this->facts = new ObjectStorage();
$this->additionalCodes = new ObjectStorage();
$this->groupsPriceConfigs = new ObjectStorage();
}
/**
@@ -537,6 +559,7 @@ class Hotel extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements Te
if (empty($this->latitude) && $this->region !== null) {
return $this->region->getLatitude();
}
return $this->latitude;
}
@@ -556,6 +579,7 @@ class Hotel extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements Te
if (empty($this->longitude) && $this->region !== null) {
return $this->region->getLongitude();
}
return $this->longitude;
}
@@ -584,7 +608,7 @@ class Hotel extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements Te
}
/**
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference> $images
* @return ObjectStorage $images
*/
public function getImages()
{
@@ -592,15 +616,15 @@ class Hotel extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements Te
}
/**
* @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference> $images
* @param ObjectStorage $images
*/
public function setImages(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $images)
public function setImages(ObjectStorage $images)
{
$this->images = $images;
}
/**
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference> $resellerImages
* @return ObjectStorage $resellerImages
*/
public function getResellerImages()
{
@@ -608,7 +632,7 @@ class Hotel extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements Te
}
/**
* @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference> $resellerImages
* @param ObjectStorage $resellerImages
*/
public function setResellerImages($resellerImages)
{
@@ -616,7 +640,7 @@ class Hotel extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements Te
}
/**
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage
* @return ObjectStorage
*/
public function getTeaserImages()
{
@@ -624,7 +648,7 @@ class Hotel extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements Te
}
/**
* @return null|\TYPO3\CMS\Extbase\Persistence\ObjectStorage
* @return null|ObjectStorage
*/
public function getTeaserImage()
{
@@ -632,11 +656,13 @@ class Hotel extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements Te
return null;
}
return reset($this->teaserImages->toArray());
$images = $this->teaserImages->toArray();
return reset($images);
}
/**
* @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $teaserImages
* @param ObjectStorage $teaserImages
*/
public function setTeaserImages($teaserImages)
{
@@ -644,7 +670,7 @@ class Hotel extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements Te
}
/**
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage
* @return ObjectStorage
*/
public function getHeaderImages()
{
@@ -658,7 +684,7 @@ class Hotel extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements Te
}
/**
* @return null|\TYPO3\CMS\Extbase\Persistence\ObjectStorage
* @return null|ObjectStorage
*/
public function getHeaderImage()
{
@@ -666,11 +692,13 @@ class Hotel extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements Te
return null;
}
return reset($this->headerImages->toArray());
$images = $this->headerImages->toArray();
return reset($images);
}
/**
* @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $headerImages
* @param ObjectStorage $headerImages
*/
public function setHeaderImages($headerImages)
{
@@ -694,23 +722,23 @@ class Hotel extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements Te
}
/**
* @param \EP\EpProducts\Domain\Model\MatchCode $code
* @param MatchCode $code
*/
public function addAdditionalCode(\EP\EpProducts\Domain\Model\MatchCode $code)
public function addAdditionalCode(MatchCode $code)
{
$this->additionalCodes->attach($code);
}
/**
* @param \EP\EpProducts\Domain\Model\MatchCode $codeToRemove
* @param MatchCode $codeToRemove
*/
public function removeAdditionalCodes(\EP\EpProducts\Domain\Model\MatchCode $codeToRemove)
public function removeAdditionalCodes(MatchCode $codeToRemove)
{
$this->additionalCodes->detach($codeToRemove);
}
/**
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EP\EpProducts\Domain\Model\MatchCode> $codes
* @return ObjectStorage $codes
*/
public function getAdditionalCodes()
{
@@ -718,9 +746,9 @@ class Hotel extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements Te
}
/**
* @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EP\EpProducts\Domain\Model\MatchCode> $codes
* @param ObjectStorage $codes
*/
public function setAdditionalCodes(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $codes)
public function setAdditionalCodes(ObjectStorage $codes)
{
$this->additionalCodes = $codes;
}
@@ -770,7 +798,7 @@ class Hotel extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements Te
}
/**
* @return \EP\EpProducts\Domain\Model\Country $country
* @return Country $country
*/
public function getCountry()
{
@@ -778,15 +806,15 @@ class Hotel extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements Te
}
/**
* @param \EP\EpProducts\Domain\Model\Country $country
* @param Country $country
*/
public function setCountry(\EP\EpProducts\Domain\Model\Country $country)
public function setCountry(Country $country)
{
$this->country = $country;
}
/**
* @return \EP\EpProducts\Domain\Model\Region $region
* @return Region $region
*/
public function getRegion()
{
@@ -794,15 +822,15 @@ class Hotel extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements Te
}
/**
* @param \EP\EpProducts\Domain\Model\Region $region
* @param Region $region
*/
public function setRegion(\EP\EpProducts\Domain\Model\Region $region)
public function setRegion(Region $region)
{
$this->region = $region;
}
/**
* @return \EP\EpProducts\Domain\Model\City $city
* @return City $city
*/
public function getCity()
{
@@ -810,31 +838,31 @@ class Hotel extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements Te
}
/**
* @param \EP\EpProducts\Domain\Model\City $city
* @param City $city
*/
public function setCity(\EP\EpProducts\Domain\Model\City $city)
public function setCity(City $city)
{
$this->city = $city;
}
/**
* @param \EP\EpProducts\Domain\Model\Teammember $teamer
* @param Teammember $teamer
*/
public function addTeamer(\EP\EpProducts\Domain\Model\Teammember $teamer)
public function addTeamer(Teammember $teamer)
{
$this->teamer->attach($teamer);
}
/**
* @param \EP\EpProducts\Domain\Model\Teammember $teamerToRemove The Teammember to be removed
* @param Teammember $teamerToRemove The Teammember to be removed
*/
public function removeTeamer(\EP\EpProducts\Domain\Model\Teammember $teamerToRemove)
public function removeTeamer(Teammember $teamerToRemove)
{
$this->teamer->detach($teamerToRemove);
}
/**
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EP\EpProducts\Domain\Model\Teammember> $teamer
* @return ObjectStorage $teamer
*/
public function getTeamer()
{
@@ -842,31 +870,31 @@ class Hotel extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements Te
}
/**
* @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EP\EpProducts\Domain\Model\Teammember> $teamer
* @param ObjectStorage $teamer
*/
public function setTeamer(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $teamer)
public function setTeamer(ObjectStorage $teamer)
{
$this->teamer = $teamer;
}
/**
* @param \EP\EpProducts\Domain\Model\Product $product
* @param Product $product
*/
public function addProduct(\EP\EpProducts\Domain\Model\Product $product)
public function addProduct(Product $product)
{
$this->products->attach($product);
}
/**
* @param \EP\EpProducts\Domain\Model\Product $product
* @param Product $product
*/
public function removeProduct(\EP\EpProducts\Domain\Model\Product $product)
public function removeProduct(Product $product)
{
$this->products->detach($product);
}
/**
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EP\EpProducts\Domain\Model\Product>
* @return ObjectStorage
*/
public function getProducts()
{
@@ -874,38 +902,38 @@ class Hotel extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements Te
}
/**
* @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EP\EpProducts\Domain\Model\Product> $products
* @param ObjectStorage $products
*/
public function setProducts(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $products)
public function setProducts(ObjectStorage $products)
{
$this->products = $products;
}
/**
* @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EP\EpProducts\Domain\Model\Room> $rooms
* @param ObjectStorage $rooms
*/
public function setRooms($rooms) {
$this->rooms = $rooms;
}
/**
* @param \EP\EpProducts\Domain\Model\Fact $fact
* @param Fact $fact
*/
public function addFact(\EP\EpProducts\Domain\Model\Fact $fact)
public function addFact(Fact $fact)
{
$this->facts->attach($fact);
}
/**
* @param \EP\EpProducts\Domain\Model\Fact $factToRemove
* @param Fact $factToRemove
*/
public function removeFact(\EP\EpProducts\Domain\Model\Fact $factToRemove)
public function removeFact(Fact $factToRemove)
{
$this->facts->detach($factToRemove);
}
/**
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EP\EpProducts\Domain\Model\Fact>
* @return ObjectStorage
*/
public function getFacts()
{
@@ -913,9 +941,9 @@ class Hotel extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements Te
}
/**
* @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EP\EpProducts\Domain\Model\Fact> $facts
* @param ObjectStorage $facts
*/
public function setFacts(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $facts)
public function setFacts(ObjectStorage $facts)
{
$this->facts = $facts;
}
@@ -968,4 +996,51 @@ class Hotel extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements Te
return !$this->getIsApartment() && !$this->getIsHolidayFlat();
}
/**
* @return ObjectStorage
*/
public function getGroupsPriceConfigs()
{
return $this->groupsPriceConfigs;
}
/**
* @param ObjectStorage $groupPriceConfigs
*/
public function setGroupsPriceConfigs(ObjectStorage $groupPriceConfigs)
{
$this->groupsPriceConfigs = $groupPriceConfigs;
}
/**
* @return ObjectStorage
*/
public function getGroupsPriceOptions()
{
return $this->groupsPriceOptions;
}
/**
* @param ObjectStorage $groupsPriceOptions
*/
public function setGroupsPriceOptions(ObjectStorage $groupsPriceOptions)
{
$this->groupsPriceOptions = $groupsPriceOptions;
}
/**
* @return ObjectStorage
*/
public function getGroupsPriceBoards()
{
return $this->groupsPriceBoards;
}
/**
* @param ObjectStorage $groupsPriceBoards
*/
public function setGroupsPriceBoards(ObjectStorage $groupsPriceBoards)
{
$this->groupsPriceBoards = $groupsPriceBoards;
}
}
@@ -93,4 +93,13 @@ class LabelService
$parameters['title'] = sprintf('%s: %s (%d/%d)', $date->format('d.m.Y'), $hotel['name'], $contingent['available'], $contingent['pax']);
}
/**
* @param array $parameters
* @param array $parentObject
*/
public function getGroupsPriceConfigLabel(&$parameters, $parentObject)
{
$record = BackendUtility::getRecord('tx_epproducts_domain_model_groups_price_config', $parameters['row']['uid']);
$parameters['title'] = sprintf('%s - %s', date('d.m.Y', $record['date_from']), date('d.m.Y', $record['date_to']));
}
}
@@ -0,0 +1,149 @@
<?php
return [
'ctrl' => [
'title' => 'Verpflegungsleistung',
'default_sortby' => 'ORDER BY price',
'sortby' => 'sorting',
'label' => 'title',
'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' => 'title',
'iconfile' => 'EXT:ep_theme/Resources/Public/images/icon_ce.svg',
'hideTable' => true,
],
'interface' => [
'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, title, price',
],
'types' => [
'1' => [
'showitem' => 'title, price',
],
],
'palettes' => [
],
'columns' => [
'sys_language_uid' => [
'exclude' => 0,
'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.language',
'config' => [
'type' => 'select',
'renderType' => 'selectSingle',
'foreign_table' => 'sys_language',
'foreign_table_where' => 'ORDER BY sys_language.title',
'items' => [
['LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.allLanguages', -1],
['LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.default_value', 0]
],
],
],
'l10n_parent' => [
'displayCond' => 'FIELD:sys_language_uid:>:0',
'exclude' => 0,
'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent',
'config' => [
'type' => 'select',
'renderType' => 'selectSingle',
'items' => [
['', 0],
],
'foreign_table' => 'tx_epproducts_domain_model_groups_price_board',
'foreign_table_where' => 'AND tx_epproducts_domain_model_groups_price_board.pid=###CURRENT_PID### AND tx_epproducts_domain_model_groups_price_board.sys_language_uid IN (-1,0)',
],
],
'l10n_diffsource' => [
'config' => [
'type' => 'passthrough',
],
],
't3ver_label' => [
'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.versionLabel',
'config' => [
'type' => 'input',
'size' => 30,
'max' => 255,
]
],
'hidden' => [
'exclude' => 0,
'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.hidden',
'config' => [
'type' => 'check',
],
],
'starttime' => [
'exclude' => 0,
'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.starttime',
'config' => [
'type' => 'input',
'size' => 13,
'eval' => 'datetime',
'checkbox' => 0,
'default' => 0,
'range' => [
'lower' => mktime(0, 0, 0, date('m'), date('d'), date('Y'))
],
'behaviour' => [
'allowLanguageSynchronization' => true,
],
'renderType' => 'inputDateTime',
],
],
'endtime' => [
'exclude' => 0,
'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.endtime',
'config' => [
'type' => 'input',
'size' => 13,
'eval' => 'datetime',
'checkbox' => 0,
'default' => 0,
'range' => [
'lower' => mktime(0, 0, 0, date('m'), date('d'), date('Y'))
],
'behaviour' => [
'allowLanguageSynchronization' => true,
],
'renderType' => 'inputDateTime',
],
],
'title' => [
'exclude' => false,
'label' => 'Bezeichnung',
'config' => [
'type' => 'input',
'size' => 32,
'eval' => 'required',
]
],
'price' => [
'exclude' => false,
'label' => 'Preis pro Person/Nacht',
'config' => [
'type' => 'input',
'size' => 8,
'eval' => 'double2,required',
]
],
'sorting' => [
'config' => [
'type' => 'passthrough'
]
],
],
];
@@ -0,0 +1,176 @@
<?php
return [
'ctrl' => [
'title' => 'Gruppenhaus Preis',
'default_sortby' => 'ORDER BY date_from',
'label' => 'date_from',
'label_userFunc' => \EP\EpProducts\Service\LabelService::class . '->getGroupsPriceConfigLabel',
'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' => 'date_from',
'iconfile' => 'EXT:ep_theme/Resources/Public/images/icon_ce.svg',
'hideTable' => true,
],
'interface' => [
'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, date_from, date_to,
persons_included, price, price_additional_person',
],
'types' => [
'1' => [
'showitem' => '--palette--;;dates, --palette--;;prices, persons_included',
],
],
'palettes' => [
'dates' => ['showitem' => 'date_from, date_to'],
'prices' => ['showitem' => 'price, price_additional_person'],
],
'columns' => [
'sys_language_uid' => [
'exclude' => 0,
'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.language',
'config' => [
'type' => 'select',
'renderType' => 'selectSingle',
'foreign_table' => 'sys_language',
'foreign_table_where' => 'ORDER BY sys_language.title',
'items' => [
['LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.allLanguages', -1],
['LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.default_value', 0]
],
],
],
'l10n_parent' => [
'displayCond' => 'FIELD:sys_language_uid:>:0',
'exclude' => 0,
'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent',
'config' => [
'type' => 'select',
'renderType' => 'selectSingle',
'items' => [
['', 0],
],
'foreign_table' => 'tx_epproducts_domain_model_groups_price_config',
'foreign_table_where' => 'AND tx_epproducts_domain_model_groups_price_config.pid=###CURRENT_PID### AND tx_epproducts_domain_model_groups_price_config.sys_language_uid IN (-1,0)',
],
],
'l10n_diffsource' => [
'config' => [
'type' => 'passthrough',
],
],
't3ver_label' => [
'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.versionLabel',
'config' => [
'type' => 'input',
'size' => 30,
'max' => 255,
]
],
'hidden' => [
'exclude' => 0,
'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.hidden',
'config' => [
'type' => 'check',
],
],
'starttime' => [
'exclude' => 0,
'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.starttime',
'config' => [
'type' => 'input',
'size' => 13,
'eval' => 'datetime',
'checkbox' => 0,
'default' => 0,
'range' => [
'lower' => mktime(0, 0, 0, date('m'), date('d'), date('Y'))
],
'behaviour' => [
'allowLanguageSynchronization' => true,
],
'renderType' => 'inputDateTime',
],
],
'endtime' => [
'exclude' => 0,
'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.endtime',
'config' => [
'type' => 'input',
'size' => 13,
'eval' => 'datetime',
'checkbox' => 0,
'default' => 0,
'range' => [
'lower' => mktime(0, 0, 0, date('m'), date('d'), date('Y'))
],
'behaviour' => [
'allowLanguageSynchronization' => true,
],
'renderType' => 'inputDateTime',
],
],
'date_from' => [
'exclude' => false,
'label' => 'Datum von',
'config' => [
'type' => 'input',
'size' => 8,
'eval' => 'date,required',
'renderType' => 'inputDateTime',
]
],
'date_to' => [
'exclude' => false,
'label' => 'Datum bis',
'config' => [
'type' => 'input',
'size' => 8,
'eval' => 'date,required',
'renderType' => 'inputDateTime',
]
],
'persons_included' => [
'exclude' => false,
'label' => 'Inklusiv-Personen',
'config' => [
'type' => 'input',
'size' => 4,
'eval' => 'int,required',
]
],
'price' => [
'exclude' => false,
'label' => 'Preis pro Nacht',
'config' => [
'type' => 'input',
'size' => 8,
'eval' => 'double2,required',
]
],
'price_additional_person' => [
'exclude' => false,
'label' => 'Preis weitere Person',
'config' => [
'type' => 'input',
'size' => 8,
'eval' => 'double2,required',
]
],
],
];
@@ -0,0 +1,149 @@
<?php
return [
'ctrl' => [
'title' => 'Gruppenhaus Zusatzleistung',
'default_sortby' => 'ORDER BY price',
'sortby' => 'sorting',
'label' => 'title',
'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' => 'title',
'iconfile' => 'EXT:ep_theme/Resources/Public/images/icon_ce.svg',
'hideTable' => true,
],
'interface' => [
'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, title, price',
],
'types' => [
'1' => [
'showitem' => 'title, price',
],
],
'palettes' => [
],
'columns' => [
'sys_language_uid' => [
'exclude' => 0,
'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.language',
'config' => [
'type' => 'select',
'renderType' => 'selectSingle',
'foreign_table' => 'sys_language',
'foreign_table_where' => 'ORDER BY sys_language.title',
'items' => [
['LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.allLanguages', -1],
['LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.default_value', 0]
],
],
],
'l10n_parent' => [
'displayCond' => 'FIELD:sys_language_uid:>:0',
'exclude' => 0,
'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent',
'config' => [
'type' => 'select',
'renderType' => 'selectSingle',
'items' => [
['', 0],
],
'foreign_table' => 'tx_epproducts_domain_model_groups_price_option',
'foreign_table_where' => 'AND tx_epproducts_domain_model_groups_price_option.pid=###CURRENT_PID### AND tx_epproducts_domain_model_groups_price_option.sys_language_uid IN (-1,0)',
],
],
'l10n_diffsource' => [
'config' => [
'type' => 'passthrough',
],
],
't3ver_label' => [
'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.versionLabel',
'config' => [
'type' => 'input',
'size' => 30,
'max' => 255,
]
],
'hidden' => [
'exclude' => 0,
'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.hidden',
'config' => [
'type' => 'check',
],
],
'starttime' => [
'exclude' => 0,
'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.starttime',
'config' => [
'type' => 'input',
'size' => 13,
'eval' => 'datetime',
'checkbox' => 0,
'default' => 0,
'range' => [
'lower' => mktime(0, 0, 0, date('m'), date('d'), date('Y'))
],
'behaviour' => [
'allowLanguageSynchronization' => true,
],
'renderType' => 'inputDateTime',
],
],
'endtime' => [
'exclude' => 0,
'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.endtime',
'config' => [
'type' => 'input',
'size' => 13,
'eval' => 'datetime',
'checkbox' => 0,
'default' => 0,
'range' => [
'lower' => mktime(0, 0, 0, date('m'), date('d'), date('Y'))
],
'behaviour' => [
'allowLanguageSynchronization' => true,
],
'renderType' => 'inputDateTime',
],
],
'title' => [
'exclude' => false,
'label' => 'Bezeichnung',
'config' => [
'type' => 'input',
'size' => 32,
'eval' => 'required',
]
],
'price' => [
'exclude' => false,
'label' => 'Preis',
'config' => [
'type' => 'input',
'size' => 8,
'eval' => 'double2,required',
]
],
'sorting' => [
'config' => [
'type' => 'passthrough'
]
],
],
];
@@ -28,7 +28,7 @@ return [
address, longitude, latitude, headline, teaser, description, features, room_types, additional_information,
teaser_images, header_images, images, reseller_images, code, type, category, country, region, city, facts,
teamer, products, header_title,header_subtitle, earlybird, new, low_contingent, show_as_teaser,
external_link, path_segment',
external_link, path_segment, groups_price_configs, groups_price_boards, groups_price_options',
],
'types' => [
'1' => [
@@ -36,7 +36,8 @@ return [
--palette--;;destinations, --palette--;;categories, keywords,
--div--;Texte, teaser, description, features, room_types, additional_information,
--div--;Verknüpfungen, facts, teamer, additional_codes,
--div--;Bilder/Dateien, teaser_images, header_images, images, reseller_images',
--div--;Bilder/Dateien, teaser_images, header_images, images, reseller_images,
--div--;Gruppenhaus Preise, groups_price_configs, groups_price_boards, groups_price_options',
],
],
'palettes' => [
@@ -592,7 +593,7 @@ return [
'additional_codes' => [
'exclude' => 0,
'label' => 'Zusätzliche Codes',
'config' => array(
'config' => [
'type' => 'inline',
'foreign_table' => 'tx_epproducts_domain_model_matchcode',
'foreign_field' => 'entity',
@@ -600,15 +601,15 @@ return [
'entity_type' => 'hotel',
],
'maxitems' => 10,
'appearance' => array(
'appearance' => [
'collapseAll' => 1,
'levelLinksPosition' => 'top',
'showSynchronizationLink' => 0,
'showPossibleLocalizationRecords' => 0,
'showAllLocalizationLink' => 0,
'expandSingle' => 1,
),
),
],
],
],
'latitude' => [
'exclude' => 0,
@@ -654,5 +655,64 @@ return [
'eval' => 'uniqueInSite',
],
],
'groups_price_configs' => [
'exclude' => 0,
'label' => 'Preiskonfigurationen',
'config' => [
'type' => 'inline',
'foreign_table' => 'tx_epproducts_domain_model_groups_price_config',
'foreign_field' => 'hotel',
'maxitems' => 99,
'minitems' => 0,
'appearance' => [
'collapseAll' => 1,
'levelLinksPosition' => 'top',
'showSynchronizationLink' => 0,
'showPossibleLocalizationRecords' => 0,
'showAllLocalizationLink' => 0,
'expandSingle' => 1,
],
],
],
'groups_price_boards' => [
'exclude' => 0,
'label' => 'Verpflegungsleistungen',
'config' => [
'type' => 'inline',
'foreign_table' => 'tx_epproducts_domain_model_groups_price_board',
'foreign_field' => 'hotel',
'maxitems' => 99,
'minitems' => 0,
'appearance' => [
'useSortable' => true,
'collapseAll' => 1,
'levelLinksPosition' => 'top',
'showSynchronizationLink' => 0,
'showPossibleLocalizationRecords' => 0,
'showAllLocalizationLink' => 0,
'expandSingle' => 1,
],
],
],
'groups_price_options' => [
'exclude' => 0,
'label' => 'Optionale Zusatzleistungen',
'config' => [
'type' => 'inline',
'foreign_table' => 'tx_epproducts_domain_model_groups_price_option',
'foreign_field' => 'hotel',
'maxitems' => 99,
'minitems' => 0,
'appearance' => [
'useSortable' => true,
'collapseAll' => 1,
'levelLinksPosition' => 'top',
'showSynchronizationLink' => 0,
'showPossibleLocalizationRecords' => 0,
'showAllLocalizationLink' => 0,
'expandSingle' => 1,
],
],
],
],
];
@@ -238,6 +238,9 @@ CREATE TABLE tx_epproducts_domain_model_hotel
address varchar(255) DEFAULT '' NOT NULL,
latitude varchar(255) DEFAULT '' NOT NULL,
longitude varchar(255) DEFAULT '' NOT NULL,
groups_price_configs int(11) unsigned NOT NULL default '0',
groups_price_options int(11) unsigned NOT NULL default '0',
groups_price_boards int(11) unsigned NOT NULL default '0',
tstamp int(11) unsigned DEFAULT '0' NOT NULL,
crdate int(11) unsigned DEFAULT '0' NOT NULL,
@@ -268,6 +271,137 @@ CREATE TABLE tx_epproducts_domain_model_hotel
);
#
# Table structure for table 'tx_epproducts_domain_model_groups_price_config'
#
CREATE TABLE tx_epproducts_domain_model_groups_price_config
(
uid int(11) NOT NULL auto_increment,
pid int(11) DEFAULT '0' NOT NULL,
date_from int(11) unsigned DEFAULT '0' NOT NULL,
date_to int(11) unsigned DEFAULT '0' NOT NULL,
persons_included int(11) unsigned DEFAULT '0' NOT NULL,
price float(8) unsigned DEFAULT '0' NOT NULL,
price_additional_person float(8) unsigned DEFAULT '0' NOT NULL,
hotel int(11) unsigned DEFAULT '0',
tstamp int(11) unsigned DEFAULT '0' NOT NULL,
crdate int(11) unsigned DEFAULT '0' NOT NULL,
cruser_id int(11) unsigned DEFAULT '0' NOT NULL,
deleted tinyint(4) unsigned DEFAULT '0' NOT NULL,
hidden tinyint(4) unsigned DEFAULT '0' NOT NULL,
starttime int(11) unsigned DEFAULT '0' NOT NULL,
endtime int(11) unsigned DEFAULT '0' NOT NULL,
t3ver_oid int(11) DEFAULT '0' NOT NULL,
t3ver_id int(11) DEFAULT '0' NOT NULL,
t3ver_wsid int(11) DEFAULT '0' NOT NULL,
t3ver_label varchar(255) DEFAULT '' NOT NULL,
t3ver_state tinyint(4) DEFAULT '0' NOT NULL,
t3ver_stage int(11) DEFAULT '0' NOT NULL,
t3ver_count int(11) DEFAULT '0' NOT NULL,
t3ver_tstamp int(11) DEFAULT '0' NOT NULL,
t3ver_move_id int(11) DEFAULT '0' NOT NULL,
sys_language_uid int(11) DEFAULT '0' NOT NULL,
l10n_parent int(11) DEFAULT '0' NOT NULL,
l10n_diffsource mediumblob,
PRIMARY KEY (uid),
KEY parent (pid),
KEY t3ver_oid (t3ver_oid, t3ver_wsid),
KEY language (l10n_parent, sys_language_uid)
);
#
# Table structure for table 'tx_epproducts_domain_model_groups_price_option'
#
CREATE TABLE tx_epproducts_domain_model_groups_price_option
(
uid int(11) NOT NULL auto_increment,
pid int(11) DEFAULT '0' NOT NULL,
title varchar(255) DEFAULT '' NOT NULL,
price float(8) unsigned DEFAULT '0' NOT NULL,
hotel int(11) unsigned DEFAULT '0',
sorting int(11) DEFAULT '0' NOT NULL,
tstamp int(11) unsigned DEFAULT '0' NOT NULL,
crdate int(11) unsigned DEFAULT '0' NOT NULL,
cruser_id int(11) unsigned DEFAULT '0' NOT NULL,
deleted tinyint(4) unsigned DEFAULT '0' NOT NULL,
hidden tinyint(4) unsigned DEFAULT '0' NOT NULL,
starttime int(11) unsigned DEFAULT '0' NOT NULL,
endtime int(11) unsigned DEFAULT '0' NOT NULL,
t3ver_oid int(11) DEFAULT '0' NOT NULL,
t3ver_id int(11) DEFAULT '0' NOT NULL,
t3ver_wsid int(11) DEFAULT '0' NOT NULL,
t3ver_label varchar(255) DEFAULT '' NOT NULL,
t3ver_state tinyint(4) DEFAULT '0' NOT NULL,
t3ver_stage int(11) DEFAULT '0' NOT NULL,
t3ver_count int(11) DEFAULT '0' NOT NULL,
t3ver_tstamp int(11) DEFAULT '0' NOT NULL,
t3ver_move_id int(11) DEFAULT '0' NOT NULL,
sys_language_uid int(11) DEFAULT '0' NOT NULL,
l10n_parent int(11) DEFAULT '0' NOT NULL,
l10n_diffsource mediumblob,
PRIMARY KEY (uid),
KEY parent (pid),
KEY t3ver_oid (t3ver_oid, t3ver_wsid),
KEY language (l10n_parent, sys_language_uid)
);
#
# Table structure for table 'tx_epproducts_domain_model_groups_price_board'
#
CREATE TABLE tx_epproducts_domain_model_groups_price_board
(
uid int(11) NOT NULL auto_increment,
pid int(11) DEFAULT '0' NOT NULL,
title varchar(255) DEFAULT '' NOT NULL,
price float(8) unsigned DEFAULT '0' NOT NULL,
hotel int(11) unsigned DEFAULT '0',
sorting int(11) DEFAULT '0' NOT NULL,
tstamp int(11) unsigned DEFAULT '0' NOT NULL,
crdate int(11) unsigned DEFAULT '0' NOT NULL,
cruser_id int(11) unsigned DEFAULT '0' NOT NULL,
deleted tinyint(4) unsigned DEFAULT '0' NOT NULL,
hidden tinyint(4) unsigned DEFAULT '0' NOT NULL,
starttime int(11) unsigned DEFAULT '0' NOT NULL,
endtime int(11) unsigned DEFAULT '0' NOT NULL,
t3ver_oid int(11) DEFAULT '0' NOT NULL,
t3ver_id int(11) DEFAULT '0' NOT NULL,
t3ver_wsid int(11) DEFAULT '0' NOT NULL,
t3ver_label varchar(255) DEFAULT '' NOT NULL,
t3ver_state tinyint(4) DEFAULT '0' NOT NULL,
t3ver_stage int(11) DEFAULT '0' NOT NULL,
t3ver_count int(11) DEFAULT '0' NOT NULL,
t3ver_tstamp int(11) DEFAULT '0' NOT NULL,
t3ver_move_id int(11) DEFAULT '0' NOT NULL,
sys_language_uid int(11) DEFAULT '0' NOT NULL,
l10n_parent int(11) DEFAULT '0' NOT NULL,
l10n_diffsource mediumblob,
PRIMARY KEY (uid),
KEY parent (pid),
KEY t3ver_oid (t3ver_oid, t3ver_wsid),
KEY language (l10n_parent, sys_language_uid)
);
#
# Table structure for table 'tx_epproducts_domain_model_room'
#