FluidViewAdapter

readonly class \TYPO3\CMS\Fluid\View\FluidViewAdapter

Implements
ViewInterface, ViewInterface, TemplateAwareViewInterface

A view adapter that handles a Typo3Fluid view and implements generic ext:core ViewInterface.

Table of Contents

Interfaces

ViewInterface
A generic view interface.
ViewInterface
TemplateAwareViewInterface

Properties

$view  : ViewInterface|TemplateAwareViewInterface

Methods

__construct()  : mixed
assign()  : self
Add a variable to the view data collection.
assignMultiple()  : self
Add multiple variables to the view data collection.
getLayoutRootPaths()  : array
getPartialRootPaths()  : array
getRenderingContext()  : RenderingContextInterface
getTemplatePaths()  : TemplatePaths
getTemplateRootPaths()  : array
getViewHelperResolver()  : ViewHelperResolver
hasTemplate()  : bool
initializeRenderingContext()  : void
render()  : string
Renders the view. Optionally receives a template location.
renderPartial()  : mixed
renderSection()  : mixed
setCache()  : void
setFormat()  : void
setLayoutPathAndFilename()  : void
setLayoutRootPaths()  : void
setPartialRootPaths()  : void
setRenderingContext()  : void
setRequest()  : void
setTemplate()  : void
setTemplatePathAndFilename()  : void
setTemplateRootPaths()  : void
setTemplateSource()  : void

Properties

$view

protected ViewInterface|TemplateAwareViewInterface $view

Methods

__construct()

public __construct(ViewInterface|TemplateAwareViewInterface $view) : mixed

Parameters

$view : ViewInterface|TemplateAwareViewInterface

assign()

Add a variable to the view data collection.

public assign(string $key, mixed $value) : self

Parameters

$key : string
$value : mixed

Return values

self

assignMultiple()

Add multiple variables to the view data collection.

public assignMultiple(array $values) : self

Parameters

$values : array

Array of string keys with mixed-type values.

Return values

self

getLayoutRootPaths()

public getLayoutRootPaths() : array

Deprecated

Will be removed in TYPO3 v14. Use getRenderingContext()->getTemplatePaths()->getLayoutRootPaths() instead.

Return values

array

getPartialRootPaths()

public getPartialRootPaths() : array

Deprecated

Will be removed in TYPO3 v14. Use getRenderingContext()->getTemplatePaths()->getPartialRootPaths() instead.

Return values

array

getRenderingContext()

public getRenderingContext() : RenderingContextInterface

Return values

RenderingContextInterface

getTemplatePaths()

public getTemplatePaths() : TemplatePaths

Deprecated

Will be removed in TYPO3 v14. Use getRenderingContext()->getTemplatePaths() instead.

Return values

TemplatePaths

getTemplateRootPaths()

public getTemplateRootPaths() : array

Deprecated

Will be removed in TYPO3 v14. Use getRenderingContext()->getTemplatePaths()->getTemplateRootPaths() instead.

Return values

array

getViewHelperResolver()

public getViewHelperResolver() : ViewHelperResolver

Deprecated

Will be removed in TYPO3 v14. Use getRenderingContext()->getViewHelperResolver() instead.

Return values

ViewHelperResolver

hasTemplate()

public hasTemplate() : bool

Deprecated

Will be removed in TYPO3 v14. Use getRenderingContext()->getTemplatePaths()->getTemplateSource() instead.

Return values

bool

initializeRenderingContext()

public initializeRenderingContext() : void

Deprecated

Will be removed in TYPO3 v14. Use getRenderingContext()->getViewHelperVariableContainer()->setView($view) instead.

render()

Renders the view. Optionally receives a template location.

public render([string $templateFileName = '' ]) : string

Parameters

$templateFileName : string = ''

Return values

string

renderPartial()

public renderPartial(mixed $partialName, mixed $sectionName, array $variables[, mixed $ignoreUnknown = false ]) : mixed

Parameters

$partialName : mixed
$sectionName : mixed
$variables : array
$ignoreUnknown : mixed = false

renderSection()

public renderSection(mixed $sectionName[, array $variables = [] ][, mixed $ignoreUnknown = false ]) : mixed

Parameters

$sectionName : mixed
$variables : array = []
$ignoreUnknown : mixed = false

setCache()

public setCache(FluidCacheInterface $cache) : void

Deprecated

Will be removed in TYPO3 v14. Use getRenderingContext()->setCache($cache) instead.

Parameters

$cache : FluidCacheInterface

setFormat()

public setFormat(string $format) : void

Deprecated

Will be removed in TYPO3 v14. Use getRenderingContext()->getAttribute(ServerRequestInterface::class)->withFormat() and getRenderingContext()->getTemplatePaths()->setFormat() instead.

Parameters

$format : string

setLayoutPathAndFilename()

public setLayoutPathAndFilename(string $layoutPathAndFilename) : void

Deprecated

Will be removed in TYPO3 v14. Use getRenderingContext()->getTemplatePaths()->setLayoutPathAndFilename() instead.

Parameters

$layoutPathAndFilename : string

setLayoutRootPaths()

public setLayoutRootPaths(array $layoutRootPaths) : void

Deprecated

Will be removed in TYPO3 v14. Use getRenderingContext()->getTemplatePaths()->setLayoutRootPaths() instead.

Parameters

$layoutRootPaths : array

setPartialRootPaths()

public setPartialRootPaths(array $partialRootPaths) : void

Deprecated

Will be removed in TYPO3 v14. Use getRenderingContext()->getTemplatePaths()->setPartialRootPaths() instead.

Parameters

$partialRootPaths : array

setRenderingContext()

public setRenderingContext(RenderingContextInterface $renderingContext) : void

Parameters

$renderingContext : RenderingContextInterface

setRequest()

public setRequest([ServerRequestInterface|null $request = null ]) : void

Deprecated

Will be removed in TYPO3 v14. Use getRenderingContext()->setAttribute(ServerRequestInterface::class) instead.

Parameters

$request : ServerRequestInterface|null = null

setTemplate()

public setTemplate(string $templateName) : void

Deprecated

Will be removed in TYPO3 v14. Use getRenderingContext()->setControllerAction() instead.

Parameters

$templateName : string

setTemplatePathAndFilename()

public setTemplatePathAndFilename(string $templatePathAndFilename) : void

Deprecated

Will be removed in TYPO3 v14. Use getRenderingContext()->getTemplatePaths()->setTemplatePathAndFilename() instead.

Parameters

$templatePathAndFilename : string

setTemplateRootPaths()

public setTemplateRootPaths(array $templateRootPaths) : void

Deprecated

Will be removed in TYPO3 v14. Use getRenderingContext()->getTemplatePaths()->setTemplateRootPaths() instead.

Parameters

$templateRootPaths : array

setTemplateSource()

public setTemplateSource(string $templateSource) : void

Deprecated

Will be removed in TYPO3 v14. Use getRenderingContext()->getTemplatePaths()->setTemplateSource() instead.

Parameters

$templateSource : string
On this page