SiteProcessor implements DataProcessorInterface
Fetch the site object containing all information about the current site
Example TypoScript configuration:
10 = TYPO3\CMS\Frontend\DataProcessing\SiteProcessor 10 { as = site }
where "as" names the variable containing the site object
Table of Contents
Interfaces
- DataProcessorInterface
- Interface for data processor classes processing data from ContentObjectRenderer, used e.g. with the FLUIDTEMPLATE content object
Properties
Methods
- __construct() : mixed
- process() : array<string|int, mixed>
- Process content object data
- getCurrentSite() : Site|null
- Returns the currently configured "site" if a site is configured (= resolved) in the current request.
Properties
$tsfe
protected
TypoScriptFrontendController|null
$tsfe
Methods
__construct()
public
__construct([TypoScriptFrontendController|null $tsfe = null ]) : mixed
Parameters
- $tsfe : TypoScriptFrontendController|null = null
process()
Process content object data
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
getCurrentSite()
Returns the currently configured "site" if a site is configured (= resolved) in the current request.
protected
getCurrentSite() : Site|null