‪TYPO3CMS  ‪main
TYPO3\CMS\Frontend\DataProcessing\FlexFormProcessor Class Reference
Inheritance diagram for TYPO3\CMS\Frontend\DataProcessing\FlexFormProcessor:
TYPO3\CMS\Frontend\ContentObject\DataProcessorInterface

Public Member Functions

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

Protected Member Functions

 processFileReferences (ContentObjectRenderer $cObj, array &$data, array $fields)
 
 processAdditionalDataProcessors (array $data, array $processorConfiguration, ServerRequestInterface $request)
 

Detailed Description

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 }

Definition at line 62 of file FlexFormProcessor.php.

Member Function Documentation

◆ process()

array TYPO3\CMS\Frontend\DataProcessing\FlexFormProcessor::process ( ContentObjectRenderer  $cObj,
array  $contentObjectConfiguration,
array  $processorConfiguration,
array  $processedData 
)
Parameters
ContentObjectRenderer$cObj‪The data of the content element or page
array$contentObjectConfiguration‪The configuration of Content Object
array$processorConfiguration‪The configuration of this processor
array$processedData‪Key/value store of processed data (e.g. to be passed to a Fluid View)
Returns
‪array the processed data as key/value store

Implements TYPO3\CMS\Frontend\ContentObject\DataProcessorInterface.

Definition at line 71 of file FlexFormProcessor.php.

References TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\getRequest(), TYPO3\CMS\Frontend\DataProcessing\FlexFormProcessor\processAdditionalDataProcessors(), TYPO3\CMS\Frontend\DataProcessing\FlexFormProcessor\processFileReferences(), and TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\stdWrapValue().

◆ processAdditionalDataProcessors()

TYPO3\CMS\Frontend\DataProcessing\FlexFormProcessor::processAdditionalDataProcessors ( array  $data,
array  $processorConfiguration,
ServerRequestInterface  $request 
)
protected

Recursively process sub processors of a data processor

Definition at line 136 of file FlexFormProcessor.php.

Referenced by TYPO3\CMS\Frontend\DataProcessing\FlexFormProcessor\process().

◆ processFileReferences()

TYPO3\CMS\Frontend\DataProcessing\FlexFormProcessor::processFileReferences ( ContentObjectRenderer  $cObj,
array &  $data,
array  $fields 
)
protected

Recursively process FAL references and replace them by FAL objects.

Definition at line 114 of file FlexFormProcessor.php.

References $fields, and TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\getCurrentTable().

Referenced by TYPO3\CMS\Frontend\DataProcessing\FlexFormProcessor\process().