[!!!][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>
Showing
- typo3/sysext/backend/Classes/Form/FormDataProvider/AbstractItemProvider.php 19 additions, 54 deletions...nd/Classes/Form/FormDataProvider/AbstractItemProvider.php
- typo3/sysext/backend/Classes/Form/FormDataProvider/TcaFlexFetch.php 0 additions, 143 deletions...xt/backend/Classes/Form/FormDataProvider/TcaFlexFetch.php
- typo3/sysext/backend/Classes/Form/FormDataProvider/TcaFlexPrepare.php 54 additions, 18 deletions.../backend/Classes/Form/FormDataProvider/TcaFlexPrepare.php
- typo3/sysext/backend/Classes/Form/FormDataProvider/TcaFlexProcess.php 1 addition, 0 deletions.../backend/Classes/Form/FormDataProvider/TcaFlexProcess.php
- typo3/sysext/backend/Classes/Form/Wizard/SuggestWizard.php 13 additions, 6 deletionstypo3/sysext/backend/Classes/Form/Wizard/SuggestWizard.php
- typo3/sysext/backend/Classes/Utility/BackendUtility.php 4 additions, 1 deletiontypo3/sysext/backend/Classes/Utility/BackendUtility.php
- typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/TcaFlexFetchTest.php 0 additions, 273 deletions...end/Tests/Unit/Form/FormDataProvider/TcaFlexFetchTest.php
- typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/TcaFlexPrepareTest.php 255 additions, 136 deletions...d/Tests/Unit/Form/FormDataProvider/TcaFlexPrepareTest.php
- typo3/sysext/core/Classes/Configuration/FlexForm/Exception/AbstractInvalidDataStructureException.php 25 additions, 0 deletions...xForm/Exception/AbstractInvalidDataStructureException.php
- typo3/sysext/core/Classes/Configuration/FlexForm/Exception/InvalidCombinedPointerFieldException.php 22 additions, 0 deletions...exForm/Exception/InvalidCombinedPointerFieldException.php
- typo3/sysext/core/Classes/Configuration/FlexForm/Exception/InvalidIdentifierException.php 22 additions, 0 deletions...uration/FlexForm/Exception/InvalidIdentifierException.php
- typo3/sysext/core/Classes/Configuration/FlexForm/Exception/InvalidParentRowException.php 23 additions, 0 deletions...guration/FlexForm/Exception/InvalidParentRowException.php
- typo3/sysext/core/Classes/Configuration/FlexForm/Exception/InvalidParentRowLoopException.php 22 additions, 0 deletions...tion/FlexForm/Exception/InvalidParentRowLoopException.php
- typo3/sysext/core/Classes/Configuration/FlexForm/Exception/InvalidParentRowRootException.php 22 additions, 0 deletions...tion/FlexForm/Exception/InvalidParentRowRootException.php
- typo3/sysext/core/Classes/Configuration/FlexForm/Exception/InvalidPointerFieldValueException.php 22 additions, 0 deletions.../FlexForm/Exception/InvalidPointerFieldValueException.php
- typo3/sysext/core/Classes/Configuration/FlexForm/Exception/InvalidSinglePointerFieldException.php 22 additions, 0 deletions...FlexForm/Exception/InvalidSinglePointerFieldException.php
- typo3/sysext/core/Classes/Configuration/FlexForm/Exception/InvalidTcaException.php 24 additions, 0 deletions.../Configuration/FlexForm/Exception/InvalidTcaException.php
- typo3/sysext/core/Classes/Configuration/FlexForm/FlexFormTools.php 710 additions, 48 deletions...ext/core/Classes/Configuration/FlexForm/FlexFormTools.php
- typo3/sysext/core/Classes/DataHandling/DataHandler.php 63 additions, 19 deletionstypo3/sysext/core/Classes/DataHandling/DataHandler.php
- typo3/sysext/core/Classes/Database/ReferenceIndex.php 5 additions, 3 deletionstypo3/sysext/core/Classes/Database/ReferenceIndex.php
Please register or sign in to comment