File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,17 @@ public function process(
5151 if ($ data === []) {
5252 return $ processedData ;
5353 }
54+ if (array_key_exists ('_computed ' , $ data ) === true ) {
55+ // We have a raw-record as input and can get the necessary localization properties
56+ // from the _computed array to fetch the correct translation.
57+ // Basically do the reverse of RecordFactory::extractComputedProperties()
58+ // @see \TYPO3\CMS\Core\Domain\RecordFactory::extractComputedProperties()
59+ // @todo This must be fixed in Core so that Language Overlay API considers computed properties.
60+ $ data ['_ORIG_uid ' ] = $ data ['_computed ' ]['versionedUid ' ] ?? null ;
61+ $ data ['_LOCALIZED_UID ' ] = $ data ['_computed ' ]['localizedUid ' ] ?? null ;
62+ $ data ['_REQUESTED_OVERLAY_LANGUAGE ' ] = $ data ['_computed ' ]['requestedOverlayLanguageId ' ] ?? null ;
63+ $ data ['_TRANSLATION_SOURCE ' ] = $ data ['_computed ' ]['translationSource ' ] ?? null ;
64+ }
5465 $ resolvedRecord = $ this ->recordFactory ->createResolvedRecordFromDatabaseRow ($ table , $ data );
5566 $ processedData ['data ' ] = $ this ->contentBlockDataDecorator ->decorate ($ resolvedRecord );
5667 return $ processedData ;
You can’t perform that action at this time.
0 commit comments