‪TYPO3CMS  10.4
TYPO3\CMS\Fluid\View\StandaloneView Class Reference
Inheritance diagram for TYPO3\CMS\Fluid\View\StandaloneView:
TYPO3\CMS\Fluid\View\AbstractTemplateView TYPO3\CMS\Fluid\View\TemplateView 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\Fluid\View\TemplateView
 setLayoutPathAndFilename ($layoutPathAndFilename)
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Extbase\Mvc\View\ViewInterface
TYPO3 CMS Extbase Mvc View ViewInterface assign ($key, $value)
 
TYPO3 CMS Extbase Mvc View ViewInterface assignMultiple (array $values)
 
string render ()
 

Protected Attributes

ObjectManager null $objectManager
 
- ‪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 33 of file StandaloneView.php.

Constructor & Destructor Documentation

◆ __construct()

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

Constructor

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

Definition at line 46 of file StandaloneView.php.

References TYPO3\CMS\Fluid\View\AbstractTemplateView\$controllerContext, TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext\setRequest(), and TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext\setUriBuilder().

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 101 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 133 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 159 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 85 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 149 of file StandaloneView.php.

Member Data Documentation

◆ $objectManager

ObjectManager null TYPO3\CMS\Fluid\View\StandaloneView::$objectManager
protected

Definition at line 37 of file StandaloneView.php.