TYPO3
7.6
|
Protected Attributes | |
$templateRootPathPattern = '@packageResourcesPath/Private/Templates' | |
$partialRootPathPattern = '@packageResourcesPath/Private/Partials' | |
$layoutRootPathPattern = '@packageResourcesPath/Private/Layouts' | |
$templateRootPaths = null | |
$partialRootPaths = null | |
$layoutRootPaths = null | |
$templatePathAndFilenamePattern = '@templateRoot/@subpackage/@controller/@action.@format' | |
$layoutPathAndFilenamePattern = '@layoutRoot/@layout.@format' | |
$templatePathAndFilename = null | |
$layoutPathAndFilename = null | |
Protected Attributes inherited from AbstractTemplateView | |
$controllerContext | |
$objectManager | |
$templateParser | |
$templateCompiler | |
$baseRenderingContext | |
$renderingStack = array() | |
$partialIdentifierCache = array() | |
Private Attributes | |
$partialPathAndFilenamePattern = '@partialRoot/@subpackage/@partial.@format' | |
Additional Inherited Members | |
Public Attributes inherited from AbstractTemplateView | |
const | RENDERING_TEMPLATE = 1 |
const | RENDERING_PARTIAL = 2 |
const | RENDERING_LAYOUT = 3 |
The main template view. Should be used as view if you want Fluid Templating
Definition at line 27 of file TemplateView.php.
__construct | ( | ) |
Constructor
Definition at line 136 of file TemplateView.php.
References GeneralUtility\makeInstance(), and AbstractTemplateView\setRenderingContext().
|
protected |
Builds a list of possible candidates for a given template name
string | $templateName | |
array | $paths | Paths to search in |
string | $marker | Marker to replace in the $templateName |
Definition at line 489 of file TemplateView.php.
References TemplateView\resolveFileNamePath(), and AbstractTemplateView\ucFileNameInPath().
Referenced by TemplateView\getLayoutPathAndFilename(), and TemplateView\getPartialPathAndFilename().
canRender | ( | ControllerContext | $controllerContext | ) |
Checks whether a template can be resolved for the current request context.
ControllerContext | $controllerContext | Controller context which is available inside the view |
Definition at line 509 of file TemplateView.php.
References TemplateView\getTemplateSource(), and AbstractTemplateView\setControllerContext().
|
protected |
Expands the given $patterns by adding an array element for each $replacement replacing occurrences of $search.
array | $patterns | |
string | $search | |
array | $replacements |
Definition at line 615 of file TemplateView.php.
References GeneralUtility\fixWindowsFilePath().
|
protected |
Returns a unique identifier for the resolved layout file. This identifier is based on the template path and last modification date
string | $layoutName | The name of the layout |
Definition at line 375 of file TemplateView.php.
References TemplateView\$layoutPathAndFilename, and TemplateView\getLayoutPathAndFilename().
|
protected |
Resolve the path and file name of the layout file, based on $this->layoutPathAndFilename and $this->layoutPathAndFilenamePattern.
In case a layout has already been set with setLayoutPathAndFilename(), this method returns that path, otherwise a path and filename will be resolved using the layoutPathAndFilenamePattern.
string | $layoutName | Name of the layout to use. If none given, use "Default" |
Exception\InvalidTemplateResourceException |
Definition at line 416 of file TemplateView.php.
References TemplateView\$layoutPathAndFilename, TemplateView\buildListOfTemplateCandidates(), TemplateView\resolveFileNamePath(), and AbstractTemplateView\testFileExistence().
Referenced by TemplateView\getLayoutIdentifier(), and TemplateView\getLayoutSource().
|
protected |
Resolve the path and file name of the layout file, based on $this->layoutPathAndFilename and $this->layoutPathAndFilenamePattern.
In case a layout has already been set with setLayoutPathAndFilename(), this method returns that path, otherwise a path and filename will be resolved using the layoutPathAndFilenamePattern.
string | $layoutName | Name of the layout to use. If none given, use "Default" |
Exception\InvalidTemplateResourceException |
Definition at line 394 of file TemplateView.php.
References TemplateView\$layoutPathAndFilename, and TemplateView\getLayoutPathAndFilename().
|
protected |
Returns a unique identifier for the resolved partial file. This identifier is based on the template path and last modification date
string | $partialName | The name of the partial |
Definition at line 438 of file TemplateView.php.
References TemplateView\getPartialPathAndFilename().
|
protected |
Resolve the partial path and filename based on $this->partialPathAndFilenamePattern.
string | $partialName | The name of the partial |
Exception\InvalidTemplateResourceException |
Definition at line 469 of file TemplateView.php.
References TemplateView\buildListOfTemplateCandidates(), and AbstractTemplateView\testFileExistence().
Referenced by TemplateView\getPartialIdentifier(), and TemplateView\getPartialSource().
|
protected |
Figures out which partial to use.
string | $partialName | The name of the partial |
Exception\InvalidTemplateResourceException |
Definition at line 452 of file TemplateView.php.
References TemplateView\getPartialPathAndFilename().
|
protected |
Resolve the template path and filename for the given action. If $actionName is NULL, looks into the current request.
string | $actionName | Name of the action. If NULL, will be taken from request. |
Exception\InvalidTemplateResourceException |
Definition at line 329 of file TemplateView.php.
References TemplateView\$templatePathAndFilename.
Referenced by TemplateView\canRender().
initializeView | ( | ) |
|
protected |
Wrapper method to make the static call to GeneralUtility mockable in tests
string | $pathAndFilename |
Definition at line 657 of file TemplateView.php.
References GeneralUtility\fixWindowsFilePath(), and GeneralUtility\getFileAbsFileName().
Referenced by TemplateView\buildListOfTemplateCandidates(), and TemplateView\getLayoutPathAndFilename().
setLayoutPathAndFilename | ( | $layoutPathAndFilename | ) |
Sets the path and name of the layout file. Overrides the dynamic resolving of the layout file.
string | $layoutPathAndFilename | Path and filename of the layout file |
Definition at line 171 of file TemplateView.php.
References TemplateView\$layoutPathAndFilename.
setLayoutRootPath | ( | $layoutRootPath | ) |
Set the root path to the layouts. If set, overrides the one determined from $this->layoutRootPathPattern
string | $layoutRootPath | Root path to the layouts. If set, overrides the one determined from $this->layoutRootPathPattern |
Definition at line 269 of file TemplateView.php.
References TemplateView\setLayoutRootPaths().
setLayoutRootPaths | ( | array | $layoutRootPaths | ) |
Set the root path(s) to the layouts. If set, overrides the one determined from $this->layoutRootPathPattern
array | $layoutRootPaths | Root path to the layouts. If set, overrides the one determined from $this->layoutRootPathPattern |
Definition at line 282 of file TemplateView.php.
References TemplateView\$layoutRootPaths.
Referenced by TemplateView\setLayoutRootPath().
setPartialRootPath | ( | $partialRootPath | ) |
Set the root path to the partials. If set, overrides the one determined from $this->partialRootPathPattern
string | $partialRootPath | Root path to the partials. If set, overrides the one determined from $this->partialRootPathPattern |
Definition at line 227 of file TemplateView.php.
References TemplateView\setPartialRootPaths().
setPartialRootPaths | ( | array | $partialRootPaths | ) |
Set the root path(s) to the partials. If set, overrides the one determined from $this->partialRootPathPattern
array | $partialRootPaths | Root paths to the partials. If set, overrides the one determined from $this->partialRootPathPattern |
Definition at line 240 of file TemplateView.php.
References TemplateView\$partialRootPaths.
Referenced by TemplateView\setPartialRootPath().
setTemplatePathAndFilename | ( | $templatePathAndFilename | ) |
Sets the path and name of of the template file. Effectively overrides the dynamic resolving of a template file.
string | $templatePathAndFilename | Template file path |
Definition at line 159 of file TemplateView.php.
References TemplateView\$templatePathAndFilename.
setTemplateRootPath | ( | $templateRootPath | ) |
Set the root path to the templates. If set, overrides the one determined from $this->templateRootPathPattern
string | $templateRootPath | Root path to the templates. If set, overrides the one determined from $this->templateRootPathPattern |
Definition at line 185 of file TemplateView.php.
References TemplateView\setTemplateRootPaths().
setTemplateRootPaths | ( | array | $templateRootPaths | ) |
Set the root path(s) to the templates. If set, overrides the one determined from $this->templateRootPathPattern
array | $templateRootPaths | Root path(s) to the templates. If set, overrides the one determined from $this->templateRootPathPattern |
Definition at line 213 of file TemplateView.php.
References TemplateView\$templateRootPaths.
Referenced by TemplateView\setTemplateRootPath().
|
protected |
Definition at line 131 of file TemplateView.php.
Referenced by TemplateView\getLayoutIdentifier(), TemplateView\getLayoutPathAndFilename(), TemplateView\getLayoutSource(), and TemplateView\setLayoutPathAndFilename().
|
protected |
Definition at line 117 of file TemplateView.php.
|
protected |
Definition at line 54 of file TemplateView.php.
|
protected |
Definition at line 75 of file TemplateView.php.
Referenced by TemplateView\setLayoutRootPaths().
|
private |
Definition at line 103 of file TemplateView.php.
|
protected |
Definition at line 45 of file TemplateView.php.
|
protected |
Definition at line 68 of file TemplateView.php.
Referenced by TemplateView\setPartialRootPaths().
|
protected |
Definition at line 124 of file TemplateView.php.
Referenced by TemplateView\getTemplateSource(), and TemplateView\setTemplatePathAndFilename().
|
protected |
Definition at line 89 of file TemplateView.php.
|
protected |
Definition at line 36 of file TemplateView.php.
|
protected |
Definition at line 61 of file TemplateView.php.
Referenced by TemplateView\setTemplateRootPaths().