![]() |
TYPO3
7.6
|
Public Member Functions | |
injectTemplateCompiler (\TYPO3\CMS\Fluid\Core\Compiler\TemplateCompiler $templateCompiler) | |
setRenderingContext (\TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext) | |
setControllerContext (\TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext $controllerContext) | |
initializeView () | |
assign ($key, $value) | |
assignMultiple (array $values) | |
render ($actionName=null) | |
renderSection ($sectionName, array $variables, $ignoreUnknown=false) | |
renderPartial ($partialName, $sectionName, array $variables) | |
canRender (\TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext $controllerContext) | |
![]() | |
setControllerContext (\TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext $controllerContext) | |
canRender (\TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext $controllerContext) | |
render () | |
Public Attributes | |
const | RENDERING_TEMPLATE = 1 |
const | RENDERING_PARTIAL = 2 |
const | RENDERING_LAYOUT = 3 |
Protected Member Functions | |
ucFileNameInPath ($templatePath) | |
testFileExistence ($filePath) | |
getTemplateIdentifier ($actionName=null) | |
getTemplateSource ($actionName=null) | |
getLayoutIdentifier ($layoutName= 'Default') | |
getLayoutSource ($layoutName= 'Default') | |
getPartialIdentifier ($partialName) | |
getPartialSource ($partialName) | |
buildParserConfiguration () | |
startRendering ($type,\TYPO3\CMS\Fluid\Core\Parser\ParsedTemplateInterface $parsedTemplate,\TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext) | |
stopRendering () | |
getCurrentRenderingType () | |
getCurrentParsedTemplate () | |
getCurrentRenderingContext () | |
Protected Attributes | |
$controllerContext | |
$objectManager | |
$templateParser | |
$templateCompiler | |
$baseRenderingContext | |
$renderingStack = array() | |
$partialIdentifierCache = array() | |
Contains the fundamental methods which any Fluid based template view needs.
Definition at line 19 of file AbstractTemplateView.php.
assign | ( | $key, | |
$value | |||
) |
Assign a value to the variable container.
string | $key | The key of a view variable to set |
mixed | $value | The value of the view variable |
Implements ViewInterface.
Definition at line 124 of file AbstractTemplateView.php.
Referenced by UsernamePasswordLoginProvider\render().
assignMultiple | ( | array | $values | ) |
Assigns multiple values to the JSON output. However, only the key "value" is accepted.
array | $values | Keys and values - only a value with key "value" is considered |
Implements ViewInterface.
Definition at line 142 of file AbstractTemplateView.php.
|
protected |
Build parser configuration
Definition at line 391 of file AbstractTemplateView.php.
Referenced by AbstractTemplateView\render().
canRender | ( | \TYPO3\CMS\Extbase\Mvc\Controller\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.
\TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext | $controllerContext | Controller context which is available inside the view |
Definition at line 467 of file AbstractTemplateView.php.
|
protected |
Get the parsed template which is currently being rendered.
Definition at line 440 of file AbstractTemplateView.php.
Referenced by AbstractTemplateView\renderSection().
|
protected |
Get the rendering context which is currently used.
Definition at line 451 of file AbstractTemplateView.php.
Referenced by AbstractTemplateView\renderSection().
|
protected |
Get the current rendering type.
Definition at line 429 of file AbstractTemplateView.php.
Referenced by AbstractTemplateView\renderSection().
|
abstractprotected |
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 |
Referenced by AbstractTemplateView\render().
|
abstractprotected |
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" |
\TYPO3\CMS\Fluid\View\Exception\InvalidTemplateResourceException |
Referenced by AbstractTemplateView\render().
|
abstractprotected |
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 |
|
abstractprotected |
Figures out which partial to use.
string | $partialName | The name of the partial |
\TYPO3\CMS\Fluid\View\Exception\InvalidTemplateResourceException |
|
abstractprotected |
Returns a unique identifier for the resolved template file. This identifier is based on the template path and last modification date
string | $actionName | Name of the action. If NULL, will be taken from request. |
Referenced by AbstractTemplateView\render().
|
abstractprotected |
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. |
\TYPO3\CMS\Fluid\View\Exception\InvalidTemplateResourceException | in case the template was not found |
Referenced by AbstractTemplateView\render().
initializeView | ( | ) |
Initializes this view.
Implements ViewInterface.
Definition at line 111 of file AbstractTemplateView.php.
injectTemplateCompiler | ( | \TYPO3\CMS\Fluid\Core\Compiler\TemplateCompiler | $templateCompiler | ) |
\TYPO3\CMS\Fluid\Core\Compiler\TemplateCompiler | $templateCompiler |
Definition at line 80 of file AbstractTemplateView.php.
References AbstractTemplateView\$templateCompiler, and GeneralUtility\makeInstance().
render | ( | $actionName = null | ) |
Loads the template source and render the template. If "layoutName" is set in a PostParseFacet callback, it will render the file with the given layout.
string | $actionName | If set, the view of the specified action will be rendered instead. Default is the action specified in the Request object |
Definition at line 162 of file AbstractTemplateView.php.
References AbstractTemplateView\buildParserConfiguration(), AbstractTemplateView\getLayoutIdentifier(), AbstractTemplateView\getLayoutSource(), AbstractTemplateView\getTemplateIdentifier(), AbstractTemplateView\getTemplateSource(), AbstractTemplateView\startRendering(), and AbstractTemplateView\stopRendering().
renderPartial | ( | $partialName, | |
$sectionName, | |||
array | $variables | ||
) |
Renders a partial.
string | $partialName | |
string | $sectionName | |
array | $variables | |
\TYPO3\CMS\Fluid\Core\ViewHelper\ViewHelperVariableContainer | $viewHelperVariableContainer | the View Helper Variable container to use. |
Definition at line 263 of file AbstractTemplateView.php.
renderSection | ( | $sectionName, | |
array | $variables, | ||
$ignoreUnknown = false |
|||
) |
Renders a given section.
string | $sectionName | Name of section to render |
array | $variables | The variables to use |
bool | $ignoreUnknown | Ignore an unknown section and just return an empty string |
\TYPO3\CMS\Fluid\View\Exception\InvalidSectionException |
Definition at line 209 of file AbstractTemplateView.php.
References AbstractTemplateView\getCurrentParsedTemplate(), AbstractTemplateView\getCurrentRenderingContext(), AbstractTemplateView\getCurrentRenderingType(), AbstractTemplateView\startRendering(), and AbstractTemplateView\stopRendering().
setControllerContext | ( | \TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext | $controllerContext | ) |
Sets the current controller context
\TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext | $controllerContext | Controller context which is available inside the view |
Definition at line 106 of file AbstractTemplateView.php.
References AbstractTemplateView\$controllerContext.
Referenced by StandaloneView\__construct(), and TemplateView\canRender().
setRenderingContext | ( | \TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface | $renderingContext | ) |
Injects a fresh rendering context
\TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface | $renderingContext |
Definition at line 92 of file AbstractTemplateView.php.
Referenced by StandaloneView\__construct(), and TemplateView\__construct().
|
protected |
Start a new nested rendering. Pushes the given information onto the $renderingStack.
int | $type | one of the RENDERING_* constants |
\TYPO3\CMS\Fluid\Core\Parser\ParsedTemplateInterface | $parsedTemplate | |
\TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface | $renderingContext |
Definition at line 408 of file AbstractTemplateView.php.
Referenced by AbstractTemplateView\render(), and AbstractTemplateView\renderSection().
|
protected |
Stops the current rendering. Removes one element from the $renderingStack. Make sure to always call this method pair-wise with startRendering().
Definition at line 419 of file AbstractTemplateView.php.
Referenced by AbstractTemplateView\render(), and AbstractTemplateView\renderSection().
|
protected |
Wrapper method for is_file function for testing reasons
string | $filePath |
Definition at line 321 of file AbstractTemplateView.php.
Referenced by TemplateView\getLayoutPathAndFilename(), StandaloneView\getLayoutPathAndFilename(), TemplateView\getPartialPathAndFilename(), StandaloneView\getPartialPathAndFilename(), StandaloneView\getTemplateSource(), and StandaloneView\setTemplate().
|
protected |
Ensures the given templatePath gets the file name in UpperCamelCase
string | $templatePath | A file name or a relative path |
Definition at line 301 of file AbstractTemplateView.php.
Referenced by TemplateView\buildListOfTemplateCandidates(), and StandaloneView\buildListOfTemplateCandidates().
|
protected |
Definition at line 57 of file AbstractTemplateView.php.
|
protected |
Definition at line 31 of file AbstractTemplateView.php.
Referenced by StandaloneView\__construct(), and AbstractTemplateView\setControllerContext().
|
protected |
Definition at line 37 of file AbstractTemplateView.php.
|
protected |
Definition at line 74 of file AbstractTemplateView.php.
|
protected |
Definition at line 65 of file AbstractTemplateView.php.
|
protected |
Definition at line 48 of file AbstractTemplateView.php.
Referenced by AbstractTemplateView\injectTemplateCompiler().
|
protected |
Definition at line 43 of file AbstractTemplateView.php.
const RENDERING_LAYOUT = 3 |
Definition at line 26 of file AbstractTemplateView.php.
const RENDERING_PARTIAL = 2 |
Definition at line 25 of file AbstractTemplateView.php.
const RENDERING_TEMPLATE = 1 |
Constants defining possible rendering types
Definition at line 24 of file AbstractTemplateView.php.