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 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
and assigns the array to the myOutputVariable
variable:
10 = TYPO3\CMS\Frontend\DataProcessing\FlexFormProcessor 10 { fieldName = my_flexform_field 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<string|int, mixed>
- Process content object data
- processAdditionalDataProcessors() : array<string|int, mixed>
- Recursively process sub processors of a data processor
Methods
process()
Process content object data
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
processAdditionalDataProcessors()
Recursively process sub processors of a data processor
public
processAdditionalDataProcessors(array<string|int, mixed> $data, array<string|int, mixed> $processorConfiguration) : array<string|int, mixed>
Parameters
- $data : array<string|int, mixed>
- $processorConfiguration : array<string|int, mixed>