TYPO3 CMS  TYPO3_6-2
TYPO3\CMS\Fluid\View\StandaloneView Class Reference
Inheritance diagram for TYPO3\CMS\Fluid\View\StandaloneView:
TYPO3\CMS\Fluid\View\AbstractTemplateView TYPO3\CMS\Extbase\Mvc\View\ViewInterface Tx_Fluid_View_StandaloneView TYPO3\CMS\Install\View\StandaloneView

Public Member Functions

 setFormat ($format)
 
 getFormat ()
 
 getRequest ()
 
 setTemplatePathAndFilename ($templatePathAndFilename)
 
 getTemplatePathAndFilename ()
 
 setTemplateSource ($templateSource)
 
 setLayoutRootPath ($layoutRootPath)
 
 setLayoutRootPaths (array $layoutRootPaths)
 
 getLayoutRootPath ()
 
 getLayoutRootPaths ()
 
 setPartialRootPath ($partialRootPath)
 
 getPartialRootPath ()
 
 setPartialRootPaths (array $partialRootPaths)
 
 getPartialRootPaths ()
 
 hasTemplate ()
 
- Public Member Functions inherited from TYPO3\CMS\Fluid\View\AbstractTemplateView
 injectTemplateCompiler (\TYPO3\CMS\Fluid\Core\Compiler\TemplateCompiler $templateCompiler)
 
 setRenderingContext (\TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext)
 
 setControllerContext (\TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext $controllerContext)
 
 initializeView ()
 
 assign ($key, $value)
 
 assignMultiple (array $values)
 
 render ($actionName=NULL)
 
 renderSection ($sectionName, array $variables, $ignoreUnknown=FALSE)
 
 renderPartial ($partialName, $sectionName, array $variables)
 
 canRender (\TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext $controllerContext)
 
- Public Member Functions inherited from TYPO3\CMS\Extbase\Mvc\View\ViewInterface
 setControllerContext (\TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext $controllerContext)
 
 canRender (\TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext $controllerContext)
 
 render ()
 

Protected Member Functions

 getTemplateIdentifier ($actionName=NULL)
 
 getTemplateSource ($actionName=NULL)
 
 getLayoutIdentifier ($layoutName='Default')
 
 getLayoutSource ($layoutName='Default')
 
 getLayoutPathAndFilename ($layoutName='Default')
 
 testFileExistence ($filePath)
 
 getPartialIdentifier ($partialName)
 
 getPartialSource ($partialName)
 
 getPartialPathAndFilename ($partialName)
 
 createIdentifierForFile ($pathAndFilename, $prefix)
 
- Protected Member Functions inherited from TYPO3\CMS\Fluid\View\AbstractTemplateView
 getTemplateIdentifier ($actionName=NULL)
 
 getTemplateSource ($actionName=NULL)
 
 getLayoutIdentifier ($layoutName='Default')
 
 getLayoutSource ($layoutName='Default')
 
 getPartialIdentifier ($partialName)
 
 getPartialSource ($partialName)
 
 buildParserConfiguration ()
 
 startRendering ($type, \TYPO3\CMS\Fluid\Core\Parser\ParsedTemplateInterface $parsedTemplate, \TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext)
 
 stopRendering ()
 
 getCurrentRenderingType ()
 
 getCurrentParsedTemplate ()
 
 getCurrentRenderingContext ()
 

Protected Attributes

 $templateSource = NULL
 
 $templatePathAndFilename = NULL
 
 $layoutRootPath = NULL
 
 $partialRootPath = NULL
 
 $partialRootPaths = NULL
 
 $layoutRootPaths = NULL
 
 $templateCompiler
 
- Protected Attributes inherited from TYPO3\CMS\Fluid\View\AbstractTemplateView
 $controllerContext
 
 $objectManager
 
 $templateParser
 
 $templateCompiler
 
 $baseRenderingContext
 
 $renderingStack = array()
 
 $partialIdentifierCache = array()
 

Additional Inherited Members

- Public Attributes inherited from TYPO3\CMS\Fluid\View\AbstractTemplateView
const RENDERING_TEMPLATE = 1
 
const RENDERING_PARTIAL = 2
 
const RENDERING_LAYOUT = 3
 

Detailed Description

A standalone template view. Should be used as view if you want to use Fluid without Extbase extensions

Definition at line 34 of file StandaloneView.php.

Member Function Documentation

◆ createIdentifierForFile()

TYPO3\CMS\Fluid\View\StandaloneView::createIdentifierForFile (   $pathAndFilename,
  $prefix 
)
protected

Returns a unique identifier for the given file in the format Standalone_<prefix>_<SHA1> The SH1 hash is a checksum that is based on the file path and last modification date

