Skip to content
Snippets Groups Projects
Commit d12ed380 authored by Benni Mack's avatar Benni Mack
Browse files

[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: default avatarAndreas Kienast <a.fernandez@scripting-base.de>
Reviewed-by: default avatarAndreas Kienast <a.fernandez@scripting-base.de>
Tested-by: default avatarBenni Mack <benni@typo3.org>
Reviewed-by: default avatarBenni Mack <benni@typo3.org>
Reviewed-by: default avatarNikita Hovratov <nikita.h@live.de>
Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarNikita Hovratov <nikita.h@live.de>
parent d818bb53
Showing
with 1882 additions and 27 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