With the release of TYPO3 12.3, changes were made that deprecated
indexed array keys for TCA items. Please see:
- https://forge.typo3.org/issues/99739
- deprecation: #99739 - Indexed array keys for TCA items
As a result of these changes, the function responsible for generating
labels for the values of the radio field in the column inside the
records list table returned an empty string when a (deprecated)
indexed array of items was used.
The second issue with the (`BackendUtility::getLabelFromItemlist`)
function was that it ignored the `itemsProcFunc` TCA configuration,
and items defined through a custom function were never used.
To address these issues, we now call the itemsProcFunc (if defined)
to handle items defined by such a custom function. To fetch item
labels respecting deprecated indexed item arrays, we use the method
from the core API `SelectItem::fromTcaItemArray()`, which respects
arrays with keys as well as indexed ones. With these changes, we also
pass the label through the `LanguageService` class to handle labels
with `LLL:...` values.
The reported issue mentioned columns with type `radio`, but a
similar problem existed for columns of type `select`, regarding
rendering their labels on the records list table. This problem was
addressed in the same manner.
Inside `TcaRadioItems` class it was also required to call the
`LanguageService::sl()` function to translate labels for items
which were added through the `itemsProcFunc`.
This changes have impact on the following areas, where
labels for select and radio fields might be rendered:
- records list
- record create/edit form
- record info window