[TASK] FormEngine inline refactoring 55/43755/34
authorChristian Kuhn <lolli@schwarzbu.ch>
Sat, 3 Oct 2015 00:54:25 +0000 (02:54 +0200)
committerBenni Mack <benni@typo3.org>
Thu, 8 Oct 2015 15:40:12 +0000 (17:40 +0200)
commitefa8c85dafc5667489f3f22e57fc258984f26770
tree03572732ba774e8a56582d4fd6211590fdc32313
parent9b52da334ea75ff20334f6fcf43ef1868e32227f
[TASK] FormEngine inline refactoring

FormEngine splits in two parts: Data compilation and preparation
and rendering.

The patch separates the inline related data preparation out
of the render containers and moves it into the data provider.
TcaInline provider now resolves and compiles children and adds them
to processedTca[columns][$field][children], so InlineControlContainer
can just loop over them to render children.

InlineRecordContainer, the second inline container that takes
care of rendering single children records now no longer receives
the full parent data, but only the specific child data array it should
render. This leads to better encapsulation and allows some future
performance improvements.

While the inline stuff is still a very complex thing, this last
main structural FormEngine change takes the opportunity to comment
further details and dependencies and it simplifies the structures
by better separation of concerns.

Change-Id: Ia0ed276d7fc6f541f8ae27eaac3e17e3b8714ddf
Resolves: #70490
Releases: master
Reviewed-on: http://review.typo3.org/43755
Reviewed-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Tested-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
20 files changed:
typo3/sysext/backend/Classes/Controller/FormInlineAjaxController.php
typo3/sysext/backend/Classes/Form/Container/FlexFormElementContainer.php
typo3/sysext/backend/Classes/Form/Container/InlineControlContainer.php
typo3/sysext/backend/Classes/Form/Container/InlineRecordContainer.php
typo3/sysext/backend/Classes/Form/FormDataCompiler.php
typo3/sysext/backend/Classes/Form/FormDataProvider/AbstractDatabaseRecordProvider.php
typo3/sysext/backend/Classes/Form/FormDataProvider/DatabaseRowInitializeNew.php
typo3/sysext/backend/Classes/Form/FormDataProvider/DatabaseUserPermissionCheck.php
typo3/sysext/backend/Classes/Form/FormDataProvider/TcaInline.php
typo3/sysext/backend/Classes/Form/FormDataProvider/TcaInlineConfiguration.php [new file with mode: 0644]
typo3/sysext/backend/Classes/Form/FormDataProvider/TcaInlineExpandCollapseState.php [new file with mode: 0644]
typo3/sysext/backend/Classes/Form/FormDataProvider/TcaInputPlaceholders.php
typo3/sysext/backend/Classes/Form/InlineRelatedRecordResolver.php [deleted file]
typo3/sysext/backend/Classes/Form/InlineStackProcessor.php
typo3/sysext/backend/Classes/Form/Utility/FormEngineUtility.php
typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/TcaInlineConfigurationTest.php [new file with mode: 0644]
typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/TcaInlineExpandCollapseStateTest.php [new file with mode: 0644]
typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/TcaInputPlaceholdersTest.php
typo3/sysext/backend/Tests/Unit/Form/InlineStackProcessorTest.php
typo3/sysext/core/Configuration/DefaultConfiguration.php