TYPO3  7.6
Public Member Functions | List of all members
SplitProcessor Class Reference
Inheritance diagram for SplitProcessor:
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 ( 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 DataProcessorInterface.

Definition at line 55 of file SplitProcessor.php.

References ContentObjectRenderer\checkIf(), GeneralUtility\intExplode(), ContentObjectRenderer\stdWrapValue(), and GeneralUtility\trimExplode().