TYPO3 CMS  TYPO3_7-6
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)
 
 render ($conf=[])
 
- Public Member Functions inherited from TYPO3\CMS\Frontend\ContentObject\AbstractContentObject
 __construct (ContentObjectRenderer $cObj)
 
 render ($conf=[])
 
 getContentObject ()
 

Protected Member Functions

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

Protected Attributes

 $view = null
 
 $contentDataProcessor
 
- Protected Attributes inherited from TYPO3\CMS\Frontend\ContentObject\AbstractContentObject
 $cObj
 
 $pageRenderer = null
 

Detailed Description

Contains FLUIDTEMPLATE class object

Definition at line 25 of file FluidTemplateContentObject.php.

Constructor & Destructor Documentation

◆ __construct()

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

Member Function Documentation

◆ applyStandardWrapToFluidPaths()

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

◆ applyStandardWrapToRenderedContent()

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

Apply standard wrap to content

Parameters
string$contentRendered HTML content
array$confConfiguration array
Returns
string Standard wrapped content

Definition at line 310 of file FluidTemplateContentObject.php.

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

◆ getContentObjectVariables()

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 252 of file FluidTemplateContentObject.php.

References TYPO3\CMS\Core\Utility\GeneralUtility\makeInstance().

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.

Returns
void

Definition at line 118 of file FluidTemplateContentObject.php.

References $GLOBALS, TYPO3\CMS\Frontend\ContentObject\FluidTemplateContentObject\applyStandardWrapToFluidPaths(), and TYPO3\CMS\Core\Utility\GeneralUtility\makeInstance().

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

◆ render()

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$confArray of TypoScript properties
Returns
string The HTML output

Definition at line 82 of file FluidTemplateContentObject.php.

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

◆ renderFluidView()

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

Render fluid standalone view

Returns
string

Definition at line 298 of file FluidTemplateContentObject.php.

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

◆ setContentDataProcessor()

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

◆ setFormat()

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

Set different format if given in configuration

Parameters
array$confConfiguration array
Returns
void

Definition at line 210 of file FluidTemplateContentObject.php.

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

◆ setLayoutRootPath()

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

◆ setPartialRootPath()

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

Member Data Documentation

◆ $contentDataProcessor

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

◆ $view

TYPO3\CMS\Frontend\ContentObject\FluidTemplateContentObject::$view = null
protected