Parameters
string$pathAndFilename
string$prefix
Returns
string

Definition at line 491 of file StandaloneView.php.

Referenced by TYPO3\CMS\Fluid\View\StandaloneView\getLayoutIdentifier(), TYPO3\CMS\Fluid\View\StandaloneView\getPartialIdentifier(), and TYPO3\CMS\Fluid\View\StandaloneView\getTemplateIdentifier().

◆ getFormat()

TYPO3\CMS\Fluid\View\StandaloneView::getFormat ( )

Returns the format of the current request (defaults is "html")

Returns
string $format

Definition at line 136 of file StandaloneView.php.

References TYPO3\CMS\Fluid\View\StandaloneView\getRequest().

Referenced by TYPO3\CMS\Fluid\View\StandaloneView\getLayoutPathAndFilename(), and TYPO3\CMS\Fluid\View\StandaloneView\getPartialPathAndFilename().

◆ getLayoutIdentifier()

TYPO3\CMS\Fluid\View\StandaloneView::getLayoutIdentifier (   $layoutName = 'Default')
protected

Returns a unique identifier for the resolved layout file. This identifier is based on the template path and last modification date

Parameters
string$layoutNameThe name of the layout
Returns
string layout identifier
Exceptions
InvalidTemplateResourceException

Definition at line 356 of file StandaloneView.php.

References TYPO3\CMS\Fluid\View\StandaloneView\createIdentifierForFile(), and TYPO3\CMS\Fluid\View\StandaloneView\getLayoutPathAndFilename().

◆ getLayoutPathAndFilename()

TYPO3\CMS\Fluid\View\StandaloneView::getLayoutPathAndFilename (   $layoutName = 'Default')
protected

Resolve the path and file name of the layout file, based on $this->getLayoutRootPaths() and request format

In case a layout has already been set with setLayoutPathAndFilename(), this method returns that path, otherwise a path and filename will be resolved using the layoutPathAndFilenamePattern.

Parameters
string$layoutNameName of the layout to use. If none given, use "Default"
Returns
string Path and filename of layout files
Exceptions
InvalidTemplateResourceException

Definition at line 391 of file StandaloneView.php.

References TYPO3\CMS\Fluid\View\StandaloneView\$layoutRootPath, TYPO3\CMS\Core\Utility\GeneralUtility\fixWindowsFilePath(), TYPO3\CMS\Fluid\View\StandaloneView\getFormat(), TYPO3\CMS\Fluid\View\StandaloneView\getLayoutRootPaths(), TYPO3\CMS\Fluid\View\StandaloneView\getRequest(), TYPO3\CMS\Extbase\Utility\ArrayUtility\sortArrayWithIntegerKeys(), and TYPO3\CMS\Fluid\View\StandaloneView\testFileExistence().

Referenced by TYPO3\CMS\Fluid\View\StandaloneView\getLayoutIdentifier(), and TYPO3\CMS\Fluid\View\StandaloneView\getLayoutSource().

◆ getLayoutRootPath()

TYPO3\CMS\Fluid\View\StandaloneView::getLayoutRootPath ( )

Returns the first found entry in $this->layoutRootPaths. Don't use, this might not be the desired result.

Exceptions
InvalidTemplateResourceException
Returns
string Path to layout root directory

Definition at line 213 of file StandaloneView.php.

References TYPO3\CMS\Fluid\View\StandaloneView\$layoutRootPaths, and TYPO3\CMS\Fluid\View\StandaloneView\getLayoutRootPaths().

◆ getLayoutRootPaths()

TYPO3\CMS\Fluid\View\StandaloneView::getLayoutRootPaths ( )

Resolves the layout root to be used inside other paths.

Returns
string Fluid layout root path
Exceptions
InvalidTemplateResourceException

Definition at line 225 of file StandaloneView.php.

References TYPO3\CMS\Fluid\View\StandaloneView\$layoutRootPaths.

Referenced by TYPO3\CMS\Fluid\View\StandaloneView\getLayoutPathAndFilename(), and TYPO3\CMS\Fluid\View\StandaloneView\getLayoutRootPath().

◆ getLayoutSource()

TYPO3\CMS\Fluid\View\StandaloneView::getLayoutSource (   $layoutName = 'Default')
protected

Resolves the path and file name of the layout file, based on $this->getLayoutRootPaths() and request format and returns the file contents

Parameters
string$layoutNameName of the layout to use. If none given, use "Default"
Returns
string contents of the layout file if it was found
Exceptions
InvalidTemplateResourceException

Definition at line 370 of file StandaloneView.php.

References TYPO3\CMS\Fluid\View\StandaloneView\getLayoutPathAndFilename().

◆ getPartialIdentifier()

