‪TYPO3CMS  9.5
TYPO3\CMS\Frontend\ContentObject\FluidTemplateContentObject Class Reference
Inheritance diagram for TYPO3\CMS\Frontend\ContentObject\FluidTemplateContentObject:
TYPO3\CMS\Frontend\ContentObject\AbstractContentObject

Public Member Functions

 __construct (ContentObjectRenderer $cObj)
 
 setContentDataProcessor ($contentDataProcessor)
 
string render ($conf=[])
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Frontend\ContentObject\AbstractContentObject
ContentObjectRenderer getContentObjectRenderer ()
 

Protected Member Functions

 renderFluidTemplateAssetsIntoPageRenderer ()
 
 initializeStandaloneViewInstance ()
 
 setTemplate (array $conf)
 
 setLayoutRootPath (array $conf)
 
 setPartialRootPath (array $conf)
 
 setFormat (array $conf)
 
 setExtbaseVariables (array $conf)
 
array getContentObjectVariables (array $conf)
 
 assignSettings (array $conf)
 
string renderFluidView ()
 
string applyStandardWrapToRenderedContent ($content, array $conf)
 
array applyStandardWrapToFluidPaths (array $paths)
 
- ‪Protected Member Functions inherited from ‪TYPO3\CMS\Frontend\ContentObject\AbstractContentObject
PageRenderer getPageRenderer ()
 

Protected Attributes

StandaloneView $view
 
ContentDataProcessor $contentDataProcessor
 
- ‪Protected Attributes inherited from ‪TYPO3\CMS\Frontend\ContentObject\AbstractContentObject
ContentObjectRenderer $cObj
 
PageRenderer $pageRenderer
 

Detailed Description

Contains FLUIDTEMPLATE class object

Definition at line 29 of file FluidTemplateContentObject.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Frontend\ContentObject\FluidTemplateContentObject::__construct ( ContentObjectRenderer  $cObj)

Member Function Documentation

◆ applyStandardWrapToFluidPaths()

array TYPO3\CMS\Frontend\ContentObject\FluidTemplateContentObject::applyStandardWrapToFluidPaths ( array  $paths)
protected

◆ applyStandardWrapToRenderedContent()

string TYPO3\CMS\Frontend\ContentObject\FluidTemplateContentObject::applyStandardWrapToRenderedContent (   $content,
array  $conf 
)
protected

Apply standard wrap to content

Parameters
string$content‪Rendered HTML content
array$confConfiguration array
Returns
‪string Standard wrapped content

Definition at line 366 of file FluidTemplateContentObject.php.

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

◆ assignSettings()

TYPO3\CMS\Frontend\ContentObject\FluidTemplateContentObject::assignSettings ( array  $conf)
protected

Set any TypoScript settings to the view. This is similar to a default MVC action controller in extbase.

Parameters
array$confConfiguration

Definition at line 339 of file FluidTemplateContentObject.php.

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

◆ getContentObjectVariables()

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

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

Parameters
array$confConfiguration array
Returns
‪array the variables to be assigned
Exceptions

Definition at line 309 of file FluidTemplateContentObject.php.

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

◆ initializeStandaloneViewInstance()

TYPO3\CMS\Frontend\ContentObject\FluidTemplateContentObject::initializeStandaloneViewInstance ( )
protected

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.

Definition at line 137 of file FluidTemplateContentObject.php.

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

◆ render()

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

Rendering the cObject, FLUIDTEMPLATE

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/Patials/ 10.layoutRootPaths.10 = EXT:site_configuration/Resources/Private/Layouts/ 10.variables { mylabel = TEXT mylabel.value = Label from TypoScript coming }

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

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

Definition at line 84 of file FluidTemplateContentObject.php.

