SplitProcessor implements DataProcessorInterface
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\CMS\Frontend\DataProcessing\SplitProcessor 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.
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 field data to split in an array
Methods
process()
Process field data to split in an array
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