TYPO3\CMS\Fluid\View\StandaloneView::getPartialIdentifier (   $partialName)
protected

Returns a unique identifier for the resolved partial file. This identifier is based on the template path and last modification date

Parameters
string$partialNameThe name of the partial
Returns
string partial identifier
Exceptions
InvalidTemplateResourceException

Definition at line 431 of file StandaloneView.php.

References TYPO3\CMS\Fluid\View\StandaloneView\createIdentifierForFile(), and TYPO3\CMS\Fluid\View\StandaloneView\getPartialPathAndFilename().

◆ getPartialPathAndFilename()

TYPO3\CMS\Fluid\View\StandaloneView::getPartialPathAndFilename (   $partialName)
protected

◆ getPartialRootPath()

TYPO3\CMS\Fluid\View\StandaloneView::getPartialRootPath ( )

Returns the first found entry in $this->partialRootPaths Don't use, this might not be the desired result.

Exceptions
InvalidTemplateResourceException
Returns
string Path to partial root directory

Definition at line 256 of file StandaloneView.php.

References TYPO3\CMS\Fluid\View\StandaloneView\$partialRootPaths, and TYPO3\CMS\Fluid\View\StandaloneView\getPartialRootPaths().

◆ getPartialRootPaths()

TYPO3\CMS\Fluid\View\StandaloneView::getPartialRootPaths ( )

Returns the absolute path to the folder that contains Fluid partial files

Returns
string Fluid partial root path
Exceptions
InvalidTemplateResourceException

Definition at line 280 of file StandaloneView.php.

References TYPO3\CMS\Fluid\View\StandaloneView\$partialRootPaths.

Referenced by TYPO3\CMS\Fluid\View\StandaloneView\getPartialPathAndFilename(), and TYPO3\CMS\Fluid\View\StandaloneView\getPartialRootPath().

◆ getPartialSource()

TYPO3\CMS\Fluid\View\StandaloneView::getPartialSource (   $partialName)
protected

Resolves the path and file name of the partial file, based on $this->getPartialRootPath() and request format and returns the file contents

Parameters
string$partialNameThe name of the partial
Returns
string contents of the layout file if it was found
Exceptions
InvalidTemplateResourceException

Definition at line 445 of file StandaloneView.php.

References TYPO3\CMS\Fluid\View\StandaloneView\getPartialPathAndFilename().

◆ getRequest()

◆ getTemplateIdentifier()

TYPO3\CMS\Fluid\View\StandaloneView::getTemplateIdentifier (   $actionName = NULL)
protected

Returns a unique identifier for the resolved template file This identifier is based on the template path and last modification date

Parameters
string$actionNameName of the action. This argument is not used in this view!
Returns
string template identifier
Exceptions
InvalidTemplateResourceException

Definition at line 313 of file StandaloneView.php.

References TYPO3\CMS\Fluid\View\StandaloneView\$templatePathAndFilename, TYPO3\CMS\Fluid\View\StandaloneView\$templateSource, TYPO3\CMS\Fluid\View\StandaloneView\createIdentifierForFile(), TYPO3\CMS\Fluid\View\StandaloneView\getTemplatePathAndFilename(), and TYPO3\CMS\Fluid\View\StandaloneView\getTemplateSource().

◆ getTemplatePathAndFilename()

TYPO3\CMS\Fluid\View\StandaloneView::getTemplatePathAndFilename ( )

Returns the absolute path to a Fluid template file if it was specified with setTemplatePathAndFilename() before

Returns
string Fluid template path

Definition at line 166 of file StandaloneView.php.

References TYPO3\CMS\Fluid\View\StandaloneView\$templatePathAndFilename.

Referenced by TYPO3\CMS\Fluid\View\StandaloneView\getTemplateIdentifier().

◆ getTemplateSource()

TYPO3\CMS\Fluid\View\StandaloneView::getTemplateSource (   $actionName = NULL)
protected

Returns the Fluid template source code

Parameters
string$actionNameName of the action. This argument is not used in this view!
Returns
string Fluid template source
Exceptions
InvalidTemplateResourceException

Definition at line 335 of file StandaloneView.php.

References TYPO3\CMS\Fluid\View\StandaloneView\$templateSource.

Referenced by TYPO3\CMS\Fluid\View\StandaloneView\getTemplateIdentifier(), and TYPO3\CMS\Fluid\View\StandaloneView\hasTemplate().

◆ hasTemplate()

TYPO3\CMS\Fluid\View\StandaloneView::hasTemplate ( )

Checks whether a template can be resolved for the current request

Returns
boolean

Definition at line 296 of file StandaloneView.php.

References TYPO3\CMS\Fluid\View\StandaloneView\getTemplateSource().