References TYPO3\CMS\Frontend\ContentObject\FluidTemplateContentObject\$view, TYPO3\CMS\Frontend\ContentObject\FluidTemplateContentObject\applyStandardWrapToRenderedContent(), TYPO3\CMS\Frontend\ContentObject\FluidTemplateContentObject\assignSettings(), TYPO3\CMS\Frontend\ContentObject\FluidTemplateContentObject\getContentObjectVariables(), TYPO3\CMS\Frontend\ContentObject\FluidTemplateContentObject\initializeStandaloneViewInstance(), TYPO3\CMS\Frontend\ContentObject\FluidTemplateContentObject\renderFluidTemplateAssetsIntoPageRenderer(), TYPO3\CMS\Frontend\ContentObject\FluidTemplateContentObject\renderFluidView(), TYPO3\CMS\Frontend\ContentObject\FluidTemplateContentObject\setExtbaseVariables(), TYPO3\CMS\Frontend\ContentObject\FluidTemplateContentObject\setFormat(), TYPO3\CMS\Frontend\ContentObject\FluidTemplateContentObject\setLayoutRootPath(), TYPO3\CMS\Frontend\ContentObject\FluidTemplateContentObject\setPartialRootPath(), and TYPO3\CMS\Frontend\ContentObject\FluidTemplateContentObject\setTemplate().

◆ renderFluidTemplateAssetsIntoPageRenderer()

TYPO3\CMS\Frontend\ContentObject\FluidTemplateContentObject::renderFluidTemplateAssetsIntoPageRenderer ( )
protected

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.

Definition at line 117 of file FluidTemplateContentObject.php.

References TYPO3\CMS\Frontend\ContentObject\AbstractContentObject\$pageRenderer, TYPO3\CMS\Core\Page\PageRenderer\addFooterData(), TYPO3\CMS\Core\Page\PageRenderer\addHeaderData(), and TYPO3\CMS\Frontend\ContentObject\AbstractContentObject\getPageRenderer().

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

◆ renderFluidView()

string TYPO3\CMS\Frontend\ContentObject\FluidTemplateContentObject::renderFluidView ( )
protected

Render fluid standalone view

Returns
‪string

Definition at line 354 of file FluidTemplateContentObject.php.

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

◆ setContentDataProcessor()

TYPO3\CMS\Frontend\ContentObject\FluidTemplateContentObject::setContentDataProcessor (   $contentDataProcessor)

◆ setExtbaseVariables()

TYPO3\CMS\Frontend\ContentObject\FluidTemplateContentObject::setExtbaseVariables ( array  $conf)
protected

Set some extbase variables if given

Parameters
array$confConfiguration array

Definition at line 247 of file FluidTemplateContentObject.php.

References $GLOBALS.

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

◆ setFormat()

TYPO3\CMS\Frontend\ContentObject\FluidTemplateContentObject::setFormat ( array  $conf)
protected

Set different format if given in configuration

Parameters
array$confConfiguration array

Definition at line 232 of file FluidTemplateContentObject.php.

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

◆ setLayoutRootPath()

TYPO3\CMS\Frontend\ContentObject\FluidTemplateContentObject::setLayoutRootPath ( array  $conf)
protected

Set layout root path if given in configuration

Parameters
array$confConfiguration array

Definition at line 187 of file FluidTemplateContentObject.php.

References TYPO3\CMS\Frontend\ContentObject\FluidTemplateContentObject\applyStandardWrapToFluidPaths().

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

◆ setPartialRootPath()

TYPO3\CMS\Frontend\ContentObject\FluidTemplateContentObject::setPartialRootPath ( array  $conf)
protected

Set partial root path if given in configuration

Parameters
array$confConfiguration array

Definition at line 210 of file FluidTemplateContentObject.php.

References TYPO3\CMS\Frontend\ContentObject\FluidTemplateContentObject\applyStandardWrapToFluidPaths().

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

◆ setTemplate()

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

Set template

Parameters
array$conf‪With possibly set file resource
Exceptions

Definition at line 148 of file FluidTemplateContentObject.php.

References TYPO3\CMS\Frontend\ContentObject\FluidTemplateContentObject\applyStandardWrapToFluidPaths().

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

Member Data Documentation

◆ $contentDataProcessor

ContentDataProcessor TYPO3\CMS\Frontend\ContentObject\FluidTemplateContentObject::$contentDataProcessor
protected

◆ $view

StandaloneView TYPO3\CMS\Frontend\ContentObject\FluidTemplateContentObject::$view
protected