[TASK] TCA tree refactoring
The patch refactors the TCA tree form engine data calculation. The tree now works with "new" (not yet persisted) records, even if the record has types in combination with flex forms. For instance, a new ext:news tt_content element now renders the category tree within flex forms, even in new tt_content records that have not been saved. The TCA tree no longer fetches all items when opening a record initially, but defers that to the ajax request. This gives a massive performance improvement on initial load of a record if the displayed TCA tree is bigger. The ajax request itself now compiles only data of the requested TCA field, also resulting in a significant performance improvement. As example, ext:styleguide "elements select" is now rendered much quicker and the single ajax calls per tree are reduced from about 4 seconds to less than a second each with my test data. Change-Id: If3c4c1779f5fe1510ffc13d1c9f1151bddab13e9 Resolves: #78744 Releases: master Reviewed-on: https://review.typo3.org/50700 Reviewed-by:Thomas Maroschik <tmaroschik@dfau.de> Tested-by:
Thomas Maroschik <tmaroschik@dfau.de> Reviewed-by:
Tymoteusz Motylewski <t.motylewski@gmail.com> Tested-by:
Tymoteusz Motylewski <t.motylewski@gmail.com>
Showing
- typo3/sysext/backend/Classes/Controller/SelectTreeController.php 60 additions, 41 deletions...ysext/backend/Classes/Controller/SelectTreeController.php
- typo3/sysext/backend/Classes/Form/Container/FlexFormElementContainer.php 0 additions, 2 deletions...ckend/Classes/Form/Container/FlexFormElementContainer.php
- typo3/sysext/backend/Classes/Form/Element/SelectTreeElement.php 8 additions, 2 deletions...sysext/backend/Classes/Form/Element/SelectTreeElement.php
- typo3/sysext/backend/Classes/Form/FormDataCompiler.php 5 additions, 1 deletiontypo3/sysext/backend/Classes/Form/FormDataCompiler.php
- typo3/sysext/backend/Classes/Form/FormDataProvider/DatabaseRecordTypeValue.php 5 additions, 0 deletions...Classes/Form/FormDataProvider/DatabaseRecordTypeValue.php
- typo3/sysext/backend/Classes/Form/FormDataProvider/InitializeProcessedTca.php 12 additions, 9 deletions.../Classes/Form/FormDataProvider/InitializeProcessedTca.php
- typo3/sysext/backend/Classes/Form/FormDataProvider/TcaFlexPrepare.php 15 additions, 10 deletions.../backend/Classes/Form/FormDataProvider/TcaFlexPrepare.php
- typo3/sysext/backend/Classes/Form/FormDataProvider/TcaFlexProcess.php 3 additions, 0 deletions.../backend/Classes/Form/FormDataProvider/TcaFlexProcess.php
- typo3/sysext/backend/Classes/Form/FormDataProvider/TcaSelectTreeItems.php 38 additions, 61 deletions...kend/Classes/Form/FormDataProvider/TcaSelectTreeItems.php
- typo3/sysext/backend/Resources/Public/JavaScript/FormEngine/Element/SelectTreeElement.js 3 additions, 1 deletion...Public/JavaScript/FormEngine/Element/SelectTreeElement.js
- typo3/sysext/backend/Tests/Unit/Controller/SelectTreeControllerTest.php 55 additions, 0 deletions...ackend/Tests/Unit/Controller/SelectTreeControllerTest.php
- typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/DatabaseRecordTypeValueTest.php 48 additions, 0 deletions...nit/Form/FormDataProvider/DatabaseRecordTypeValueTest.php
- typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/InitializeProcessedTcaTest.php 17 additions, 0 deletions...Unit/Form/FormDataProvider/InitializeProcessedTcaTest.php
- typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/TcaFlexPrepareTest.php 47 additions, 0 deletions...d/Tests/Unit/Form/FormDataProvider/TcaFlexPrepareTest.php
- typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/TcaSelectTreeItemsTest.php 2 additions, 1 deletion...sts/Unit/Form/FormDataProvider/TcaSelectTreeItemsTest.php
- typo3/sysext/core/Tests/Acceptance/Backend/Page/AddPageInPageModuleCest.php 0 additions, 1 deletion...Tests/Acceptance/Backend/Page/AddPageInPageModuleCest.php
Please register or sign in to comment