‪TYPO3CMS  11.5
TYPO3\CMS\Fluid\View\AbstractTemplateView Class Reference
Inheritance diagram for TYPO3\CMS\Fluid\View\AbstractTemplateView:
TYPO3\CMS\Extbase\Mvc\View\ViewInterface TYPO3\CMS\Fluid\View\StandaloneView TYPO3\CMS\Fluid\View\TemplateView

Public Member Functions

 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 ()
 

Protected Attributes

TYPO3 CMS Extbase Mvc Controller ControllerContext $controllerContext
 

Detailed Description

Abstract Fluid Template View.

Contains the fundamental methods which any Fluid based template view needs.

Todo:
‪v12: Drop 'implements ViewInterface' together with removal of extbase ViewInterface

Definition at line 34 of file AbstractTemplateView.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Fluid\View\AbstractTemplateView::__construct ( ?RenderingContextInterface  $context = null)

Definition at line 51 of file AbstractTemplateView.php.

Member Function Documentation

◆ canRender()

bool TYPO3\CMS\Fluid\View\AbstractTemplateView::canRender ( ControllerContext  $controllerContext)

Tells if the view implementation can render the view for the given context.

By default we assume that the view implementation can handle all kinds of contexts. Override this method if that is not the case.

Parameters
\TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext$controllerContext‪Controller context which is available inside the view
Returns
‪bool TRUE if the view has something useful to display, otherwise FALSE
Deprecated:
‪since TYPO3 v11, will be removed in v12. Legacy method, not part of ViewInterface anymore.

Definition at line 69 of file AbstractTemplateView.php.

◆ getLayoutRootPaths()

string [] TYPO3\CMS\Fluid\View\AbstractTemplateView::getLayoutRootPaths ( )

Resolves the layout root to be used inside other paths.

Returns
‪string[] Fluid layout root paths
Exceptions
InvalidTemplateResourceException

Definition at line 165 of file AbstractTemplateView.php.

◆ getPartialRootPaths()

string [] TYPO3\CMS\Fluid\View\AbstractTemplateView::getPartialRootPaths ( )

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

Returns
‪string[] Fluid partial root paths
Exceptions
InvalidTemplateResourceException

Definition at line 154 of file AbstractTemplateView.php.

◆ getTemplateRootPaths()

string [] TYPO3\CMS\Fluid\View\AbstractTemplateView::getTemplateRootPaths ( )

Resolves the template root to be used inside other paths.

Returns
‪string[] Path(s) to template root directory

Definition at line 133 of file AbstractTemplateView.php.

◆ initializeView()

TYPO3\CMS\Fluid\View\AbstractTemplateView::initializeView ( )

Initializes this view.

Deprecated:
‪since v11, will be removed with v12. Drop together with removal of extbase ViewInterface.

Implements TYPO3\CMS\Extbase\Mvc\View\ViewInterface.

Definition at line 46 of file AbstractTemplateView.php.

◆ setControllerContext()

TYPO3\CMS\Fluid\View\AbstractTemplateView::setControllerContext ( ControllerContext  $controllerContext)

Sets the current controller context

Parameters
\TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext$controllerContext
Deprecated:
‪since v11, will be removed with v12.

Implements TYPO3\CMS\Extbase\Mvc\View\ViewInterface.

Definition at line 82 of file AbstractTemplateView.php.

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

◆ setLayoutRootPaths()

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

◆ setPartialRootPaths()

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

◆ setTemplate()

◆ setTemplatePathAndFilename()

◆ setTemplateRootPaths()

TYPO3\CMS\Fluid\View\AbstractTemplateView::setTemplateRootPaths ( array  $templateRootPaths)

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

Parameters
string[]$templateRootPaths‪Root path(s) to the templates. If set, overrides the one determined from $this->templateRootPathPattern

Definition at line 123 of file AbstractTemplateView.php.

Referenced by TYPO3\CMS\Linkvalidator\Report\LinkValidatorReport\createView(), TYPO3\CMS\Info\Controller\InfoModuleController\getFluidTemplateObject(), TYPO3\CMS\Info\Controller\InfoPageTyposcriptConfigController\getFluidTemplateObject(), TYPO3\CMS\Seo\XmlSitemap\XmlSitemapRenderer\getStandaloneView(), TYPO3\CMS\Backend\Controller\MfaSetupController\initializeView(), and TYPO3\CMS\Backend\Controller\ContentElement\ElementHistoryController\initializeView().

Member Data Documentation

◆ $controllerContext

TYPO3 CMS Extbase Mvc Controller ControllerContext TYPO3\CMS\Fluid\View\AbstractTemplateView::$controllerContext
protected
Deprecated:
‪since v11, will be removed with v12.

Definition at line 39 of file AbstractTemplateView.php.

Referenced by TYPO3\CMS\Fluid\View\AbstractTemplateView\setControllerContext().