Breaking: #107356 - Use Record API in List Module
See forge#107356
Description
The Content > List backend module has been refactored to use the
\Record and related Record API
internally instead of working with raw database row arrays.
This modernization introduces stricter typing and improves data consistency. As a result, several public method signatures have been updated.
The following public methods in
Database have changed
their signatures:
rendernow expects aList Row () Recordobject instead of an array as the second parameter.Interface makenow expects aControl () Recordobject instead of an array as the second parameter.Interface makenow expects aCheckbox () Recordobject instead of an array as the second parameter.Interface languagenow expects aFlag () Recordobject instead of an array as the second parameter.Interface makenow expects aLocalization Panel () Recordobject instead of an array as the second parameter.Interface linknow expects aWrap Items () Recordobject instead of an array as the fourth parameter.Interface getnow expects aPreview Uri Builder () Recordobject instead of an array as the second parameter.Interface isnow expects aRecord Delete Placeholder () Recordobject instead of an array.Interface ishas dropped the first parameterRow Listing Condition Fulfilled () $tableand now expects aRecordobject instead of an array.Interface
These changes enable the List module to operate on structured Record objects, providing better type safety, consistency, and a foundation for further modernization of the backend record handling.
Impact
Code that calls these methods directly must be updated to pass
\Record objects instead of
database row arrays.
Affected installations
TYPO3 installations with custom extensions that:
- Extend or XCLASS
Databaseand override any of the affected methods.Record List - Call the affected methods directly with array-based record data.
Migration
When calling affected methods, use the Record API to create a Record object from a database row:
Before:
$databaseRecordList->renderListRow($table, $rowArray, $indent, $translations, $enabled);
After:
use TYPO3\CMS\Backend\RecordList\DatabaseRecordList;
use TYPO3\CMS\Backend\Record\RecordFactory;
use TYPO3\CMS\Core\Utility\GeneralUtility;
$recordFactory = GeneralUtility::makeInstance(RecordFactory::class);
$record = $recordFactory->createResolvedRecordFromDatabaseRow($table, $rowArray);
$databaseRecordList->renderListRow($table, $record, $indent, $translations, $enabled);