DatabaseQueryProcessor

class \TYPO3\CMS\Frontend\DataProcessing\DatabaseQueryProcessor

Implements
DataProcessorInterface

Fetch records from the database, using the default .select syntax from TypoScript.

This way, e.g. a FLUIDTEMPLATE cObject can iterate over the array of records.

Example TypoScript configuration:

10 = TYPO3\CMS\Frontend\DataProcessing\DatabaseQueryProcessor 10 { table = tt_address pidInList = 123 where = company="Acme" AND first_name="Ralph" orderBy = sorting DESC as = addresses dataProcessing { 10 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor 10 { references.fieldName = image } } }

where "as" means the variable to be containing the result-set from the DB query.

Table of Contents

Interfaces

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

Properties

$contentDataProcessor  : ContentDataProcessor

Methods

__construct()  : mixed
Constructor
process()  : array
Fetches records from the database as an array

Properties

Methods

__construct()

Constructor

public __construct() : mixed

process()

Fetches records from the database as an array

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