PageContentFetchingProcessor

readonly class \TYPO3\CMS\Frontend\DataProcessing\PageContentFetchingProcessor

Implements
DataProcessorInterface

All-in-one data processor that loads all tt_content records from the current page layout into the template with a given identifier for each colPos, also respecting slideMode or collect options based on the page layouts content columns.

Use "as" for the target variable where the fetched content elements will be provided. If empty, "content" is used.

Example TypoScript configuration:

page = PAGE page { 10 = PAGEVIEW 10 { paths.10 = EXT:my_site_package/Resources/Private/Templates/ dataProcessing { 10 = page-content 10.as = myContent } } }

which fetches all content elements for the current page and provides them as "myContent".

Table of Contents

Interfaces

DataProcessorInterface
Interface for data processor classes processing data from ContentObjectRenderer, used e.g. with the FLUIDTEMPLATE content object

Properties

$eventDispatcher  : EventDispatcherInterface
$recordCollector  : RecordCollector

Methods

__construct()  : mixed
process()  : array
Process content object data

Properties

$eventDispatcher

protected EventDispatcherInterface $eventDispatcher

Methods

__construct()

public __construct(RecordCollector $recordCollector, EventDispatcherInterface $eventDispatcher) : mixed

Parameters

$recordCollector : RecordCollector
$eventDispatcher : EventDispatcherInterface

process()

Process content object data

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