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
Methods
- __construct() : mixed
- Constructor
- process() : array<string|int, mixed>
- Fetches records from the database as an array
Properties
$contentDataProcessor
protected
ContentDataProcessor
$contentDataProcessor
Methods
__construct()
Constructor
public
__construct() : mixed
process()
Fetches records from the database as an array
public
process(ContentObjectRenderer $cObj, array<string|int, mixed> $contentObjectConfiguration, array<string|int, mixed> $processorConfiguration, array<string|int, mixed> $processedData) : array<string|int, mixed>
Parameters
- $cObj : ContentObjectRenderer
-
The data of the content element or page
- $contentObjectConfiguration : array<string|int, mixed>
-
The configuration of Content Object
- $processorConfiguration : array<string|int, mixed>
-
The configuration of this processor
- $processedData : array<string|int, mixed>
-
Key/value store of processed data (e.g. to be passed to a Fluid View)
Return values
array<string|int, mixed> —the processed data as key/value store