mirror of
https://github.com/FriendsOfTYPO3/tea.git
synced 2024-11-23 13:36:13 +01:00
[!!!][TASK] Drop additional namespace segment for the Tea model (#1025)
The `Product` namespace segment in the domain model namespace `TTN\Tea\Domain\Model` currently serves no purpose and only adds confusion. So let's simplify the extension structure accordingly. (I intended to use this to demonstrate DDD contexts, but never built enough models in the Tea extension for this to actually make sense.) Fixes #1008
This commit is contained in:
parent
68434c33e5
commit
eeda862e77
25 changed files with 84 additions and 83 deletions
|
@ -8,6 +8,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
- Drop additional namespace segment for the Tea model (#1025)
|
||||||
|
|
||||||
### Deprecated
|
### Deprecated
|
||||||
|
|
||||||
|
|
|
@ -5,8 +5,8 @@ declare(strict_types=1);
|
||||||
namespace TTN\Tea\Controller;
|
namespace TTN\Tea\Controller;
|
||||||
|
|
||||||
use Psr\Http\Message\ResponseInterface;
|
use Psr\Http\Message\ResponseInterface;
|
||||||
use TTN\Tea\Domain\Model\Product\Tea;
|
use TTN\Tea\Domain\Model\Tea;
|
||||||
use TTN\Tea\Domain\Repository\Product\TeaRepository;
|
use TTN\Tea\Domain\Repository\TeaRepository;
|
||||||
use TYPO3\CMS\Core\Context\Context;
|
use TYPO3\CMS\Core\Context\Context;
|
||||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||||
use TYPO3\CMS\Extbase\Annotation as Extbase;
|
use TYPO3\CMS\Extbase\Annotation as Extbase;
|
||||||
|
|
|
@ -5,8 +5,8 @@ declare(strict_types=1);
|
||||||
namespace TTN\Tea\Controller;
|
namespace TTN\Tea\Controller;
|
||||||
|
|
||||||
use Psr\Http\Message\ResponseInterface;
|
use Psr\Http\Message\ResponseInterface;
|
||||||
use TTN\Tea\Domain\Model\Product\Tea;
|
use TTN\Tea\Domain\Model\Tea;
|
||||||
use TTN\Tea\Domain\Repository\Product\TeaRepository;
|
use TTN\Tea\Domain\Repository\TeaRepository;
|
||||||
use TYPO3\CMS\Extbase\Mvc\Controller\ActionController;
|
use TYPO3\CMS\Extbase\Mvc\Controller\ActionController;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace TTN\Tea\Domain\Model\Product;
|
namespace TTN\Tea\Domain\Model;
|
||||||
|
|
||||||
use TYPO3\CMS\Extbase\Annotation as Extbase;
|
use TYPO3\CMS\Extbase\Annotation as Extbase;
|
||||||
use TYPO3\CMS\Extbase\Domain\Model\FileReference;
|
use TYPO3\CMS\Extbase\Domain\Model\FileReference;
|
|
@ -2,9 +2,9 @@
|
||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace TTN\Tea\Domain\Repository\Product;
|
namespace TTN\Tea\Domain\Repository;
|
||||||
|
|
||||||
use TTN\Tea\Domain\Model\Product\Tea;
|
use TTN\Tea\Domain\Model\Tea;
|
||||||
use TTN\Tea\Domain\Repository\Traits\StoragePageAgnosticTrait;
|
use TTN\Tea\Domain\Repository\Traits\StoragePageAgnosticTrait;
|
||||||
use TYPO3\CMS\Extbase\Persistence\QueryInterface;
|
use TYPO3\CMS\Extbase\Persistence\QueryInterface;
|
||||||
use TYPO3\CMS\Extbase\Persistence\QueryResultInterface;
|
use TYPO3\CMS\Extbase\Persistence\QueryResultInterface;
|
|
@ -3,7 +3,7 @@
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
return [
|
return [
|
||||||
\TTN\Tea\Domain\Model\Product\Tea::class => [
|
\TTN\Tea\Domain\Model\Tea::class => [
|
||||||
'properties' => [
|
'properties' => [
|
||||||
'ownerUid' => ['fieldName' => 'owner'],
|
'ownerUid' => ['fieldName' => 'owner'],
|
||||||
],
|
],
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
$tca = [
|
$tca = [
|
||||||
'ctrl' => [
|
'ctrl' => [
|
||||||
'title' => 'LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_product_tea',
|
'title' => 'LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_tea',
|
||||||
'label' => 'title',
|
'label' => 'title',
|
||||||
'tstamp' => 'tstamp',
|
'tstamp' => 'tstamp',
|
||||||
'crdate' => 'crdate',
|
'crdate' => 'crdate',
|
||||||
|
@ -26,7 +26,7 @@ $tca = [
|
||||||
'showitem' =>
|
'showitem' =>
|
||||||
'--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:general,
|
'--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:general,
|
||||||
title, description, image, owner,
|
title, description, image, owner,
|
||||||
--div--;LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_product_tea.tabs.access,
|
--div--;LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_tea.tabs.access,
|
||||||
--palette--;;hidden,
|
--palette--;;hidden,
|
||||||
--palette--;;access,',
|
--palette--;;access,',
|
||||||
],
|
],
|
||||||
|
@ -34,11 +34,11 @@ $tca = [
|
||||||
'palettes' => [
|
'palettes' => [
|
||||||
'hidden' => [
|
'hidden' => [
|
||||||
'showitem' => '
|
'showitem' => '
|
||||||
hidden;LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_product_tea.hidden
|
hidden;LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_tea.hidden
|
||||||
',
|
',
|
||||||
],
|
],
|
||||||
'access' => [
|
'access' => [
|
||||||
'label' => 'LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_product_tea.palettes.access',
|
'label' => 'LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_tea.palettes.access',
|
||||||
'showitem' => '
|
'showitem' => '
|
||||||
starttime;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:starttime_formlabel,
|
starttime;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:starttime_formlabel,
|
||||||
endtime;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:endtime_formlabel,
|
endtime;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:endtime_formlabel,
|
||||||
|
@ -50,7 +50,7 @@ $tca = [
|
||||||
'columns' => [
|
'columns' => [
|
||||||
'hidden' => [
|
'hidden' => [
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'label' => 'LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_product_tea.hidden',
|
'label' => 'LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_tea.hidden',
|
||||||
'config' => [
|
'config' => [
|
||||||
'type' => 'check',
|
'type' => 'check',
|
||||||
'renderType' => 'checkboxToggle',
|
'renderType' => 'checkboxToggle',
|
||||||
|
@ -107,10 +107,10 @@ $tca = [
|
||||||
'value' => 0,
|
'value' => 0,
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'foreign_table' => 'tx_tea_domain_model_product_tea',
|
'foreign_table' => 'tx_tea_domain_model_tea',
|
||||||
'foreign_table_where' =>
|
'foreign_table_where' =>
|
||||||
'AND {#tx_tea_domain_model_product_tea}.{#pid}=###CURRENT_PID###
|
'AND {#tx_tea_domain_model_tea}.{#pid}=###CURRENT_PID###
|
||||||
AND {#tx_tea_domain_model_product_tea}.{#sys_language_uid} IN (-1,0)',
|
AND {#tx_tea_domain_model_tea}.{#sys_language_uid} IN (-1,0)',
|
||||||
'default' => 0,
|
'default' => 0,
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
@ -126,7 +126,7 @@ $tca = [
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'title' => [
|
'title' => [
|
||||||
'label' => 'LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_product_tea.title',
|
'label' => 'LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_tea.title',
|
||||||
'config' => [
|
'config' => [
|
||||||
'type' => 'input',
|
'type' => 'input',
|
||||||
'size' => 40,
|
'size' => 40,
|
||||||
|
@ -136,7 +136,7 @@ $tca = [
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'description' => [
|
'description' => [
|
||||||
'label' => 'LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_product_tea.description',
|
'label' => 'LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_tea.description',
|
||||||
'config' => [
|
'config' => [
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'enableRichtext' => true,
|
'enableRichtext' => true,
|
||||||
|
@ -147,7 +147,7 @@ $tca = [
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'image' => [
|
'image' => [
|
||||||
'label' => 'LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_product_tea.image',
|
'label' => 'LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_tea.image',
|
||||||
'config' => [
|
'config' => [
|
||||||
'type' => 'file',
|
'type' => 'file',
|
||||||
'maxitems' => 1,
|
'maxitems' => 1,
|
||||||
|
@ -164,7 +164,7 @@ $tca = [
|
||||||
'fe_group' => [
|
'fe_group' => [
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'l10n_mode' => 'exclude',
|
'l10n_mode' => 'exclude',
|
||||||
'label' => 'LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_product_tea.fe_group',
|
'label' => 'LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_tea.fe_group',
|
||||||
'config' => [
|
'config' => [
|
||||||
'type' => 'select',
|
'type' => 'select',
|
||||||
'renderType' => 'selectMultipleSideBySide',
|
'renderType' => 'selectMultipleSideBySide',
|
||||||
|
@ -191,7 +191,7 @@ $tca = [
|
||||||
'owner' => [
|
'owner' => [
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'l10n_mode' => 'exclude',
|
'l10n_mode' => 'exclude',
|
||||||
'label' => 'LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_product_tea.owner',
|
'label' => 'LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_tea.owner',
|
||||||
'config' => [
|
'config' => [
|
||||||
'type' => 'group',
|
'type' => 'group',
|
||||||
'allowed' => 'fe_users',
|
'allowed' => 'fe_users',
|
||||||
|
@ -231,7 +231,7 @@ if ($typo3Version->getMajorVersion() < 12) {
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
$tca['columns']['image'] = [
|
$tca['columns']['image'] = [
|
||||||
'label' => 'LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_product_tea.image',
|
'label' => 'LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_tea.image',
|
||||||
'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
|
'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
|
||||||
'image',
|
'image',
|
||||||
[
|
[
|
||||||
|
@ -248,7 +248,7 @@ if ($typo3Version->getMajorVersion() < 12) {
|
||||||
];
|
];
|
||||||
$tca['columns']['hidden']['config'] = [
|
$tca['columns']['hidden']['config'] = [
|
||||||
'type' => 'check',
|
'type' => 'check',
|
||||||
'label' => 'LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_product_tea.hidden',
|
'label' => 'LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_tea.hidden',
|
||||||
'items' => [
|
'items' => [
|
||||||
[
|
[
|
||||||
0 => '',
|
0 => '',
|
|
@ -3,35 +3,35 @@
|
||||||
<file source-language="en" target-language="de" datatype="plaintext" original="messages">
|
<file source-language="en" target-language="de" datatype="plaintext" original="messages">
|
||||||
<header/>
|
<header/>
|
||||||
<body>
|
<body>
|
||||||
<trans-unit id="tx_tea_domain_model_product_tea">
|
<trans-unit id="tx_tea_domain_model_tea">
|
||||||
<source>Tea</source>
|
<source>Tea</source>
|
||||||
<target>Tee</target>
|
<target>Tee</target>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
<trans-unit id="tx_tea_domain_model_product_tea.tabs.access">
|
<trans-unit id="tx_tea_domain_model_tea.tabs.access">
|
||||||
<source>Access</source>
|
<source>Access</source>
|
||||||
<target>Zugriff</target>
|
<target>Zugriff</target>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
<trans-unit id="tx_tea_domain_model_product_tea.title">
|
<trans-unit id="tx_tea_domain_model_tea.title">
|
||||||
<source>Title</source>
|
<source>Title</source>
|
||||||
<target>Titel</target>
|
<target>Titel</target>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
<trans-unit id="tx_tea_domain_model_product_tea.description">
|
<trans-unit id="tx_tea_domain_model_tea.description">
|
||||||
<source>Description</source>
|
<source>Description</source>
|
||||||
<target>Beschreibung</target>
|
<target>Beschreibung</target>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
<trans-unit id="tx_tea_domain_model_product_tea.image">
|
<trans-unit id="tx_tea_domain_model_tea.image">
|
||||||
<source>Image</source>
|
<source>Image</source>
|
||||||
<target>Bild</target>
|
<target>Bild</target>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
<trans-unit id="tx_tea_domain_model_product_tea.owner">
|
<trans-unit id="tx_tea_domain_model_tea.owner">
|
||||||
<source>Website user who created this record</source>
|
<source>Website user who created this record</source>
|
||||||
<target>Website-Benutzer, der diesen Datensatz erstellt hat</target>
|
<target>Website-Benutzer, der diesen Datensatz erstellt hat</target>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
<trans-unit id="tx_tea_domain_model_product_tea.fe_group">
|
<trans-unit id="tx_tea_domain_model_tea.fe_group">
|
||||||
<source>Usergroup Access Rights</source>
|
<source>Usergroup Access Rights</source>
|
||||||
<target>Zugriffsrechte für Benutzergruppen</target>
|
<target>Zugriffsrechte für Benutzergruppen</target>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
<trans-unit id="tx_tea_domain_model_product_tea.hidden">
|
<trans-unit id="tx_tea_domain_model_tea.hidden">
|
||||||
<source>Visible</source>
|
<source>Visible</source>
|
||||||
<target>Sichtbar</target>
|
<target>Sichtbar</target>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
|
|
|
@ -3,28 +3,28 @@
|
||||||
<file source-language="en" datatype="plaintext" original="messages">
|
<file source-language="en" datatype="plaintext" original="messages">
|
||||||
<header/>
|
<header/>
|
||||||
<body>
|
<body>
|
||||||
<trans-unit id="tx_tea_domain_model_product_tea">
|
<trans-unit id="tx_tea_domain_model_tea">
|
||||||
<source>Tea</source>
|
<source>Tea</source>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
<trans-unit id="tx_tea_domain_model_product_tea.tabs.access">
|
<trans-unit id="tx_tea_domain_model_tea.tabs.access">
|
||||||
<source>Access</source>
|
<source>Access</source>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
<trans-unit id="tx_tea_domain_model_product_tea.title">
|
<trans-unit id="tx_tea_domain_model_tea.title">
|
||||||
<source>Title</source>
|
<source>Title</source>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
<trans-unit id="tx_tea_domain_model_product_tea.description">
|
<trans-unit id="tx_tea_domain_model_tea.description">
|
||||||
<source>Description</source>
|
<source>Description</source>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
<trans-unit id="tx_tea_domain_model_product_tea.image">
|
<trans-unit id="tx_tea_domain_model_tea.image">
|
||||||
<source>Image</source>
|
<source>Image</source>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
<trans-unit id="tx_tea_domain_model_product_tea.owner">
|
<trans-unit id="tx_tea_domain_model_tea.owner">
|
||||||
<source>Website user who created this record</source>
|
<source>Website user who created this record</source>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
<trans-unit id="tx_tea_domain_model_product_tea.fe_group">
|
<trans-unit id="tx_tea_domain_model_tea.fe_group">
|
||||||
<source>Usergroup Access Rights</source>
|
<source>Usergroup Access Rights</source>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
<trans-unit id="tx_tea_domain_model_product_tea.hidden">
|
<trans-unit id="tx_tea_domain_model_tea.hidden">
|
||||||
<source>Visible</source>
|
<source>Visible</source>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
</body>
|
</body>
|
||||||
|
|
|
@ -3,31 +3,31 @@
|
||||||
<file source-language="en" target-language="pl" datatype="plaintext" original="messages">
|
<file source-language="en" target-language="pl" datatype="plaintext" original="messages">
|
||||||
<header/>
|
<header/>
|
||||||
<body>
|
<body>
|
||||||
<trans-unit id="tx_tea_domain_model_product_tea">
|
<trans-unit id="tx_tea_domain_model_tea">
|
||||||
<source>Tea</source>
|
<source>Tea</source>
|
||||||
<target>Herbata</target>
|
<target>Herbata</target>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
<trans-unit id="tx_tea_domain_model_product_tea.tabs.access">
|
<trans-unit id="tx_tea_domain_model_tea.tabs.access">
|
||||||
<source>Access</source>
|
<source>Access</source>
|
||||||
<target>Dostęp</target>
|
<target>Dostęp</target>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
<trans-unit id="tx_tea_domain_model_product_tea.title">
|
<trans-unit id="tx_tea_domain_model_tea.title">
|
||||||
<source>Title</source>
|
<source>Title</source>
|
||||||
<target>Tytuł</target>
|
<target>Tytuł</target>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
<trans-unit id="tx_tea_domain_model_product_tea.description">
|
<trans-unit id="tx_tea_domain_model_tea.description">
|
||||||
<source>Description</source>
|
<source>Description</source>
|
||||||
<target>Opis</target>
|
<target>Opis</target>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
<trans-unit id="tx_tea_domain_model_product_tea.image">
|
<trans-unit id="tx_tea_domain_model_tea.image">
|
||||||
<source>Image</source>
|
<source>Image</source>
|
||||||
<target>Obraz</target>
|
<target>Obraz</target>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
<trans-unit id="tx_tea_domain_model_product_tea.owner">
|
<trans-unit id="tx_tea_domain_model_tea.owner">
|
||||||
<source>Website user who created this record</source>
|
<source>Website user who created this record</source>
|
||||||
<target>Użytkownik strony, który utworzył ten rekord</target>
|
<target>Użytkownik strony, który utworzył ten rekord</target>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
<trans-unit id="tx_tea_domain_model_product_tea.fe_group">
|
<trans-unit id="tx_tea_domain_model_tea.fe_group">
|
||||||
<source>Usergroup Access Rights</source>
|
<source>Usergroup Access Rights</source>
|
||||||
<target>Prawa dostępu grupy użytkowników</target>
|
<target>Prawa dostępu grupy użytkowników</target>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
"tx_tea_domain_model_product_tea"
|
"tx_tea_domain_model_tea"
|
||||||
,"uid","pid","title"
|
,"uid","pid","title"
|
||||||
,1,2,"Godesberger Burgtee"
|
,1,2,"Godesberger Burgtee"
|
||||||
,2,2,"Oolong"
|
,2,2,"Oolong"
|
||||||
|
|
Can't render this file because it has a wrong number of fields in line 2.
|
|
@ -1,3 +1,3 @@
|
||||||
"tx_tea_domain_model_product_tea"
|
"tx_tea_domain_model_tea"
|
||||||
,"uid","title"
|
,"uid","title"
|
||||||
,1,"Godesberger Burgtee"
|
,1,"Godesberger Burgtee"
|
Can't render this file because it has a wrong number of fields in line 2.
|
|
@ -1,3 +1,3 @@
|
||||||
"tx_tea_domain_model_product_tea"
|
"tx_tea_domain_model_tea"
|
||||||
,"uid","pid","title"
|
,"uid","pid","title"
|
||||||
,1,1,"Earl Grey"
|
,1,1,"Earl Grey"
|
Can't render this file because it has a wrong number of fields in line 2.
|
|
@ -1,3 +1,3 @@
|
||||||
"tx_tea_domain_model_product_tea"
|
"tx_tea_domain_model_tea"
|
||||||
,"uid","pid","title","description","owner"
|
,"uid","pid","title","description","owner"
|
||||||
,1,1,"Earl Grey","Fresh and hot.",2
|
,1,1,"Earl Grey","Fresh and hot.",2
|
Can't render this file because it has a wrong number of fields in line 2.
|
|
@ -1,7 +1,7 @@
|
||||||
"tx_tea_domain_model_product_tea"
|
"tx_tea_domain_model_tea"
|
||||||
,"uid","pid","title","image",
|
,"uid","pid","title","image",
|
||||||
,1,1,"Gunpowder",1
|
,1,1,"Gunpowder",1
|
||||||
|
|
||||||
"sys_file_reference"
|
"sys_file_reference"
|
||||||
,"uid","uid_foreign","tablenames","fieldname"
|
,"uid","uid_foreign","tablenames","fieldname"
|
||||||
,1,1,"tx_tea_domain_model_product_tea","image"
|
,1,1,"tx_tea_domain_model_tea","image"
|
Can't render this file because it contains an unexpected character in line 2 and column 2.
|
|
@ -1,3 +1,3 @@
|
||||||
"tx_tea_domain_model_product_tea"
|
"tx_tea_domain_model_tea"
|
||||||
,"uid","pid","title","owner"
|
,"uid","pid","title","owner"
|
||||||
,"1","1","Earl Grey",1
|
,"1","1","Earl Grey",1
|
Can't render this file because it has a wrong number of fields in line 2.
|
|
@ -1,3 +1,3 @@
|
||||||
"tx_tea_domain_model_product_tea"
|
"tx_tea_domain_model_tea"
|
||||||
,"uid","pid","title","owner"
|
,"uid","pid","title","owner"
|
||||||
,1,1,"Earl Grey",0
|
,1,1,"Earl Grey",0
|
Can't render this file because it has a wrong number of fields in line 2.
|
|
@ -1,4 +1,4 @@
|
||||||
"tx_tea_domain_model_product_tea"
|
"tx_tea_domain_model_tea"
|
||||||
,"uid","pid","title","owner"
|
,"uid","pid","title","owner"
|
||||||
,1,1,"Earl Grey",1
|
,1,1,"Earl Grey",1
|
||||||
,2,1,"Assam",1
|
,2,1,"Assam",1
|
Can't render this file because it has a wrong number of fields in line 2.
|
|
@ -1,4 +1,4 @@
|
||||||
"tx_tea_domain_model_product_tea"
|
"tx_tea_domain_model_tea"
|
||||||
,"uid","pid","title"
|
,"uid","pid","title"
|
||||||
,1,1,"Earl Grey"
|
,1,1,"Earl Grey"
|
||||||
,2,1,"Assam"
|
,2,1,"Assam"
|
Can't render this file because it has a wrong number of fields in line 2.
|
|
@ -2,17 +2,17 @@
|
||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace TTN\Tea\Tests\Functional\Domain\Repository\Product;
|
namespace TTN\Tea\Tests\Functional\Domain\Repository;
|
||||||
|
|
||||||
use TTN\Tea\Domain\Model\Product\Tea;
|
use TTN\Tea\Domain\Model\Tea;
|
||||||
use TTN\Tea\Domain\Repository\Product\TeaRepository;
|
use TTN\Tea\Domain\Repository\TeaRepository;
|
||||||
use TYPO3\CMS\Extbase\Domain\Model\FileReference;
|
use TYPO3\CMS\Extbase\Domain\Model\FileReference;
|
||||||
use TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface;
|
use TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface;
|
||||||
use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase;
|
use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers \TTN\Tea\Domain\Repository\Product\TeaRepository
|
* @covers \TTN\Tea\Domain\Repository\TeaRepository
|
||||||
* @covers \TTN\Tea\Domain\Model\Product\Tea
|
* @covers \TTN\Tea\Domain\Model\Tea
|
||||||
*/
|
*/
|
||||||
final class TeaRepositoryTest extends FunctionalTestCase
|
final class TeaRepositoryTest extends FunctionalTestCase
|
||||||
{
|
{
|
||||||
|
@ -46,7 +46,7 @@ final class TeaRepositoryTest extends FunctionalTestCase
|
||||||
*/
|
*/
|
||||||
public function findAllWithRecordsFindsRecordsFromAllPages(): void
|
public function findAllWithRecordsFindsRecordsFromAllPages(): void
|
||||||
{
|
{
|
||||||
$this->importCSVDataSet(__DIR__ . '/../Fixtures/Product/TeaOnPage.csv');
|
$this->importCSVDataSet(__DIR__ . '/Fixtures/TeaOnPage.csv');
|
||||||
|
|
||||||
$result = $this->subject->findAll();
|
$result = $this->subject->findAll();
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ final class TeaRepositoryTest extends FunctionalTestCase
|
||||||
*/
|
*/
|
||||||
public function findAllSortsByTitleInAscendingOrder(): void
|
public function findAllSortsByTitleInAscendingOrder(): void
|
||||||
{
|
{
|
||||||
$this->importCSVDataSet(__DIR__ . '/../Fixtures/Product/TwoUnsortedTeas.csv');
|
$this->importCSVDataSet(__DIR__ . '/Fixtures/TwoUnsortedTeas.csv');
|
||||||
|
|
||||||
$result = $this->subject->findAll();
|
$result = $this->subject->findAll();
|
||||||
|
|
||||||
|
@ -81,7 +81,7 @@ final class TeaRepositoryTest extends FunctionalTestCase
|
||||||
*/
|
*/
|
||||||
public function findByUidForExistingRecordReturnsModel(): void
|
public function findByUidForExistingRecordReturnsModel(): void
|
||||||
{
|
{
|
||||||
$this->importCSVDataSet(__DIR__ . '/../Fixtures/Product/TeaWithAllScalarData.csv');
|
$this->importCSVDataSet(__DIR__ . '/Fixtures/TeaWithAllScalarData.csv');
|
||||||
|
|
||||||
$model = $this->subject->findByUid(1);
|
$model = $this->subject->findByUid(1);
|
||||||
|
|
||||||
|
@ -93,7 +93,7 @@ final class TeaRepositoryTest extends FunctionalTestCase
|
||||||
*/
|
*/
|
||||||
public function findByUidForExistingRecordMapsAllScalarData(): void
|
public function findByUidForExistingRecordMapsAllScalarData(): void
|
||||||
{
|
{
|
||||||
$this->importCSVDataSet(__DIR__ . '/../Fixtures/Product/TeaWithAllScalarData.csv');
|
$this->importCSVDataSet(__DIR__ . '/Fixtures/TeaWithAllScalarData.csv');
|
||||||
|
|
||||||
$model = $this->subject->findByUid(1);
|
$model = $this->subject->findByUid(1);
|
||||||
self::assertInstanceOf(Tea::class, $model);
|
self::assertInstanceOf(Tea::class, $model);
|
||||||
|
@ -108,7 +108,7 @@ final class TeaRepositoryTest extends FunctionalTestCase
|
||||||
*/
|
*/
|
||||||
public function fillsImageRelation(): void
|
public function fillsImageRelation(): void
|
||||||
{
|
{
|
||||||
$this->importCSVDataSet(__DIR__ . '/../Fixtures/Product/TeaWithImage.csv');
|
$this->importCSVDataSet(__DIR__ . '/Fixtures/TeaWithImage.csv');
|
||||||
|
|
||||||
$model = $this->subject->findByUid(1);
|
$model = $this->subject->findByUid(1);
|
||||||
|
|
||||||
|
@ -129,7 +129,7 @@ final class TeaRepositoryTest extends FunctionalTestCase
|
||||||
$this->subject->add($model);
|
$this->subject->add($model);
|
||||||
$this->persistenceManager->persistAll();
|
$this->persistenceManager->persistAll();
|
||||||
|
|
||||||
$this->assertCSVDataSet(__DIR__ . '/../Fixtures/Product/PersistedTea.csv');
|
$this->assertCSVDataSet(__DIR__ . '/Fixtures/PersistedTea.csv');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -137,7 +137,7 @@ final class TeaRepositoryTest extends FunctionalTestCase
|
||||||
*/
|
*/
|
||||||
public function findByOwnerUidFindsTeaWithTheGivenOwnerUid(): void
|
public function findByOwnerUidFindsTeaWithTheGivenOwnerUid(): void
|
||||||
{
|
{
|
||||||
$this->importCSVDataSet(__DIR__ . '/../Fixtures/Product/TeaWithOwner.csv');
|
$this->importCSVDataSet(__DIR__ . '/Fixtures/TeaWithOwner.csv');
|
||||||
|
|
||||||
$result = $this->subject->findByOwnerUid(1);
|
$result = $this->subject->findByOwnerUid(1);
|
||||||
|
|
||||||
|
@ -149,7 +149,7 @@ final class TeaRepositoryTest extends FunctionalTestCase
|
||||||
*/
|
*/
|
||||||
public function findByOwnerUidFindsIgnoresTeaWithNonMatchingOwnerUid(): void
|
public function findByOwnerUidFindsIgnoresTeaWithNonMatchingOwnerUid(): void
|
||||||
{
|
{
|
||||||
$this->importCSVDataSet(__DIR__ . '/../Fixtures/Product/TeaWithOwner.csv');
|
$this->importCSVDataSet(__DIR__ . '/Fixtures/TeaWithOwner.csv');
|
||||||
|
|
||||||
$result = $this->subject->findByOwnerUid(2);
|
$result = $this->subject->findByOwnerUid(2);
|
||||||
|
|
||||||
|
@ -161,7 +161,7 @@ final class TeaRepositoryTest extends FunctionalTestCase
|
||||||
*/
|
*/
|
||||||
public function findByOwnerUidFindsIgnoresTeaWithZeroOwnerUid(): void
|
public function findByOwnerUidFindsIgnoresTeaWithZeroOwnerUid(): void
|
||||||
{
|
{
|
||||||
$this->importCSVDataSet(__DIR__ . '/../Fixtures/Product/TeaWithoutOwner.csv');
|
$this->importCSVDataSet(__DIR__ . '/Fixtures/TeaWithoutOwner.csv');
|
||||||
|
|
||||||
$result = $this->subject->findByOwnerUid(1);
|
$result = $this->subject->findByOwnerUid(1);
|
||||||
|
|
||||||
|
@ -173,7 +173,7 @@ final class TeaRepositoryTest extends FunctionalTestCase
|
||||||
*/
|
*/
|
||||||
public function findByOwnerUidSortsByTitleInAscendingOrder(): void
|
public function findByOwnerUidSortsByTitleInAscendingOrder(): void
|
||||||
{
|
{
|
||||||
$this->importCSVDataSet(__DIR__ . '/../Fixtures/Product/TwoTeasWithOwner.csv');
|
$this->importCSVDataSet(__DIR__ . '/Fixtures/TwoTeasWithOwner.csv');
|
||||||
|
|
||||||
$result = $this->subject->findByOwnerUid(1);
|
$result = $this->subject->findByOwnerUid(1);
|
||||||
|
|
|
@ -6,8 +6,8 @@ namespace TTN\Tea\Tests\Unit\Controller;
|
||||||
|
|
||||||
use PHPUnit\Framework\MockObject\MockObject;
|
use PHPUnit\Framework\MockObject\MockObject;
|
||||||
use TTN\Tea\Controller\FrontEndEditorController;
|
use TTN\Tea\Controller\FrontEndEditorController;
|
||||||
use TTN\Tea\Domain\Model\Product\Tea;
|
use TTN\Tea\Domain\Model\Tea;
|
||||||
use TTN\Tea\Domain\Repository\Product\TeaRepository;
|
use TTN\Tea\Domain\Repository\TeaRepository;
|
||||||
use TYPO3\CMS\Core\Context\Context;
|
use TYPO3\CMS\Core\Context\Context;
|
||||||
use TYPO3\CMS\Core\Context\UserAspect;
|
use TYPO3\CMS\Core\Context\UserAspect;
|
||||||
use TYPO3\CMS\Core\Http\HtmlResponse;
|
use TYPO3\CMS\Core\Http\HtmlResponse;
|
||||||
|
|
|
@ -6,8 +6,8 @@ namespace TTN\Tea\Tests\Unit\Controller;
|
||||||
|
|
||||||
use PHPUnit\Framework\MockObject\MockObject;
|
use PHPUnit\Framework\MockObject\MockObject;
|
||||||
use TTN\Tea\Controller\TeaController;
|
use TTN\Tea\Controller\TeaController;
|
||||||
use TTN\Tea\Domain\Model\Product\Tea;
|
use TTN\Tea\Domain\Model\Tea;
|
||||||
use TTN\Tea\Domain\Repository\Product\TeaRepository;
|
use TTN\Tea\Domain\Repository\TeaRepository;
|
||||||
use TYPO3\CMS\Core\Http\HtmlResponse;
|
use TYPO3\CMS\Core\Http\HtmlResponse;
|
||||||
use TYPO3\CMS\Core\Information\Typo3Version;
|
use TYPO3\CMS\Core\Information\Typo3Version;
|
||||||
use TYPO3\CMS\Extbase\Mvc\Controller\ActionController;
|
use TYPO3\CMS\Extbase\Mvc\Controller\ActionController;
|
||||||
|
|
|
@ -2,19 +2,19 @@
|
||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace TTN\Tea\Tests\Unit\Domain\Model\Product;
|
namespace TTN\Tea\Tests\Unit\Domain\Model;
|
||||||
|
|
||||||
use TTN\Tea\Domain\Model\Product\Tea;
|
use TTN\Tea\Domain\Model\Tea;
|
||||||
use TYPO3\CMS\Extbase\Domain\Model\FileReference;
|
use TYPO3\CMS\Extbase\Domain\Model\FileReference;
|
||||||
use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
|
use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
|
||||||
use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
|
use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers \TTN\Tea\Domain\Model\Product\Tea
|
* @covers \TTN\Tea\Domain\Model\Tea
|
||||||
*/
|
*/
|
||||||
final class TeaTest extends UnitTestCase
|
final class TeaTest extends UnitTestCase
|
||||||
{
|
{
|
||||||
private Tea $subject;
|
private \TTN\Tea\Domain\Model\Tea $subject;
|
||||||
|
|
||||||
protected function setUp(): void
|
protected function setUp(): void
|
||||||
{
|
{
|
|
@ -2,15 +2,15 @@
|
||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace TTN\Tea\Tests\Unit\Domain\Repository\Product;
|
namespace TTN\Tea\Tests\Unit\Domain\Repository;
|
||||||
|
|
||||||
use TTN\Tea\Domain\Repository\Product\TeaRepository;
|
use TTN\Tea\Domain\Repository\TeaRepository;
|
||||||
use TYPO3\CMS\Extbase\Object\ObjectManagerInterface;
|
use TYPO3\CMS\Extbase\Object\ObjectManagerInterface;
|
||||||
use TYPO3\CMS\Extbase\Persistence\Repository;
|
use TYPO3\CMS\Extbase\Persistence\Repository;
|
||||||
use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
|
use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers \TTN\Tea\Domain\Repository\Product\TeaRepository
|
* @covers \TTN\Tea\Domain\Repository\TeaRepository
|
||||||
*/
|
*/
|
||||||
final class TeaRepositoryTest extends UnitTestCase
|
final class TeaRepositoryTest extends UnitTestCase
|
||||||
{
|
{
|
|
@ -1,4 +1,4 @@
|
||||||
CREATE TABLE tx_tea_domain_model_product_tea (
|
CREATE TABLE tx_tea_domain_model_tea (
|
||||||
title varchar(255) DEFAULT '' NOT NULL,
|
title varchar(255) DEFAULT '' NOT NULL,
|
||||||
description varchar(2000) DEFAULT '' NOT NULL,
|
description varchar(2000) DEFAULT '' NOT NULL,
|
||||||
image int(11) unsigned DEFAULT '0' NOT NULL,
|
image int(11) unsigned DEFAULT '0' NOT NULL,
|
||||||
|
|
Loading…
Reference in a new issue