[!!!][TASK] Flex form data structure refactoring 12/48212/33
authorChristian Kuhn <lolli@schwarzbu.ch>
Wed, 18 May 2016 15:58:06 +0000 (17:58 +0200)
committerSusanne Moog <susanne.moog@typo3.org>
Mon, 7 Nov 2016 17:06:23 +0000 (18:06 +0100)
commit9b7fd1773db9c325719af0ff0670554e82f8cdbe
tree06816f07d3fec1b52627f9fa0d271e9b3e3832b2
parent5eb4024c966057b046fa6667185dd34ad4803be4
[!!!][TASK] Flex form data structure refactoring

Method BackendUtility::getFlexFormDS() does two things at once:
It finds a data structure by given data (TCA, row, ...) and then
parses it.
This construct gives tons of headaches, since the methods never
exposes where a specific data structure came from and the lookup
mechanism is complex. Especially if a flex form is used in
combination with ajax requests later, the core has massive issues
since the location can not be found out later again.

To solve that, the patch splits getFlexFormDS() into two methods:
First method "FlexFormTools->getDataStructureIdentifier()" gets
TCA and row and locates a specific structure. It returns an
"identifier" that points to that unique data structure. This
identifier can be later hand around easily.
The second method "FlexFormTools->parseDataStructureByIdentifier()"
then gets this identifier again, fetches the data structure the
identifier points to, and parses it.

Change-Id: I38264e8a4a6f956c12e9e50f6039d3d09af0f03a
Resolves: #78581
Releases: master
Reviewed-on: https://review.typo3.org/48212
Tested-by: TYPO3com <no-reply@typo3.com>
Tested-by: Claus Due <claus@phpmind.net>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Susanne Moog <susanne.moog@typo3.org>
Tested-by: Susanne Moog <susanne.moog@typo3.org>
47 files changed:
typo3/sysext/backend/Classes/Form/FormDataProvider/AbstractItemProvider.php
typo3/sysext/backend/Classes/Form/FormDataProvider/TcaFlexFetch.php [deleted file]
typo3/sysext/backend/Classes/Form/FormDataProvider/TcaFlexPrepare.php
typo3/sysext/backend/Classes/Form/FormDataProvider/TcaFlexProcess.php
typo3/sysext/backend/Classes/Form/Wizard/SuggestWizard.php
typo3/sysext/backend/Classes/Utility/BackendUtility.php
typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/TcaFlexFetchTest.php [deleted file]
typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/TcaFlexPrepareTest.php
typo3/sysext/core/Classes/Configuration/FlexForm/Exception/AbstractInvalidDataStructureException.php [new file with mode: 0644]
typo3/sysext/core/Classes/Configuration/FlexForm/Exception/InvalidCombinedPointerFieldException.php [new file with mode: 0644]
typo3/sysext/core/Classes/Configuration/FlexForm/Exception/InvalidIdentifierException.php [new file with mode: 0644]
typo3/sysext/core/Classes/Configuration/FlexForm/Exception/InvalidParentRowException.php [new file with mode: 0644]
typo3/sysext/core/Classes/Configuration/FlexForm/Exception/InvalidParentRowLoopException.php [new file with mode: 0644]
typo3/sysext/core/Classes/Configuration/FlexForm/Exception/InvalidParentRowRootException.php [new file with mode: 0644]
typo3/sysext/core/Classes/Configuration/FlexForm/Exception/InvalidPointerFieldValueException.php [new file with mode: 0644]
typo3/sysext/core/Classes/Configuration/FlexForm/Exception/InvalidSinglePointerFieldException.php [new file with mode: 0644]
typo3/sysext/core/Classes/Configuration/FlexForm/Exception/InvalidTcaException.php [new file with mode: 0644]
typo3/sysext/core/Classes/Configuration/FlexForm/FlexFormTools.php
typo3/sysext/core/Classes/DataHandling/DataHandler.php
typo3/sysext/core/Classes/Database/ReferenceIndex.php
typo3/sysext/core/Classes/Utility/GeneralUtility.php
typo3/sysext/core/Configuration/DefaultConfiguration.php
typo3/sysext/core/Documentation/Changelog/master/Breaking-78581-FlexFormToolsPublicPropertiesDropped.rst [new file with mode: 0644]
typo3/sysext/core/Documentation/Changelog/master/Breaking-78581-FormEngineTcaFlexFetchDataProviderRemoved.rst [new file with mode: 0644]
typo3/sysext/core/Documentation/Changelog/master/Breaking-78581-HookGetFlexFormDSClassNoLongerCalled.rst [new file with mode: 0644]
typo3/sysext/core/Documentation/Changelog/master/Deprecation-78581-FlexFormRelatedParsing.rst [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Configuration/FlexForm/Fixtures/DataStructureIdentifierPostProcessHookReturnArray.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Configuration/FlexForm/Fixtures/DataStructureIdentifierPostProcessHookReturnEmptyArray.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Configuration/FlexForm/Fixtures/DataStructureIdentifierPostProcessHookReturnString.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Configuration/FlexForm/Fixtures/DataStructureIdentifierPostProcessHookThrowException.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Configuration/FlexForm/Fixtures/DataStructureIdentifierPreProcessHookReturnArray.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Configuration/FlexForm/Fixtures/DataStructureIdentifierPreProcessHookReturnEmptyArray.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Configuration/FlexForm/Fixtures/DataStructureIdentifierPreProcessHookReturnString.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Configuration/FlexForm/Fixtures/DataStructureIdentifierPreProcessHookThrowException.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Configuration/FlexForm/Fixtures/DataStructureOfSingleSheet.xml [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Configuration/FlexForm/Fixtures/DataStructureParsePostProcessHookReturnArray.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Configuration/FlexForm/Fixtures/DataStructureParsePostProcessHookReturnString.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Configuration/FlexForm/Fixtures/DataStructureParsePostProcessHookThrowException.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Configuration/FlexForm/Fixtures/DataStructureParsePreProcessHookReturnEmptyString.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Configuration/FlexForm/Fixtures/DataStructureParsePreProcessHookReturnObject.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Configuration/FlexForm/Fixtures/DataStructureParsePreProcessHookReturnString.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Configuration/FlexForm/Fixtures/DataStructureParsePreProcessHookThrowException.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Configuration/FlexForm/Fixtures/DataStructureWithSheet.xml [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Configuration/FlexForm/FlexFormToolsTest.php
typo3/sysext/core/Tests/Unit/DataHandling/DataHandlerTest.php
typo3/sysext/impexp/Classes/Import.php
typo3/sysext/lowlevel/Classes/Command/LostFilesCommand.php