BackendTemplateView implements ViewInterface
Decorates the main template view. Should be used as view if you want to use Fluid templates in a backend module in order to have a consistent backend.
since v11, will be removed with v12.
Table of Contents
Interfaces
- ViewInterface
- Interface of a view
Properties
Methods
- assign() : AbstractTemplateView
- Assign a value to the variable container.
- assignMultiple() : AbstractTemplateView
- Assigns multiple values to the JSON output.
- canRender() : bool
- Checks whether a template can be resolved for the current request context.
- getModuleTemplate() : ModuleTemplate
- initializeView() : mixed
- Init view
- injectModuleTemplate() : mixed
- injectTemplateView() : mixed
- render() : string
- Loads the template source and render the template.
- setControllerContext() : mixed
- Sets the current controller context
- setLayoutRootPaths() : mixed
- Set the root path(s) to the layouts.
- setPartialRootPaths() : mixed
- Set the root path(s) to the partials.
- setTemplateRootPaths() : mixed
- Set the root path(s) to the templates.
Properties
$moduleTemplate
protected
ModuleTemplate
$moduleTemplate
$templateView
protected
TemplateView
$templateView
Methods
assign()
Assign a value to the variable container.
public
assign(string $key, mixed $value) : AbstractTemplateView
Parameters
- $key : string
-
The key of a view variable to set
- $value : mixed
-
The value of the view variable
Return values
AbstractTemplateView —the instance of this view to allow chaining
assignMultiple()
Assigns multiple values to the JSON output.
public
assignMultiple(array<string|int, mixed> $values) : AbstractTemplateView
However, only the key "value" is accepted.
Parameters
- $values : array<string|int, mixed>
-
Keys and values - only a value with key "value" is considered
Return values
AbstractTemplateView —the instance of this view to allow chaining
canRender()
Checks whether a template can be resolved for the current request context.
public
canRender() : bool
since TYPO3 v11, will be removed in v12. Legacy method, not part of ViewInterface anymore.
Return values
boolgetModuleTemplate()
public
getModuleTemplate() : ModuleTemplate
Return values
ModuleTemplateinitializeView()
Init view
public
initializeView() : mixed
injectModuleTemplate()
public
injectModuleTemplate(ModuleTemplate $moduleTemplate) : mixed
Parameters
- $moduleTemplate : ModuleTemplate
injectTemplateView()
public
injectTemplateView(TemplateView $templateView) : mixed
Parameters
- $templateView : TemplateView
render()
Loads the template source and render the template.
public
render([string $actionName = null ]) : string
If "layoutName" is set in a PostParseFacet callback, it will render the file with the given layout.
Additionally amends the rendered template with a module template "frame"
Parameters
- $actionName : string = null
-
If set, the view of the specified action will be rendered instead. Default is the action specified in the Request object
Return values
string —Rendered Template
setControllerContext()
Sets the current controller context
public
setControllerContext(ControllerContext $controllerContext) : mixed
since v11, will be removed with v12.
Parameters
- $controllerContext : ControllerContext
-
Controller context which is available inside the view
setLayoutRootPaths()
Set the root path(s) to the layouts.
public
setLayoutRootPaths(array<string|int, mixed> $layoutRootPaths) : mixed
Parameters
- $layoutRootPaths : array<string|int, mixed>
-
Root path to the layouts.
setPartialRootPaths()
Set the root path(s) to the partials.
public
setPartialRootPaths(array<string|int, mixed> $partialRootPaths) : mixed
Parameters
- $partialRootPaths : array<string|int, mixed>
-
Root paths to the partials.
setTemplateRootPaths()
Set the root path(s) to the templates.
public
setTemplateRootPaths(array<string|int, mixed> $templateRootPaths) : mixed
Parameters
- $templateRootPaths : array<string|int, mixed>
-
Root path(s) to the templates.