[TASK] FormEngine: The factory
Creation of container and elements instances in the FormEngine is hard coded and hard to overwrite or adapt. The patch extends the existing NodeFactory with resolver code to find an appropriate class for a given requested type. All FormEngine internal container and element requests are now routed through NodeFactory. This allows to loosen the strict dependency between TCA config "type" to an implementing class by moving the resolving code into the factory. This is done for SelectElement which is now split into multiple smaller classes - one for each display type. The NodeFactory is covered by unit tests since the resolving code will become more complex and fine grained in the future. As a side effect the patch resolves a hack in the FormDataTraverser which no longer calls internal stuff of the select element. The NodeFactory is prepared to be extended with an API for extensions to steer and overwrite default implementations. This will be added with a next patch. Change-Id: I2253a0fe3240366d0d271a3cd82119ce3dc52012 Resolves: #67006 Releases: master Reviewed-on: http://review.typo3.org/39517 Reviewed-by:Christian Kuhn <lolli@schwarzbu.ch> Tested-by:
Christian Kuhn <lolli@schwarzbu.ch>
Showing
- typo3/sysext/backend/Classes/Exception.php 22 additions, 0 deletionstypo3/sysext/backend/Classes/Exception.php
- typo3/sysext/backend/Classes/Form/AbstractNode.php 1 addition, 1 deletiontypo3/sysext/backend/Classes/Form/AbstractNode.php
- typo3/sysext/backend/Classes/Form/Container/FlexFormContainer.php 5 additions, 3 deletions...sext/backend/Classes/Form/Container/FlexFormContainer.php
- typo3/sysext/backend/Classes/Form/Container/FlexFormContainerContainer.php 5 additions, 3 deletions...end/Classes/Form/Container/FlexFormContainerContainer.php
- typo3/sysext/backend/Classes/Form/Container/FlexFormElementContainer.php 7 additions, 6 deletions...ckend/Classes/Form/Container/FlexFormElementContainer.php
- typo3/sysext/backend/Classes/Form/Container/FlexFormLanguageContainer.php 9 additions, 6 deletions...kend/Classes/Form/Container/FlexFormLanguageContainer.php
- typo3/sysext/backend/Classes/Form/Container/FlexFormNoTabsContainer.php 5 additions, 3 deletions...ackend/Classes/Form/Container/FlexFormNoTabsContainer.php
- typo3/sysext/backend/Classes/Form/Container/FlexFormSectionContainer.php 9 additions, 6 deletions...ckend/Classes/Form/Container/FlexFormSectionContainer.php
- typo3/sysext/backend/Classes/Form/Container/FlexFormTabsContainer.php 5 additions, 3 deletions.../backend/Classes/Form/Container/FlexFormTabsContainer.php
- typo3/sysext/backend/Classes/Form/Container/FullRecordContainer.php 9 additions, 8 deletions...xt/backend/Classes/Form/Container/FullRecordContainer.php
- typo3/sysext/backend/Classes/Form/Container/InlineControlContainer.php 6 additions, 4 deletions...backend/Classes/Form/Container/InlineControlContainer.php
- typo3/sysext/backend/Classes/Form/Container/InlineRecordContainer.php 5 additions, 3 deletions.../backend/Classes/Form/Container/InlineRecordContainer.php
- typo3/sysext/backend/Classes/Form/Container/ListOfFieldsContainer.php 5 additions, 4 deletions.../backend/Classes/Form/Container/ListOfFieldsContainer.php
- typo3/sysext/backend/Classes/Form/Container/NoTabsContainer.php 6 additions, 4 deletions...sysext/backend/Classes/Form/Container/NoTabsContainer.php
- typo3/sysext/backend/Classes/Form/Container/PaletteAndSingleContainer.php 9 additions, 8 deletions...kend/Classes/Form/Container/PaletteAndSingleContainer.php
- typo3/sysext/backend/Classes/Form/Container/SingleFieldContainer.php 8 additions, 8 deletions...t/backend/Classes/Form/Container/SingleFieldContainer.php
- typo3/sysext/backend/Classes/Form/Container/SoloFieldContainer.php 5 additions, 4 deletions...ext/backend/Classes/Form/Container/SoloFieldContainer.php
- typo3/sysext/backend/Classes/Form/Container/TabsContainer.php 5 additions, 5 deletions...3/sysext/backend/Classes/Form/Container/TabsContainer.php
- typo3/sysext/backend/Classes/Form/Element/AbstractFormElement.php 7 additions, 5 deletions...sext/backend/Classes/Form/Element/AbstractFormElement.php
- typo3/sysext/backend/Classes/Form/Element/ImageManipulationElement.php 7 additions, 4 deletions...backend/Classes/Form/Element/ImageManipulationElement.php
Please register or sign in to comment