PageViewContentObject extends AbstractContentObject

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
Internal

this cObject is considered experimental until TYPO3 v13 LTS

Table of Contents

Properties

$cObj  : ContentObjectRenderer|null
$contentDataProcessor  : ContentDataProcessor
$pageLayoutResolver  : PageLayoutResolver
$pageRenderer  : PageRenderer|null
$request  : ServerRequestInterface
Always set via setRequest() by ContentObjectFactory after instantiation
$reservedVariables  : array<string|int, mixed>
$typoScriptService  : TypoScriptService
$view  : StandaloneView

Methods

__construct()  : mixed
getContentObjectRenderer()  : ContentObjectRenderer
render()  : string
Rendering the cObject, PAGEVIEW
setContentObjectRenderer()  : void
setRequest()  : void
assignSettings()  : void
Set any TypoScript settings to the view, which take precedence over the page-specific settings.
getContentObjectVariables()  : array<string|int, mixed>
Compile rendered content objects in variables array ready to assign to the view
getPageRenderer()  : PageRenderer
getPageRepository()  : PageRepository
getTypoScriptFrontendController()  : TypoScriptFrontendController
hasTypoScriptFrontendController()  : bool
setLayoutPaths()  : void
Set layout root paths from the template paths
setPartialPaths()  : void
Set partial root path from the template root paths
setTemplate()  : void

Properties

$request

Always set via setRequest() by ContentObjectFactory after instantiation

protected ServerRequestInterface $request

$reservedVariables

protected array<string|int, mixed> $reservedVariables = ['site', 'language', 'page']

Methods

render()

Rendering the cObject, PAGEVIEW

public render([array<string|int, mixed> $conf = [] ]) : string

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 }

Parameters
$conf : array<string|int, mixed> = []

Array of TypoScript properties

Return values
string

The HTML output

setRequest()

public setRequest(ServerRequestInterface $request) : void
Parameters
$request : ServerRequestInterface

assignSettings()

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

protected assignSettings() : void

getContentObjectVariables()

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

protected getContentObjectVariables(array<string|int, mixed> $conf) : array<string|int, mixed>
Parameters
$conf : array<string|int, mixed>

Configuration array

Tags
throws
InvalidArgumentException
Return values
array<string|int, mixed>

the variables to be assigned

hasTypoScriptFrontendController()

protected hasTypoScriptFrontendController() : bool
Return values
bool

setLayoutPaths()

Set layout root paths from the template paths

protected setLayoutPaths() : void

setPartialPaths()

Set partial root path from the template root paths

protected setPartialPaths() : void

setTemplate()

protected setTemplate(array<string|int, mixed> $conf) : void
Parameters
$conf : array<string|int, mixed>

        
On this page

Search results