TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\Frontend\DataProcessing\SplitProcessor Class Reference
Inheritance diagram for TYPO3\CMS\Frontend\DataProcessing\SplitProcessor:
TYPO3\CMS\Frontend\ContentObject\DataProcessorInterface

Public Member Functions

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

Detailed Description

This data processor can be used for processing data for the content elements which have split contents in one field like e.g. "bullets". It will split the field data in an array ready to be iterated over in Fluid.

Example field data:

This is bullet 1, This is bullet 2, This is bullet 3

Example TypoScript configuration:

10 = TYPO3 10 { if.isTrue.field = bodytext delimiter = , fieldName = bodytext removeEmptyEntries = 1 filterIntegers = 1 filterUnique = 1 as = bullets }

whereas "bullets" can be used as a variable {bullets} inside Fluid for iteration.

Definition at line 44 of file SplitProcessor.php.

Member Function Documentation

◆ process()

TYPO3\CMS\Frontend\DataProcessing\SplitProcessor::process ( ContentObjectRenderer  $cObj,
array  $contentObjectConfiguration,
array  $processorConfiguration,
array  $processedData 
)

Process field data to split in an array

Parameters
ContentObjectRenderer$cObjThe data of the content element or page
array$contentObjectConfigurationThe configuration of Content Object
array$processorConfigurationThe configuration of this processor
array$processedDataKey/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 55 of file SplitProcessor.php.

References TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\checkIf(), TYPO3\CMS\Core\Utility\GeneralUtility\intExplode(), TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\stdWrapValue(), and TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode().