RecordTransformationProcessor

readonly class \TYPO3\CMS\Frontend\DataProcessing\RecordTransformationProcessor

Implements
DataProcessorInterface

Creates Record objects out of full data sets (= DB entries).

This is typically useful in conjunction with the DatabaseQueryProcessor. Can also be used to transform the current data array of FLUIDTEMPLATE.

The variable that contains the record(s) from a previous data processor, or from a FLUIDTEMPLATE view. Default is data.

variableName = items

The name of the database table of the records. Leave empty to auto-resolve the table from current ContentObjectRenderer.

table = tt_content

The target variable where the resolved record objects are contained. Can be set to data to override the input data array of FLUIDTEMPLATE. If empty, "record" or "records" (if multiple records are given) is used.

as = myRecords

Example TypoScript configuration:

page = PAGE page { 10 = PAGEVIEW 10 { paths.10 = EXT:my_site_package/Resources/Private/Templates/ dataProcessing { 10 = database-query 10 { as = mainContent table = tt_content select.where = colPos=0 dataProcessing { 10 = record-transformation 10 { as = myContent } } } } } }

which transforms all content elements fetched by the DatabaseQueryProcessor an provides them as "myContent".

Table of Contents

Interfaces

DataProcessorInterface
Interface for data processor classes processing data from ContentObjectRenderer, used e.g. with the FLUIDTEMPLATE content object

Properties

$recordFactory  : RecordFactory

Methods

__construct()  : mixed
process()  : array
Process content object data

Properties

Methods

process()

Process content object data

public process(ContentObjectRenderer $cObj, array $contentObjectConfiguration, array $processorConfiguration, array $processedData) : array

Parameters

$cObj : ContentObjectRenderer

The data of the content element or page

$contentObjectConfiguration : array

The configuration of Content Object

$processorConfiguration : array

The configuration of this processor

$processedData : array

Key/value store of processed data (e.g. to be passed to a Fluid View)

Return values

array —

the processed data as key/value store

On this page