TYPO3 CMS  TYPO3_6-2
TYPO3\CMS\Frontend\ContentObject\FluidTemplateContentObject Class Reference
Inheritance diagram for TYPO3\CMS\Frontend\ContentObject\FluidTemplateContentObject:
TYPO3\CMS\Frontend\ContentObject\AbstractContentObject tslib_content_FluidTemplate

Public Member Functions

 render ($conf=array())
 
- Public Member Functions inherited from TYPO3\CMS\Frontend\ContentObject\AbstractContentObject
 __construct (\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer $cObj)
 
 render ($conf=array())
 
 getContentObject ()
 

Protected Member Functions

 initializeStandaloneViewInstance ()
 
 setLayoutRootPath (array $conf)
 
 setPartialRootPath (array $conf)
 
 setFormat (array $conf)
 
 assignContentObjectVariables (array $conf)
 
 assignContentObjectDataAndCurrent (array $conf)
 
 renderFluidView ()
 
 applyStandardWrapToRenderedContent ($content, array $conf)
 
 applyStandardWrapToFluidPaths (array $paths)
 

Protected Attributes

 $view = NULL
 
- Protected Attributes inherited from TYPO3\CMS\Frontend\ContentObject\AbstractContentObject
 $cObj
 
 $fileFactory = NULL
 

Detailed Description

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

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

◆ assignContentObjectDataAndCurrent()

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

Assign content object renderer data and current to view

Parameters
array$confConfiguration
Returns
void

Definition at line 258 of file FluidTemplateContentObject.php.

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

◆ assignContentObjectVariables()

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

Assign rendered content objects in variables array to view

Parameters
array$confConfiguration array
Returns
void
Exceptions

Definition at line 214 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 94 of file FluidTemplateContentObject.php.

References $GLOBALS, and TYPO3\CMS\Core\Utility\GeneralUtility\makeInstance().

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

◆ render()

TYPO3\CMS\Frontend\ContentObject\FluidTemplateContentObject::render (   $conf = array())

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
  • extbase.pluginName
  • extbase.controllerExtensionName
  • extbase.controllerName
  • extbase.controllerActionName

Example: 10 = FLUIDTEMPLATE 10.template = FILE 10.template.file = fileadmin/templates/mytemplate.html 10.partialRootPaths.10 = fileadmin/templates/partial/ 10.variables { mylabel = TEXT mylabel.value = Label from TypoScript coming }

Parameters
array$confArray of TypoScript properties
Returns
string The HTML output

Definition at line 61 of file FluidTemplateContentObject.php.

References TYPO3\CMS\Frontend\ContentObject\FluidTemplateContentObject\$view, TYPO3\CMS\Frontend\ContentObject\FluidTemplateContentObject\applyStandardWrapToRenderedContent(), TYPO3\CMS\Frontend\ContentObject\FluidTemplateContentObject\assignContentObjectDataAndCurrent(), TYPO3\CMS\Frontend\ContentObject\FluidTemplateContentObject\assignContentObjectVariables(), 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 268 of file FluidTemplateContentObject.php.

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
Returns
void

Definition at line 174 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

◆ $view

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