PageViewContentObject extends AbstractContentObject
FinalYes
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
- 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
Table of Contents
Properties
- $cObj : ContentObjectRenderer|null
- $pageRenderer : PageRenderer|null
- $request : ServerRequestInterface
- Always set via setRequest() by ContentObjectFactory after instantiation
Methods
- __construct() : mixed
- getContentObjectRenderer() : ContentObjectRenderer
- render() : string
- Rendering the cObject, PAGEVIEW
- setContentObjectRenderer() : void
- setRequest() : void
- getPageRenderer() : PageRenderer
- getPageRepository() : PageRepository
- getTypoScriptFrontendController() : TypoScriptFrontendController
- hasTypoScriptFrontendController() : bool
Properties
$cObj
protected
ContentObjectRenderer|null
$cObj
= null
$pageRenderer
protected
PageRenderer|null
$pageRenderer
= null
$request
Always set via setRequest() by ContentObjectFactory after instantiation
protected
ServerRequestInterface
$request
Methods
__construct()
public
__construct(ContentDataProcessor $contentDataProcessor, TypoScriptService $typoScriptService, PageLayoutResolver $pageLayoutResolver, ViewFactoryInterface $viewFactory) : mixed
Parameters
- $contentDataProcessor : ContentDataProcessor
- $typoScriptService : TypoScriptService
- $pageLayoutResolver : PageLayoutResolver
- $viewFactory : ViewFactoryInterface
getContentObjectRenderer()
public
getContentObjectRenderer() : ContentObjectRenderer
Return values
ContentObjectRendererrender()
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
Tags
Return values
string —The HTML output
setContentObjectRenderer()
public
setContentObjectRenderer(ContentObjectRenderer $cObj) : void
Parameters
- $cObj : ContentObjectRenderer
setRequest()
public
setRequest(ServerRequestInterface $request) : void
Parameters
- $request : ServerRequestInterface
getPageRenderer()
protected
getPageRenderer() : PageRenderer
Return values
PageRenderergetPageRepository()
protected
getPageRepository() : PageRepository
Return values
PageRepositorygetTypoScriptFrontendController()
protected
getTypoScriptFrontendController() : TypoScriptFrontendController
Tags
Return values
TypoScriptFrontendControllerhasTypoScriptFrontendController()
protected
hasTypoScriptFrontendController() : bool