◆ setFormat()

TYPO3\CMS\Fluid\View\StandaloneView::setFormat (   $format)

Sets the format of the current request (default format is "html")

Parameters
string$format
Returns
void

Definition at line 126 of file StandaloneView.php.

References TYPO3\CMS\Fluid\View\StandaloneView\getRequest().

◆ setLayoutRootPath()

TYPO3\CMS\Fluid\View\StandaloneView::setLayoutRootPath (   $layoutRootPath)

Set the root path to the layouts.

Parameters
string$layoutRootPathRoot path to the layouts.
Returns
void
See also
setLayoutRootPaths()

Definition at line 190 of file StandaloneView.php.

References TYPO3\CMS\Fluid\View\StandaloneView\$layoutRootPath, and TYPO3\CMS\Fluid\View\StandaloneView\setLayoutRootPaths().

◆ setLayoutRootPaths()

TYPO3\CMS\Fluid\View\StandaloneView::setLayoutRootPaths ( array  $layoutRootPaths)

Set the root path(s) to the layouts.

Parameters
array$layoutRootPathsRoot path to the layouts
Returns
void

Definition at line 202 of file StandaloneView.php.

References TYPO3\CMS\Fluid\View\StandaloneView\$layoutRootPaths.

Referenced by TYPO3\CMS\Fluid\View\StandaloneView\setLayoutRootPath().

◆ setPartialRootPath()

TYPO3\CMS\Fluid\View\StandaloneView::setPartialRootPath (   $partialRootPath)

Set the root path to the partials. If set, overrides the one determined from $this->partialRootPathPattern

Parameters
string$partialRootPathRoot path to the partials. If set, overrides the one determined from $this->partialRootPathPattern
Returns
void
See also
setPartialRootPaths()

Definition at line 244 of file StandaloneView.php.

References TYPO3\CMS\Fluid\View\StandaloneView\$partialRootPath, and TYPO3\CMS\Fluid\View\StandaloneView\setPartialRootPaths().

◆ setPartialRootPaths()

TYPO3\CMS\Fluid\View\StandaloneView::setPartialRootPaths ( array  $partialRootPaths)

Set the root path(s) to the partials. If set, overrides the one determined from $this->partialRootPathPattern

Parameters
array$partialRootPathsRoot paths to the partials. If set, overrides the one determined from $this->partialRootPathPattern
Returns
void

Definition at line 269 of file StandaloneView.php.

References TYPO3\CMS\Fluid\View\StandaloneView\$partialRootPaths.

Referenced by TYPO3\CMS\Fluid\View\StandaloneView\setPartialRootPath().

◆ setTemplatePathAndFilename()

TYPO3\CMS\Fluid\View\StandaloneView::setTemplatePathAndFilename (   $templatePathAndFilename)

Sets the absolute path to a Fluid template file

Parameters
string$templatePathAndFilenameFluid template path
Returns
void

Definition at line 156 of file StandaloneView.php.

References TYPO3\CMS\Fluid\View\StandaloneView\$templatePathAndFilename.

◆ setTemplateSource()

TYPO3\CMS\Fluid\View\StandaloneView::setTemplateSource (   $templateSource)

Sets the Fluid template source You can use setTemplatePathAndFilename() alternatively if you only want to specify the template path

Parameters
string$templateSourceFluid template source code
Returns
void

Definition at line 178 of file StandaloneView.php.

References TYPO3\CMS\Fluid\View\StandaloneView\$templateSource.

◆ testFileExistence()

TYPO3\CMS\Fluid\View\StandaloneView::testFileExistence (   $filePath)
protected

Wrapper method for is_file function for testing reasons

Parameters
string$filePath
Returns
bool

Definition at line 419 of file StandaloneView.php.

Referenced by TYPO3\CMS\Fluid\View\StandaloneView\getLayoutPathAndFilename(), and TYPO3\CMS\Fluid\View\StandaloneView\getPartialPathAndFilename().

Member Data Documentation

◆ $layoutRootPath

TYPO3\CMS\Fluid\View\StandaloneView::$layoutRootPath = NULL
protected

◆ $layoutRootPaths

TYPO3\CMS\Fluid\View\StandaloneView::$layoutRootPaths = NULL
protected

◆ $partialRootPath

TYPO3\CMS\Fluid\View\StandaloneView::$partialRootPath = NULL
protected

◆ $partialRootPaths

TYPO3\CMS\Fluid\View\StandaloneView::$partialRootPaths = NULL
protected

◆ $templateCompiler

TYPO3\CMS\Fluid\View\StandaloneView::$templateCompiler
protected

Definition at line 82 of file StandaloneView.php.

◆ $templatePathAndFilename

◆ $templateSource