Fix tca filenames

This commit is contained in:
Björn Fromme
2020-01-10 14:59:14 +01:00
parent ba18a1c5a8
commit be909049d1
10 changed files with 84 additions and 49 deletions
@@ -29,7 +29,7 @@ use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
class GroupsPriceBoard extends AbstractEntity
class GroupsPriceBoard extends AbstractEntity implements \JsonSerializable
{
/**
* @var string
@@ -72,4 +72,15 @@ class GroupsPriceBoard extends AbstractEntity
{
$this->price = $price;
}
/**
* @return array
*/
public function jsonSerialize()
{
return [
'title' => $this->getTitle(),
'price' => $this->getPrice(),
];
}
}
@@ -29,7 +29,7 @@ use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
class GroupsPriceConfig extends AbstractEntity
class GroupsPriceConfig extends AbstractEntity implements \JsonSerializable
{
/**
* @var \DateTime
@@ -135,4 +135,18 @@ class GroupsPriceConfig extends AbstractEntity
{
$this->priceAdditionalPerson = $priceAdditionalPerson;
}
/**
* @return array
*/
public function jsonSerialize()
{
return [
'dateFrom' => $this->getDateFrom()->format('d.m.Y'),
'dateTo' => $this->getDateTo()->format('d.m.Y'),
'personsIncluded' => $this->getPersonsIncluded(),
'price' => $this->getPrice(),
'priceAdditionalPerson' => $this->getPriceAdditionalPerson(),
];
}
}
@@ -29,7 +29,7 @@ use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
class GroupsPriceOption extends AbstractEntity
class GroupsPriceOption extends AbstractEntity implements \JsonSerializable
{
/**
* @var string
@@ -72,4 +72,15 @@ class GroupsPriceOption extends AbstractEntity
{
$this->price = $price;
}
/**
* @return array
*/
public function jsonSerialize()
{
return [
'title' => $this->getTitle(),
'price' => $this->getPrice(),
];
}
}
@@ -169,22 +169,22 @@ class Hotel extends AbstractEntity implements TeaserInterface
protected $address = '';
/**
* @var ObjectStorage
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference>
*/
protected $images;
/**
* @var ObjectStorage
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference>
*/
protected $resellerImages;
/**
* @var ObjectStorage
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference>
*/
protected $teaserImages;
/**
* @var ObjectStorage
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference>
*/
protected $headerImages;
@@ -194,7 +194,7 @@ class Hotel extends AbstractEntity implements TeaserInterface
protected $code = '';
/**
* @var ObjectStorage
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EP\EpProducts\Domain\Model\MatchCode>
* @TYPO3\CMS\Extbase\Annotation\ORM\Lazy
*/
protected $additionalCodes;
@@ -210,32 +210,32 @@ class Hotel extends AbstractEntity implements TeaserInterface
protected $category = self::CATEGORY_STANDARD;
/**
* @var Country
* @var \EP\EpProducts\Domain\Model\Country
*/
protected $country;
/**
* @var Region
* @var \EP\EpProducts\Domain\Model\Region
*/
protected $region;
/**
* @var City
* @var \EP\EpProducts\Domain\Model\City
*/
protected $city;
/**
* @var ObjectStorage
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EP\EpProducts\Domain\Model\Teammember>
*/
protected $teamer;
/**
* @var ObjectStorage
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EP\EpProducts\Domain\Model\Product>
*/
protected $products;
/**
* @var ObjectStorage
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EP\EpProducts\Domain\Model\Fact>
*/
protected $facts;
@@ -250,20 +250,17 @@ class Hotel extends AbstractEntity implements TeaserInterface
protected $pathSegment;
/**
* @var ObjectStorage
* @TYPO3\CMS\Extbase\Annotation\ORM\Lazy
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EP\EpProducts\Domain\Model\GroupsPriceConfig>
*/
protected $groupsPriceConfigs;
/**
* @var ObjectStorage
* @TYPO3\CMS\Extbase\Annotation\ORM\Lazy
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EP\EpProducts\Domain\Model\GroupsPriceOption>
*/
protected $groupsPriceOptions;
/**
* @var ObjectStorage
* @TYPO3\CMS\Extbase\Annotation\ORM\Lazy
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\EP\EpProducts\Domain\Model\GroupsPriceBoard>
*/
protected $groupsPriceBoards;
@@ -283,6 +280,8 @@ class Hotel extends AbstractEntity implements TeaserInterface
$this->facts = new ObjectStorage();
$this->additionalCodes = new ObjectStorage();
$this->groupsPriceConfigs = new ObjectStorage();
$this->groupsPriceOptions = new ObjectStorage();
$this->groupsPriceBoards = new ObjectStorage();
}
/**
@@ -862,7 +861,7 @@ class Hotel extends AbstractEntity implements TeaserInterface
}
/**
* @return ObjectStorage $teamer
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage $teamer
*/
public function getTeamer()
{
@@ -870,7 +869,7 @@ class Hotel extends AbstractEntity implements TeaserInterface
}
/**
* @param ObjectStorage $teamer
* @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $teamer
*/
public function setTeamer(ObjectStorage $teamer)
{
@@ -894,7 +893,7 @@ class Hotel extends AbstractEntity implements TeaserInterface
}
/**
* @return ObjectStorage
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage
*/
public function getProducts()
{
@@ -902,7 +901,7 @@ class Hotel extends AbstractEntity implements TeaserInterface
}
/**
* @param ObjectStorage $products
* @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $products
*/
public function setProducts(ObjectStorage $products)
{
@@ -910,7 +909,7 @@ class Hotel extends AbstractEntity implements TeaserInterface
}
/**
* @param ObjectStorage $rooms
* @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $rooms
*/
public function setRooms($rooms) {
$this->rooms = $rooms;
@@ -933,7 +932,7 @@ class Hotel extends AbstractEntity implements TeaserInterface
}
/**
* @return ObjectStorage
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage
*/
public function getFacts()
{
@@ -941,7 +940,7 @@ class Hotel extends AbstractEntity implements TeaserInterface
}
/**
* @param ObjectStorage $facts
* @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $facts
*/
public function setFacts(ObjectStorage $facts)
{
@@ -997,7 +996,7 @@ class Hotel extends AbstractEntity implements TeaserInterface
}
/**
* @return ObjectStorage
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage
*/
public function getGroupsPriceConfigs()
{
@@ -1005,7 +1004,7 @@ class Hotel extends AbstractEntity implements TeaserInterface
}
/**
* @param ObjectStorage $groupPriceConfigs
* @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $groupPriceConfigs
*/
public function setGroupsPriceConfigs(ObjectStorage $groupPriceConfigs)
{
@@ -1013,7 +1012,7 @@ class Hotel extends AbstractEntity implements TeaserInterface
}
/**
* @return ObjectStorage
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage
*/
public function getGroupsPriceOptions()
{
@@ -1021,7 +1020,7 @@ class Hotel extends AbstractEntity implements TeaserInterface
}
/**
* @param ObjectStorage $groupsPriceOptions
* @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $groupsPriceOptions
*/
public function setGroupsPriceOptions(ObjectStorage $groupsPriceOptions)
{
@@ -1029,7 +1028,7 @@ class Hotel extends AbstractEntity implements TeaserInterface
}
/**
* @return ObjectStorage
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage
*/
public function getGroupsPriceBoards()
{
@@ -1037,7 +1036,7 @@ class Hotel extends AbstractEntity implements TeaserInterface
}
/**
* @param ObjectStorage $groupsPriceBoards
* @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $groupsPriceBoards
*/
public function setGroupsPriceBoards(ObjectStorage $groupsPriceBoards)
{
@@ -99,7 +99,7 @@ class LabelService
*/
public function getGroupsPriceConfigLabel(&$parameters, $parentObject)
{
$record = BackendUtility::getRecord('tx_epproducts_domain_model_groups_price_config', $parameters['row']['uid']);
$record = BackendUtility::getRecord('tx_epproducts_domain_model_groupspriceconfig', $parameters['row']['uid']);
$parameters['title'] = sprintf('%s - %s', date('d.m.Y', $record['date_from']), date('d.m.Y', $record['date_to']));
}
}
@@ -59,8 +59,8 @@ return [
'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)',
'foreign_table' => 'tx_epproducts_domain_model_groupspriceboard',
'foreign_table_where' => 'AND tx_epproducts_domain_model_groupspriceboard.pid=###CURRENT_PID### AND tx_epproducts_domain_model_groupspriceboard.sys_language_uid IN (-1,0)',
],
],
'l10n_diffsource' => [
@@ -62,8 +62,8 @@ return [
'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)',
'foreign_table' => 'tx_epproducts_domain_model_groupspriceconfig',
'foreign_table_where' => 'AND tx_epproducts_domain_model_groupspriceconfig.pid=###CURRENT_PID### AND tx_epproducts_domain_model_groupspriceconfig.sys_language_uid IN (-1,0)',
],
],
'l10n_diffsource' => [
@@ -59,8 +59,8 @@ return [
'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)',
'foreign_table' => 'tx_epproducts_domain_model_groupspriceoption',
'foreign_table_where' => 'AND tx_epproducts_domain_model_groupspriceoption.pid=###CURRENT_PID### AND tx_epproducts_domain_model_groupspriceoption.sys_language_uid IN (-1,0)',
],
],
'l10n_diffsource' => [
@@ -660,7 +660,7 @@ return [
'label' => 'Preiskonfigurationen',
'config' => [
'type' => 'inline',
'foreign_table' => 'tx_epproducts_domain_model_groups_price_config',
'foreign_table' => 'tx_epproducts_domain_model_groupspriceconfig',
'foreign_field' => 'hotel',
'maxitems' => 99,
'minitems' => 0,
@@ -679,7 +679,7 @@ return [
'label' => 'Verpflegungsleistungen',
'config' => [
'type' => 'inline',
'foreign_table' => 'tx_epproducts_domain_model_groups_price_board',
'foreign_table' => 'tx_epproducts_domain_model_groupspriceboard',
'foreign_field' => 'hotel',
'maxitems' => 99,
'minitems' => 0,
@@ -699,7 +699,7 @@ return [
'label' => 'Optionale Zusatzleistungen',
'config' => [
'type' => 'inline',
'foreign_table' => 'tx_epproducts_domain_model_groups_price_option',
'foreign_table' => 'tx_epproducts_domain_model_groupspriceoption',
'foreign_field' => 'hotel',
'maxitems' => 99,
'minitems' => 0,
@@ -272,9 +272,9 @@ CREATE TABLE tx_epproducts_domain_model_hotel
);
#
# Table structure for table 'tx_epproducts_domain_model_groups_price_config'
# Table structure for table 'tx_epproducts_domain_model_groupspriceconfig'
#
CREATE TABLE tx_epproducts_domain_model_groups_price_config
CREATE TABLE tx_epproducts_domain_model_groupspriceconfig
(
uid int(11) NOT NULL auto_increment,
@@ -317,9 +317,9 @@ CREATE TABLE tx_epproducts_domain_model_groups_price_config
);
#
# Table structure for table 'tx_epproducts_domain_model_groups_price_option'
# Table structure for table 'tx_epproducts_domain_model_groupspriceoption'
#
CREATE TABLE tx_epproducts_domain_model_groups_price_option
CREATE TABLE tx_epproducts_domain_model_groupspriceoption
(
uid int(11) NOT NULL auto_increment,
@@ -360,9 +360,9 @@ CREATE TABLE tx_epproducts_domain_model_groups_price_option
);
#
# Table structure for table 'tx_epproducts_domain_model_groups_price_board'
# Table structure for table 'tx_epproducts_domain_model_groupspriceboard'
#
CREATE TABLE tx_epproducts_domain_model_groups_price_board
CREATE TABLE tx_epproducts_domain_model_groupspriceboard
(
uid int(11) NOT NULL auto_increment,