[FEATURE] Introduce TCA type "language"
A new TCA type "language" is added, in order to make life easier to set up new TCA. The main issue (as can be seen in core already) is that each TCA adds different implementations on how to deal with "-1". Now "-1" is added for any record except "pages", where the "-1 / All Languages" concept is not implemented. In addition, this decouples the select type from sys_language, effectively reducing the logic where a direct access is necessary to the "sys_language" table. This effectively also removes the now mis-use of `foreign_table` from the TCA "languageField" field by properly handling languages internally. This furthermore makes any relation handling superfluous, reducing quite an amount of code and complexity in the DataHandler. Instead, all columns, defined as "[ctrl][languageField]", are now automatically migrated to the new "type=language", with no specific configuration, as TYPO3 is managing this field, taking care of the user specific configuration. Furthermore, are all columns, using the “special=languages” option, migrated to the new TCA type. This allows to get rid of this special case as well, reducing complexity in FormEngine and DataHandler. The new TCA type also properly handles the field for records on root level, or on a page outside of a site context. The only exception is the `allowed_languages` field in be_users and be_groups, where a new itemsProcFunc is used. Resolves: #57082 Releases: master Change-Id: Ic4878326c0cdc6ce1f233fa29f07419bf6b572a4 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/60293 Tested-by:TYPO3com <noreply@typo3.com> Tested-by:
core-ci <typo3@b13.com> Tested-by:
Georg Ringer <georg.ringer@gmail.com> Tested-by:
Benni Mack <benni@typo3.org> Tested-by:
Christian Kuhn <lolli@schwarzbu.ch> Reviewed-by:
Georg Ringer <georg.ringer@gmail.com> Reviewed-by:
Benni Mack <benni@typo3.org> Reviewed-by:
Christian Kuhn <lolli@schwarzbu.ch>
Showing
- typo3/sysext/backend/Classes/Form/FormDataProvider/AbstractItemProvider.php 0 additions, 48 deletions...nd/Classes/Form/FormDataProvider/AbstractItemProvider.php
- typo3/sysext/backend/Classes/Form/FormDataProvider/TcaLanguage.php 185 additions, 0 deletions...ext/backend/Classes/Form/FormDataProvider/TcaLanguage.php
- typo3/sysext/backend/Classes/Form/NodeFactory.php 1 addition, 0 deletionstypo3/sysext/backend/Classes/Form/NodeFactory.php
- typo3/sysext/backend/Tests/Functional/Controller/FormInlineAjaxControllerTest.php 20 additions, 1 deletion...ts/Functional/Controller/FormInlineAjaxControllerTest.php
- typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/TcaLanguageTest.php 638 additions, 0 deletions...kend/Tests/Unit/Form/FormDataProvider/TcaLanguageTest.php
- typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/TcaSelectItemsTest.php 0 additions, 55 deletions...d/Tests/Unit/Form/FormDataProvider/TcaSelectItemsTest.php
- typo3/sysext/core/Classes/DataHandling/DataHandler.php 34 additions, 10 deletionstypo3/sysext/core/Classes/DataHandling/DataHandler.php
- typo3/sysext/core/Classes/DataHandling/Localization/DataMapProcessor.php 8 additions, 15 deletions...re/Classes/DataHandling/Localization/DataMapProcessor.php
- typo3/sysext/core/Classes/DataHandling/TableColumnType.php 1 addition, 0 deletionstypo3/sysext/core/Classes/DataHandling/TableColumnType.php
- typo3/sysext/core/Classes/Database/RelationHandler.php 1 addition, 6 deletionstypo3/sysext/core/Classes/Database/RelationHandler.php
- typo3/sysext/core/Classes/Localization/TcaSystemLanguageCollector.php 61 additions, 0 deletions.../core/Classes/Localization/TcaSystemLanguageCollector.php
- typo3/sysext/core/Classes/Migrations/TcaMigration.php 72 additions, 9 deletionstypo3/sysext/core/Classes/Migrations/TcaMigration.php
- typo3/sysext/core/Configuration/DefaultConfiguration.php 7 additions, 0 deletionstypo3/sysext/core/Configuration/DefaultConfiguration.php
- typo3/sysext/core/Configuration/TCA/be_groups.php 1 addition, 1 deletiontypo3/sysext/core/Configuration/TCA/be_groups.php
- typo3/sysext/core/Configuration/TCA/be_users.php 1 addition, 1 deletiontypo3/sysext/core/Configuration/TCA/be_users.php
- typo3/sysext/core/Configuration/TCA/pages.php 1 addition, 10 deletionstypo3/sysext/core/Configuration/TCA/pages.php
- typo3/sysext/core/Configuration/TCA/sys_category.php 1 addition, 11 deletionstypo3/sysext/core/Configuration/TCA/sys_category.php
- typo3/sysext/core/Configuration/TCA/sys_file_collection.php 1 addition, 13 deletionstypo3/sysext/core/Configuration/TCA/sys_file_collection.php
- typo3/sysext/core/Configuration/TCA/sys_file_metadata.php 1 addition, 13 deletionstypo3/sysext/core/Configuration/TCA/sys_file_metadata.php
- typo3/sysext/core/Configuration/TCA/sys_file_reference.php 1 addition, 13 deletionstypo3/sysext/core/Configuration/TCA/sys_file_reference.php
Please register or sign in to comment