[!!!][TASK] The FormEngine is dead, long live the FormEngine!
tl;dr: This patch makes FormEngine insanely flexible, extensions however should not rely on structures for now, since class names and array content will change. The patch applies a separation of concerns to the FormEngine class structure by extracting the data processing from rendering. As a main goal the render part consisting of container and element classes routed through the flexible NodeFactory only works on data created by the new FormDataCompiler class construct. This makes the FormEngine much more flexible and opens ways to not only use the render part in the context of database driven data, but on anything that is fed to it. This patch creates the main structure for this. The FormDataCompiler class returns a defined array container and elements can work on it. Data is added by single FormDataProvider, which are combined in FormDataGroups. FormDataProvider may depend on each other and a FormDataGroup "knows" its providers and calls them in a dedicated order. For instance, the "FullDatabaseRecord" FormDataGroup first calls a provider that fetches the record defined by uid and table name and a later called provider determines the given record type this record is assigned to, so another provider can then work on TCA to determine the list of record fields to be shown. The FormDataProvider used for the main FormDataGroup are defined in TYPO3_CONF_VARS, so extensions can add and remove their own providers to add or change certain data if needed. This is highly flexible and extensions are able to hook in at a specific position within the provider chain for the main data groups. This construct obsoletes the DataPreprocessor as well as several other side classes. With this patch the main architecture is created and lots of data preparation is transfered already, supported by a high unit test coverage. The FormEngine class itself is removed: The inline ajax entry point is moved to an own controller class, the getMainFields() and friends methods are substituted with FormDataCompiler / NodeFactory combinations and the data gathering is for now parked in a FormResultCompiler class. However, this process is not yet finished and lots of @todo statements are added to the code base to document open ends and to further separate the data handling from the render engine. Especially the IRRE data handling is currently still located within the render engine and makes the whole thing much more complicated than it should be. Lots of detail patches need to follow to bring this code to a level where it belongs to be. Warning: While this patch is already insanely huge touching more than 22 thousands lines of code, lots of loose ends need to be tackled and the API is not final yet. The arrays will be reduced and sharpened during the next weeks, class names may change and structures will change. Change-Id: Ief1769f478373cc26d1bf6c49114258f0dae8355 Resolves: #69568 Releases: master Reviewed-on: http://review.typo3.org/41933 Reviewed-by:Anja Leichsenring <aleichsenring@ab-softlab.de> Tested-by:
Anja Leichsenring <aleichsenring@ab-softlab.de> Reviewed-by:
Florian Peters <fpeters1392@googlemail.com> Reviewed-by:
Mathias Schreiber <mathias.schreiber@wmdb.de> Tested-by:
Mathias Schreiber <mathias.schreiber@wmdb.de> Reviewed-by:
Alexander Opitz <opitz.alexander@googlemail.com> Tested-by:
Alexander Opitz <opitz.alexander@googlemail.com> Reviewed-by:
Wouter Wolters <typo3@wouterwolters.nl> Tested-by:
Wouter Wolters <typo3@wouterwolters.nl> Reviewed-by:
Christian Kuhn <lolli@schwarzbu.ch> Tested-by:
Christian Kuhn <lolli@schwarzbu.ch>
Showing
- typo3/sysext/backend/Classes/Configuration/TranslationConfigurationProvider.php 1 addition, 0 deletions...lasses/Configuration/TranslationConfigurationProvider.php
- typo3/sysext/backend/Classes/Controller/ContentElement/ElementInformationController.php 0 additions, 3 deletions...ontroller/ContentElement/ElementInformationController.php
- typo3/sysext/backend/Classes/Controller/EditDocumentController.php 141 additions, 189 deletions...ext/backend/Classes/Controller/EditDocumentController.php
- typo3/sysext/backend/Classes/Controller/File/CreateFolderController.php 0 additions, 1 deletion...ackend/Classes/Controller/File/CreateFolderController.php
- typo3/sysext/backend/Classes/Controller/FormInlineAjaxController.php 589 additions, 0 deletions...t/backend/Classes/Controller/FormInlineAjaxController.php
- typo3/sysext/backend/Classes/Controller/PageLayoutController.php 93 additions, 60 deletions...ysext/backend/Classes/Controller/PageLayoutController.php
- typo3/sysext/backend/Classes/Controller/Wizard/AddController.php 25 additions, 11 deletions...ysext/backend/Classes/Controller/Wizard/AddController.php
- typo3/sysext/backend/Classes/Controller/Wizard/RteController.php 48 additions, 37 deletions...ysext/backend/Classes/Controller/Wizard/RteController.php
- typo3/sysext/backend/Classes/Form/AbstractNode.php 21 additions, 16 deletionstypo3/sysext/backend/Classes/Form/AbstractNode.php
- typo3/sysext/backend/Classes/Form/Container/AbstractContainer.php 11 additions, 200 deletions...sext/backend/Classes/Form/Container/AbstractContainer.php
- typo3/sysext/backend/Classes/Form/Container/FlexFormContainer.php 0 additions, 93 deletions...sext/backend/Classes/Form/Container/FlexFormContainer.php
- typo3/sysext/backend/Classes/Form/Container/FlexFormContainerContainer.php 13 additions, 16 deletions...end/Classes/Form/Container/FlexFormContainerContainer.php
- typo3/sysext/backend/Classes/Form/Container/FlexFormElementContainer.php 29 additions, 48 deletions...ckend/Classes/Form/Container/FlexFormElementContainer.php
- typo3/sysext/backend/Classes/Form/Container/FlexFormLanguageContainer.php 23 additions, 113 deletions...kend/Classes/Form/Container/FlexFormLanguageContainer.php
- typo3/sysext/backend/Classes/Form/Container/FlexFormNoTabsContainer.php 21 additions, 18 deletions...ackend/Classes/Form/Container/FlexFormNoTabsContainer.php
- typo3/sysext/backend/Classes/Form/Container/FlexFormSectionContainer.php 12 additions, 16 deletions...ckend/Classes/Form/Container/FlexFormSectionContainer.php
- typo3/sysext/backend/Classes/Form/Container/FlexFormTabsContainer.php 11 additions, 13 deletions.../backend/Classes/Form/Container/FlexFormTabsContainer.php
- typo3/sysext/backend/Classes/Form/Container/FullRecordContainer.php 11 additions, 110 deletions...xt/backend/Classes/Form/Container/FullRecordContainer.php
- typo3/sysext/backend/Classes/Form/Container/InlineControlContainer.php 53 additions, 74 deletions...backend/Classes/Form/Container/InlineControlContainer.php
- typo3/sysext/backend/Classes/Form/Container/InlineRecordContainer.php 83 additions, 33 deletions.../backend/Classes/Form/Container/InlineRecordContainer.php
Please register or sign in to comment