FlexFormProcessor

class \TYPO3\CMS\Frontend\DataProcessing\FlexFormProcessor

Implements
DataProcessorInterface

This data processor converts the XML structure of a given FlexForm field into a fluid readable array.

Options: fieldName - The name of the field containing the FlexForm to be converted references - A key / value list for fields with file references to process dataProcessing - Additional sub DataProcessors to process as - The variable, the generated array should be assigned to

Example of a minimal TypoScript configuration, which processes the field pi_flexform and assigns the array to the flexFormData variable:

10 = TYPO3\CMS\Frontend\DataProcessing\FlexFormProcessor

Example of an advanced TypoScript configuration, which processes the field my_flexform_field, resolves its FAL references and assigns the array to the myOutputVariable variable:

10 = TYPO3\CMS\Frontend\DataProcessing\FlexFormProcessor 10 { fieldName = my_flexform_field references { my_flex_form_group.my_flex_form_field = my_field_reference } dataProcessing { 10 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor 10 { references.fieldName = media } } as = myOutputVariable }

Table of Contents

Interfaces

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

Methods

process()  : array
Process content object data
processAdditionalDataProcessors()  : array
Recursively process sub processors of a data processor
processFileReferences()  : void
Recursively process FAL references and replace them by FAL objects.

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

processAdditionalDataProcessors()

Recursively process sub processors of a data processor

protected processAdditionalDataProcessors(array $data, array $processorConfiguration, ServerRequestInterface $request) : array

Parameters

$data : array
$processorConfiguration : array
$request : ServerRequestInterface

Return values

array

processFileReferences()

Recursively process FAL references and replace them by FAL objects.

protected processFileReferences(ContentObjectRenderer $cObj, array &$data, array $fields) : void

Parameters

$cObj : ContentObjectRenderer
$data : array
$fields : array
On this page