‪TYPO3CMS  9.5
TYPO3\CMS\Frontend\DataProcessing\SiteProcessor Class Reference
Inheritance diagram for TYPO3\CMS\Frontend\DataProcessing\SiteProcessor:
TYPO3\CMS\Frontend\ContentObject\DataProcessorInterface

Public Member Functions

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

Protected Member Functions

SiteInterface null getCurrentSite ()
 
SiteMatcher getMatcher ()
 
int getCurrentPageId ()
 

Detailed Description

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

Definition at line 37 of file SiteProcessor.php.

Member Function Documentation

◆ getCurrentPageId()

int TYPO3\CMS\Frontend\DataProcessing\SiteProcessor::getCurrentPageId ( )
protected
Returns
‪int

Definition at line 81 of file SiteProcessor.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Frontend\DataProcessing\SiteProcessor\getCurrentSite().

◆ getCurrentSite()

SiteInterface null TYPO3\CMS\Frontend\DataProcessing\SiteProcessor::getCurrentSite ( )
protected

Returns the currently configured "site" if a site is configured (= resolved) in the current request.

Returns
‪SiteInterface|null

Definition at line 59 of file SiteProcessor.php.

References TYPO3\CMS\Frontend\DataProcessing\SiteProcessor\getCurrentPageId(), TYPO3\CMS\Frontend\DataProcessing\SiteProcessor\getMatcher(), and TYPO3\CMS\Core\Routing\SiteMatcher\matchByPageId().

Referenced by TYPO3\CMS\Frontend\DataProcessing\SiteProcessor\process().

◆ getMatcher()

SiteMatcher TYPO3\CMS\Frontend\DataProcessing\SiteProcessor::getMatcher ( )
protected
Returns
‪SiteMatcher

Definition at line 73 of file SiteProcessor.php.

Referenced by TYPO3\CMS\Frontend\DataProcessing\SiteProcessor\getCurrentSite().

◆ process()

array TYPO3\CMS\Frontend\DataProcessing\SiteProcessor::process ( ContentObjectRenderer  $cObj,
array  $contentObjectConfiguration,
array  $processorConfiguration,
array  $processedData 
)
Parameters
ContentObjectRenderer$cObj‪The data of the content element or page
array$contentObjectConfiguration‪The configuration of Content Object
array$processorConfiguration‪The configuration of this processor
array$processedData‪Key/value store of processed data (e.g. to be passed to a Fluid View)
Returns
‪array the processed data as key/value store

Implements TYPO3\CMS\Frontend\ContentObject\DataProcessorInterface.

Definition at line 47 of file SiteProcessor.php.

References TYPO3\CMS\Frontend\DataProcessing\SiteProcessor\getCurrentSite(), and TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\stdWrapValue().