StandaloneView extends AbstractTemplateView
A standalone template view.
Should be used as view if you want to use Fluid without Extbase extensions
Table of Contents
Properties
Methods
- __construct() : mixed
- Constructor
- canRender() : bool
- Tells if the view implementation can render the view for the given context.
- getFormat() : string
- Returns the format of the current request (defaults is "html")
- getLayoutRootPaths() : array<string|int, string>
- Resolves the layout root to be used inside other paths.
- getPartialRootPaths() : array<string|int, string>
- Returns the absolute path to the folder that contains Fluid partial files
- getRequest() : Request
- Returns the current request object
- getTemplatePathAndFilename() : string
- Returns the absolute path to a Fluid template file if it was specified with setTemplatePathAndFilename() before.
- getTemplateRootPaths() : array<string|int, string>
- Resolves the template root to be used inside other paths.
- hasTemplate() : bool
- Checks whether a template can be resolved for the current request
- initializeView() : mixed
- Initializes this view.
- setControllerContext() : mixed
- Sets the current controller context
- setFormat() : mixed
- Sets the format of the current request (default format is "html")
- setLayoutRootPaths() : mixed
- Set the root path(s) to the layouts.
- setPartialRootPaths() : mixed
- Set the root path(s) to the partials.
- setTemplate() : mixed
- setTemplatePathAndFilename() : mixed
- Sets the path and name of of the template file. Effectively overrides the dynamic resolving of a template file.
- setTemplateRootPaths() : mixed
- Set the root path(s) to the templates.
- setTemplateSource() : mixed
- Sets the Fluid template source You can use setTemplatePathAndFilename() alternatively if you only want to specify the template path
Properties
$controllerContext
since v11, will be removed with v12.
        protected
            ControllerContext
    $controllerContext
    
    
    
    
    
    
Methods
__construct()
Constructor
    public
                    __construct([ContentObjectRenderer|null $contentObject = null ]) : mixed
    Parameters
- $contentObject : ContentObjectRenderer|null = null
- 
                    @deprecated The current cObject. If NULL a new instance will be created 
Tags
canRender()
Tells if the view implementation can render the view for the given context.
    public
                    canRender(ControllerContext $controllerContext) : bool
    since TYPO3 v11, will be removed in v12. Legacy method, not part of ViewInterface anymore.
By default we assume that the view implementation can handle all kinds of contexts. Override this method if that is not the case.
Parameters
- $controllerContext : ControllerContext
- 
                    Controller context which is available inside the view 
Return values
bool —TRUE if the view has something useful to display, otherwise FALSE
getFormat()
Returns the format of the current request (defaults is "html")
    public
                    getFormat() : string
    Tags
Return values
string —$format
getLayoutRootPaths()
Resolves the layout root to be used inside other paths.
    public
                    getLayoutRootPaths() : array<string|int, string>
    Tags
Return values
array<string|int, string> —Fluid layout root paths
getPartialRootPaths()
Returns the absolute path to the folder that contains Fluid partial files
    public
                    getPartialRootPaths() : array<string|int, string>
    Tags
Return values
array<string|int, string> —Fluid partial root paths
getRequest()
Returns the current request object
    public
                    getRequest() : Request
    Tags
Return values
RequestgetTemplatePathAndFilename()
Returns the absolute path to a Fluid template file if it was specified with setTemplatePathAndFilename() before.
    public
                    getTemplatePathAndFilename() : string
    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.
Return values
string —Fluid template path
getTemplateRootPaths()
Resolves the template root to be used inside other paths.
    public
                    getTemplateRootPaths() : array<string|int, string>
    Return values
array<string|int, string> —Path(s) to template root directory
hasTemplate()
Checks whether a template can be resolved for the current request
    public
                    hasTemplate() : bool
    Return values
boolinitializeView()
Initializes this view.
    public
                    initializeView() : mixed
    since v11, will be removed with v12. Drop together with removal of extbase ViewInterface.
setControllerContext()
Sets the current controller context
    public
                    setControllerContext(ControllerContext $controllerContext) : mixed
    since v11, will be removed with v12.
Parameters
- $controllerContext : ControllerContext
setFormat()
Sets the format of the current request (default format is "html")
    public
                    setFormat(string $format) : mixed
    Parameters
- $format : string
Tags
setLayoutRootPaths()
Set the root path(s) to the layouts.
    public
                    setLayoutRootPaths(array<string|int, string> $layoutRootPaths) : mixed
    If set, overrides the one determined from $this->layoutRootPathPattern
Parameters
- $layoutRootPaths : array<string|int, string>
- 
                    Root path to the layouts. If set, overrides the one determined from $this->layoutRootPathPattern 
setPartialRootPaths()
Set the root path(s) to the partials.
    public
                    setPartialRootPaths(array<string|int, string> $partialRootPaths) : mixed
    If set, overrides the one determined from $this->partialRootPathPattern
Parameters
- $partialRootPaths : array<string|int, string>
- 
                    Root paths to the partials. If set, overrides the one determined from $this->partialRootPathPattern 
setTemplate()
    public
                    setTemplate(string $templateName) : mixed
    Parameters
- $templateName : string
setTemplatePathAndFilename()
Sets the path and name of of the template file. Effectively overrides the dynamic resolving of a template file.
    public
                    setTemplatePathAndFilename(string $templatePathAndFilename) : mixed
    Parameters
- $templatePathAndFilename : string
- 
                    Template file path 
setTemplateRootPaths()
Set the root path(s) to the templates.
    public
                    setTemplateRootPaths(array<string|int, string> $templateRootPaths) : mixed
    If set, overrides the one determined from $this->templateRootPathPattern
Parameters
- $templateRootPaths : array<string|int, string>
- 
                    Root path(s) to the templates. If set, overrides the one determined from $this->templateRootPathPattern 
setTemplateSource()
Sets the Fluid template source You can use setTemplatePathAndFilename() alternatively if you only want to specify the template path
    public
                    setTemplateSource(string $templateSource) : mixed
    Parameters
- $templateSource : string
- 
                    Fluid template source code