[FEATURE] Add record-based transformation Data Processor
This patch consists of three aspects: 1. Record Object (internal) A new value object for records, which contains only the fields relevant for this specific Content Type. It decorates another RawRecord which holds the original raw database record. The RecordInterface, which both implement, allows for unified usage. 2. RecordFactory (internal) The factory for the Record object. Takes the table name and a raw record as input and builds the Record object from it. This class contains three more public methods, which relate to TCA schema. These will be moved to an appropriate place as soon as we have TCA schema at home. 3. RecordTransformationDataProcessor (feature) The actual feature of this patch. The new DataProcessor allows to utilize the Record object inside Fluid templates (only). It can be used in various ways. Most prominent use cases are for chaining the DatabaseQueryProcessor or transforming the current {data} variable of FLUIDTEMPLATE views. The PAGEVIEW does have an enhanced PageInformation object already. Example DatabaseQueryProcessor: page.10.dataProcessing.10 = database-query page.10.dataProcessing.10.as = mainContent page.10.dataProcessing.10.table = tt_content page.10.dataProcessing.10.select.where = colPos=0 page.10.dataProcessing.10.dataProcessing.10 = record-transformation Example FLUIDTEMPLATE: tt_content.text { templateName = Text dataProcessing { 10 = record-transformation 10 { as = data } } } Resolves: #103783 Releases: main Change-Id: I41a5ee3e9403ea5695661e197538e0dca2d207e5 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/83747 Tested-by:Andreas Kienast <a.fernandez@scripting-base.de> Reviewed-by:
Andreas Kienast <a.fernandez@scripting-base.de> Tested-by:
Benni Mack <benni@typo3.org> Reviewed-by:
Benni Mack <benni@typo3.org> Reviewed-by:
Nikita Hovratov <nikita.h@live.de> Tested-by:
core-ci <typo3@b13.com> Tested-by:
Nikita Hovratov <nikita.h@live.de>
Showing
- typo3/sysext/core/Classes/Domain/RawRecord.php 98 additions, 0 deletionstypo3/sysext/core/Classes/Domain/RawRecord.php
- typo3/sysext/core/Classes/Domain/Record.php 132 additions, 0 deletionstypo3/sysext/core/Classes/Domain/Record.php
- typo3/sysext/core/Classes/Domain/Record/ComputedProperties.php 55 additions, 0 deletions.../sysext/core/Classes/Domain/Record/ComputedProperties.php
- typo3/sysext/core/Classes/Domain/Record/LanguageInfo.php 47 additions, 0 deletionstypo3/sysext/core/Classes/Domain/Record/LanguageInfo.php
- typo3/sysext/core/Classes/Domain/Record/SystemProperties.php 119 additions, 0 deletionstypo3/sysext/core/Classes/Domain/Record/SystemProperties.php
- typo3/sysext/core/Classes/Domain/Record/VersionInfo.php 55 additions, 0 deletionstypo3/sysext/core/Classes/Domain/Record/VersionInfo.php
- typo3/sysext/core/Classes/Domain/RecordFactory.php 295 additions, 0 deletionstypo3/sysext/core/Classes/Domain/RecordFactory.php
- typo3/sysext/core/Classes/Domain/RecordInterface.php 46 additions, 0 deletionstypo3/sysext/core/Classes/Domain/RecordInterface.php
- typo3/sysext/core/Documentation/Changelog/13.2/Feature-103783-RecordTransformationDataProcessor.rst 169 additions, 0 deletions...13.2/Feature-103783-RecordTransformationDataProcessor.rst
- typo3/sysext/core/Tests/Functional/Domain/RecordFactoryTest.php 114 additions, 0 deletions...sysext/core/Tests/Functional/Domain/RecordFactoryTest.php
- typo3/sysext/core/Tests/Functional/Fixtures/pages.csv 28 additions, 27 deletionstypo3/sysext/core/Tests/Functional/Fixtures/pages.csv
- typo3/sysext/core/Tests/Unit/Domain/RecordFactoryTest.php 387 additions, 0 deletionstypo3/sysext/core/Tests/Unit/Domain/RecordFactoryTest.php
- typo3/sysext/frontend/Classes/DataProcessing/RecordTransformationProcessor.php 84 additions, 0 deletions.../Classes/DataProcessing/RecordTransformationProcessor.php
- typo3/sysext/frontend/Configuration/Services.yaml 4 additions, 0 deletionstypo3/sysext/frontend/Configuration/Services.yaml
- typo3/sysext/frontend/Tests/Functional/DataProcessing/Fixtures/ContentScenario.yaml 70 additions, 0 deletions...s/Functional/DataProcessing/Fixtures/ContentScenario.yaml
- typo3/sysext/frontend/Tests/Functional/DataProcessing/Fixtures/PageLayouts/Default.tsconfig 61 additions, 0 deletions...onal/DataProcessing/Fixtures/PageLayouts/Default.tsconfig
- typo3/sysext/frontend/Tests/Functional/DataProcessing/Fixtures/PageLayouts/Home.tsconfig 41 additions, 0 deletions...ctional/DataProcessing/Fixtures/PageLayouts/Home.tsconfig
- typo3/sysext/frontend/Tests/Functional/DataProcessing/Fixtures/PageLayouts/Productdetail.tsconfig 61 additions, 0 deletions...ataProcessing/Fixtures/PageLayouts/Productdetail.tsconfig
- typo3/sysext/frontend/Tests/Functional/DataProcessing/Fixtures/RecordTransform/Pages/Default.html 8 additions, 0 deletions...ataProcessing/Fixtures/RecordTransform/Pages/Default.html
- typo3/sysext/frontend/Tests/Functional/DataProcessing/Fixtures/RecordTransform/Pages/Home.html 8 additions, 0 deletions...l/DataProcessing/Fixtures/RecordTransform/Pages/Home.html
Please register or sign in to comment