‪TYPO3CMS  11.5
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

Public Member Functions

 __construct (?ContentObjectRenderer $contentObject=null)
 
 setFormat ($format)
 
string getFormat ()
 
TYPO3 CMS Extbase Mvc Request getRequest ()
 
string getTemplatePathAndFilename ()
 
 setTemplateSource ($templateSource)
 
bool hasTemplate ()
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Fluid\View\AbstractTemplateView
 initializeView ()
 
 __construct (?RenderingContextInterface $context=null)
 
bool canRender (ControllerContext $controllerContext)
 
 setControllerContext (ControllerContext $controllerContext)
 
 setTemplate ($templateName)
 
 setTemplatePathAndFilename ($templatePathAndFilename)
 
 setTemplateRootPaths (array $templateRootPaths)
 
string[] getTemplateRootPaths ()
 
 setPartialRootPaths (array $partialRootPaths)
 
string[] getPartialRootPaths ()
 
string[] getLayoutRootPaths ()
 
 setLayoutRootPaths (array $layoutRootPaths)
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Extbase\Mvc\View\ViewInterface
self assign ($key, $value)
 
self assignMultiple (array $values)
 
string render ()
 

Additional Inherited Members

- ‪Protected Attributes inherited from ‪TYPO3\CMS\Fluid\View\AbstractTemplateView
TYPO3 CMS Extbase Mvc Controller ControllerContext $controllerContext
 

Detailed Description

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

Definition at line 30 of file StandaloneView.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Fluid\View\StandaloneView::__construct ( ?ContentObjectRenderer  $contentObject = null)

Constructor

Parameters
ContentObjectRenderer | null$contentObject
Deprecated:
‪The current cObject. If NULL a new instance will be created
Exceptions

Definition at line 39 of file StandaloneView.php.

Member Function Documentation

◆ getFormat()

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

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

Returns
‪string $format
Exceptions

Definition at line 78 of file StandaloneView.php.

◆ getRequest()

◆ getTemplatePathAndFilename()

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

Returns the absolute path to a Fluid template file if it was specified with setTemplatePathAndFilename() before. If the template filename was never specified, Fluid attempts to resolve the file based on controller and action.

NB: If TemplatePaths was previously told to use the specific template path and filename it will short-circuit and return that template path and filename directly, instead of attempting to resolve it.

Returns
‪string Fluid template path

Definition at line 110 of file StandaloneView.php.

◆ hasTemplate()

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

Checks whether a template can be resolved for the current request

Returns
‪bool

Definition at line 136 of file StandaloneView.php.

◆ setFormat()

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

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

Parameters
string$format
Exceptions

Definition at line 62 of file StandaloneView.php.

Referenced by TYPO3\CMS\Seo\XmlSitemap\XmlSitemapRenderer\getStandaloneView().

◆ 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

Definition at line 126 of file StandaloneView.php.