FluidTemplateContentObject

class \TYPO3\CMS\Frontend\ContentObject\FluidTemplateContentObject

Extends
AbstractContentObject

Contains FLUIDTEMPLATE class object

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, FLUIDTEMPLATE
setContentObjectRenderer()  : void
setRequest()  : void
applyStandardWrapToFluidPaths()  : array
buildExtbaseRequestIfNeeded()  : ServerRequestInterface
getContentObjectVariables()  : array
Compile rendered content objects in variables array ready to assign to the view.
getLayoutRootPaths()  : array|null
getPageRenderer()  : PageRenderer
getPageRepository()  : PageRepository
getPartialRootPaths()  : array|null
getTypoScriptFrontendController()  : TypoScriptFrontendController
hasTypoScriptFrontendController()  : bool
renderFluidTemplateAssetsIntoPageRenderer()  : void
Attempts to render HeaderAssets and FooterAssets sections from the Fluid template, then adds each (if not empty) to either header or footer, as appropriate, using PageRenderer.

Properties

$request

Always set via setRequest() by ContentObjectFactory after instantiation

protected ServerRequestInterface $request

Methods

render()

Rendering the cObject, FLUIDTEMPLATE

public render([array $conf = [] ]) : string

Configuration properties:

  • file string+stdWrap The FLUID template file
  • layoutRootPaths array of filepath+stdWrap Root paths to layouts (fallback)
  • partialRootPaths array of filepath+stdWrap Root paths to partials (fallback)
  • variable array of cObjects, the keys are the variable names in fluid
  • dataProcessing array of data processors which are classes to manipulate $data
  • extbase.pluginName
  • extbase.controllerExtensionName
  • extbase.controllerName
  • extbase.controllerActionName

Example: 10 = FLUIDTEMPLATE 10.templateName = MyTemplate 10.templateRootPaths.10 = EXT:site_configuration/Resources/Private/Templates/ 10.partialRootPaths.10 = EXT:site_configuration/Resources/Private/Partials/ 10.layoutRootPaths.10 = EXT:site_configuration/Resources/Private/Layouts/ 10.variables { mylabel = TEXT mylabel.value = Label from TypoScript coming }

Parameters

$conf : array = []

Array of TypoScript properties

Return values

string

setRequest()

public setRequest(ServerRequestInterface $request) : void

Parameters

$request : ServerRequestInterface

applyStandardWrapToFluidPaths()

protected applyStandardWrapToFluidPaths(array $paths) : array

Parameters

$paths : array

Return values

array

buildExtbaseRequestIfNeeded()

protected buildExtbaseRequestIfNeeded(ServerRequestInterface $request, array $conf) : ServerRequestInterface

Parameters

$request : ServerRequestInterface
$conf : array

Tags

todo:

This magic has to fall one way or the other. It has been introduced for ext:form to mimic extbase, see https://forge.typo3.org/issues/78842. This is actively used when rendering forms using the formvh:render strategy, see the documentation.

Return values

ServerRequestInterface

getContentObjectVariables()

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

protected getContentObjectVariables(array $conf) : array

Parameters

$conf : array

Return values

array

getLayoutRootPaths()

protected getLayoutRootPaths(array $conf) : array|null

Parameters

$conf : array

Return values

array|null

getPartialRootPaths()

protected getPartialRootPaths(array $conf) : array|null

Parameters

$conf : array

Return values

array|null

hasTypoScriptFrontendController()

protected hasTypoScriptFrontendController() : bool

Return values

bool

renderFluidTemplateAssetsIntoPageRenderer()

Attempts to render HeaderAssets and FooterAssets sections from the Fluid template, then adds each (if not empty) to either header or footer, as appropriate, using PageRenderer.

protected renderFluidTemplateAssetsIntoPageRenderer(FluidViewAdapter $view, array $variables) : void

Parameters

$view : FluidViewAdapter
$variables : array
On this page