‪TYPO3CMS  ‪main
TYPO3\CMS\Frontend\ContentObject\PageViewContentObject Class Reference
Inheritance diagram for TYPO3\CMS\Frontend\ContentObject\PageViewContentObject:

Public Member Functions

 __construct (protected readonly ContentDataProcessor $contentDataProcessor, protected readonly StandaloneView $view, protected readonly TypoScriptService $typoScriptService, protected readonly PageLayoutResolver $pageLayoutResolver,)
string render ($conf=[])
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Frontend\ContentObject\AbstractContentObject
 getContentObjectRenderer ()
 setRequest (ServerRequestInterface $request)
 setContentObjectRenderer (ContentObjectRenderer $cObj)

Protected Member Functions

 setTemplate (array $conf)
 setLayoutPaths ()
 setPartialPaths ()
array getContentObjectVariables (array $conf)
 assignSettings ()
- ‪Protected Member Functions inherited from ‪TYPO3\CMS\Frontend\ContentObject\AbstractContentObject
 hasTypoScriptFrontendController ()
 getTypoScriptFrontendController ()
 getPageRepository ()
 getPageRenderer ()

Protected Attributes

array $reservedVariables = ['site', 'language', 'page']
- ‪Protected Attributes inherited from ‪TYPO3\CMS\Frontend\ContentObject\AbstractContentObject
PageRenderer $pageRenderer = null
ServerRequestInterface $request
ContentObjectRenderer $cObj = null

Detailed Description

PAGEVIEW Content Object.

Built to render a full page with Fluid, and does the following

  • ‪uses the template from the given Page Layout / Backend Layout of the current page in a folder "pages/mylayout.html"
  • ‪paths are resolved from "paths." configuration
  • ‪automatically adds templateRootPaths to the layoutRootPaths and partialRootPaths as well with a suffix "layouts/" and "partials/"
  • ‪injects pageInformation, site and siteLanguage (= language) as variables by default
  • ‪adds all page settings (= TypoScript constants) into the settings variable of the View

In contrast to FLUIDTEMPLATE, by design this cObject

  • ‪does not handle custom layoutRootPaths and partialRootPaths
  • ‪does not handle Extbase specialities
  • ‪does not handle HeaderAssets and FooterAssets
  • ‪does not handle "templateName.", "template." and "file." resolving from cObject

this cObject is considered experimental until TYPO3 v13 LTS

Definition at line 44 of file PageViewContentObject.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Frontend\ContentObject\PageViewContentObject::__construct ( protected readonly ContentDataProcessor  $contentDataProcessor,
protected readonly StandaloneView  $view,
protected readonly TypoScriptService  $typoScriptService,
protected readonly PageLayoutResolver  $pageLayoutResolver 

Definition at line 48 of file PageViewContentObject.php.

Member Function Documentation

◆ assignSettings()

TYPO3\CMS\Frontend\ContentObject\PageViewContentObject::assignSettings ( )

Set any TypoScript settings to the view, which take precedence over the page-specific settings.

Definition at line 188 of file PageViewContentObject.php.

Referenced by TYPO3\CMS\Frontend\ContentObject\PageViewContentObject\render().

◆ getContentObjectVariables()

array TYPO3\CMS\Frontend\ContentObject\PageViewContentObject::getContentObjectVariables ( array  $conf)

Compile rendered content objects in variables array ready to assign to the view

array$conf‪Configuration array
‪array the variables to be assigned

Definition at line 159 of file PageViewContentObject.php.

Referenced by TYPO3\CMS\Frontend\ContentObject\PageViewContentObject\render().

◆ render()

string TYPO3\CMS\Frontend\ContentObject\PageViewContentObject::render (   $conf = [])

Rendering the cObject, PAGEVIEW

Configuration properties:

  • ‪paths array to template files
  • ‪variables array of cObjects, the keys are the variable names in fluid
  • ‪dataProcessing array of data processors which are classes to manipulate $data

Example: page.10 = PAGEVIEW page.10.paths.10 = EXT:site_configuration/Resources/Private/Templates/ page.10.variables { mylabel = TEXT mylabel.value = Label from TypoScript }

array$conf‪Array of TypoScript properties
‪string The HTML output

Reimplemented from TYPO3\CMS\Frontend\ContentObject\AbstractContentObject.

Definition at line 74 of file PageViewContentObject.php.

References TYPO3\CMS\Frontend\ContentObject\PageViewContentObject\assignSettings(), TYPO3\CMS\Frontend\ContentObject\PageViewContentObject\getContentObjectVariables(), and TYPO3\CMS\Frontend\ContentObject\PageViewContentObject\setTemplate().

◆ setLayoutPaths()

TYPO3\CMS\Frontend\ContentObject\PageViewContentObject::setLayoutPaths ( )

Set layout root paths from the template paths

Definition at line 125 of file PageViewContentObject.php.

Referenced by TYPO3\CMS\Frontend\ContentObject\PageViewContentObject\setTemplate().

◆ setPartialPaths()

TYPO3\CMS\Frontend\ContentObject\PageViewContentObject::setPartialPaths ( )

Set partial root path from the template root paths

Definition at line 140 of file PageViewContentObject.php.

Referenced by TYPO3\CMS\Frontend\ContentObject\PageViewContentObject\setTemplate().

◆ setTemplate()

TYPO3\CMS\Frontend\ContentObject\PageViewContentObject::setTemplate ( array  $conf)

Member Data Documentation

◆ $reservedVariables

array TYPO3\CMS\Frontend\ContentObject\PageViewContentObject::$reservedVariables = ['site', 'language', 'page']

Definition at line 46 of file PageViewContentObject.php.