SplitProcessor

class \TYPO3\CMS\Frontend\DataProcessing\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
Process field data to split in an array

Methods

process()

Process field data to split in an array

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

Parameters

$cObj : ContentObjectRenderer

The data of the content element or page

$contentObjectConfiguration : array

The configuration of Content Object

$processorConfiguration : array

The configuration of this processor

$processedData : array

Key/value store of processed data (e.g. to be passed to a Fluid View)

Return values

array —

the processed data as key/value store

On this page