Skip to content
Snippets Groups Projects
Commit 954a3f08 authored by Benni Mack's avatar Benni Mack Committed by Christian Kuhn
Browse files

[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: default avatarTYPO3com <noreply@typo3.com>
Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarGeorg Ringer <georg.ringer@gmail.com>
Tested-by: default avatarBenni Mack <benni@typo3.org>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: default avatarGeorg Ringer <georg.ringer@gmail.com>
Reviewed-by: default avatarBenni Mack <benni@typo3.org>
Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
parent 03f78e77
Branches
Tags
No related merge requests found
Showing
with 1035 additions and 206 deletions
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment