FluidTemplateContentObject extends AbstractContentObject
Contains FLUIDTEMPLATE class object
Table of Contents
Properties
- $cObj : ContentObjectRenderer|null
- $contentDataProcessor : ContentDataProcessor
- $pageRenderer : PageRenderer|null
- $request : ServerRequestInterface
- Always set via setRequest() by ContentObjectFactory after instantiation
- $view : StandaloneView
Methods
- __construct() : mixed
- getContentObjectRenderer() : ContentObjectRenderer
- render() : string
- Rendering the cObject, FLUIDTEMPLATE
- setContentObjectRenderer() : void
- setRequest() : void
- applyStandardWrapToFluidPaths() : array<string|int, mixed>
- Applies stdWrap on Fluid path definitions
- applyStandardWrapToRenderedContent() : string
- Apply standard wrap to content
- assignSettings() : mixed
- Set any TypoScript settings to the view. This is similar to a default MVC action controller in extbase.
- 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
- initializeStandaloneViewInstance() : mixed
- Creating standalone view instance must not be done in construct() as it can lead to a nasty cache issue since content object instances are not always re-created by the content object rendered for every usage, but can be re-used. Thus, we need a fresh instance of StandaloneView every time render() is called.
- renderFluidTemplateAssetsIntoPageRenderer() : mixed
- 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.
- renderFluidView() : string
- Render fluid standalone view
- setExtbaseVariables() : mixed
- Set some extbase variables if given
- setFormat() : mixed
- Set different format if given in configuration
- setLayoutRootPath() : mixed
- Set layout root path if given in configuration
- setPartialRootPath() : mixed
- Set partial root path if given in configuration
- setTemplate() : mixed
- Set template
Properties
$cObj
protected
ContentObjectRenderer|null
$cObj
= null
$contentDataProcessor
protected
ContentDataProcessor
$contentDataProcessor
$pageRenderer
protected
PageRenderer|null
$pageRenderer
= null
$request
Always set via setRequest() by ContentObjectFactory after instantiation
protected
ServerRequestInterface
$request
$view
protected
StandaloneView
$view
Methods
__construct()
public
__construct(ContentDataProcessor $contentDataProcessor) : mixed
Parameters
- $contentDataProcessor : ContentDataProcessor
getContentObjectRenderer()
public
getContentObjectRenderer() : ContentObjectRenderer
Return values
ContentObjectRendererrender()
Rendering the cObject, FLUIDTEMPLATE
public
render([array<string|int, mixed> $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<string|int, mixed> = []
-
Array of TypoScript properties
Return values
string —The HTML output
setContentObjectRenderer()
public
setContentObjectRenderer(ContentObjectRenderer $cObj) : void
Parameters
- $cObj : ContentObjectRenderer
setRequest()
public
setRequest(ServerRequestInterface $request) : void
Parameters
- $request : ServerRequestInterface
applyStandardWrapToFluidPaths()
Applies stdWrap on Fluid path definitions
protected
applyStandardWrapToFluidPaths(array<string|int, mixed> $paths) : array<string|int, mixed>
Parameters
- $paths : array<string|int, mixed>
Return values
array<string|int, mixed>applyStandardWrapToRenderedContent()
Apply standard wrap to content
protected
applyStandardWrapToRenderedContent(string $content, array<string|int, mixed> $conf) : string
Parameters
- $content : string
-
Rendered HTML content
- $conf : array<string|int, mixed>
-
Configuration array
Return values
string —Standard wrapped content
assignSettings()
Set any TypoScript settings to the view. This is similar to a default MVC action controller in extbase.
protected
assignSettings(array<string|int, mixed> $conf) : mixed
Parameters
- $conf : array<string|int, mixed>
-
Configuration
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
Return values
array<string|int, mixed> —the variables to be assigned
getPageRenderer()
protected
getPageRenderer() : PageRenderer
Return values
PageRenderergetPageRepository()
protected
getPageRepository() : PageRepository
Return values
PageRepositorygetTypoScriptFrontendController()
protected
getTypoScriptFrontendController() : TypoScriptFrontendController
Tags
Return values
TypoScriptFrontendControllerhasTypoScriptFrontendController()
protected
hasTypoScriptFrontendController() : bool
Return values
boolinitializeStandaloneViewInstance()
Creating standalone view instance must not be done in construct() as it can lead to a nasty cache issue since content object instances are not always re-created by the content object rendered for every usage, but can be re-used. Thus, we need a fresh instance of StandaloneView every time render() is called.
protected
initializeStandaloneViewInstance() : mixed
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(array<string|int, mixed> $variables) : mixed
Parameters
- $variables : array<string|int, mixed>
renderFluidView()
Render fluid standalone view
protected
renderFluidView() : string
Return values
stringsetExtbaseVariables()
Set some extbase variables if given
protected
setExtbaseVariables(array<string|int, mixed> $conf) : mixed
Parameters
- $conf : array<string|int, mixed>
-
Configuration array
setFormat()
Set different format if given in configuration
protected
setFormat(array<string|int, mixed> $conf) : mixed
Parameters
- $conf : array<string|int, mixed>
-
Configuration array
setLayoutRootPath()
Set layout root path if given in configuration
protected
setLayoutRootPath(array<string|int, mixed> $conf) : mixed
Parameters
- $conf : array<string|int, mixed>
-
Configuration array
setPartialRootPath()
Set partial root path if given in configuration
protected
setPartialRootPath(array<string|int, mixed> $conf) : mixed
Parameters
- $conf : array<string|int, mixed>
-
Configuration array
setTemplate()
Set template
protected
setTemplate(array<string|int, mixed> $conf) : mixed
Parameters
- $conf : array<string|int, mixed>
-
With possibly set file resource