PHP Класс Neos\Fusion\View\FusionView

Recursively loads all Fusion files from the configured path (By default that's Resources/Private/TypoScripts of the current package) and then checks whether a Fusion object for current controller and action can be found. If the controller class name is Foo\Bar\Baz\Controller\BlahController and the action is "index", it checks for the Fusion path Foo.Bar.Baz.BlahController.index. If this path is found, then it is used for rendering. Otherwise, the $fallbackView is used.
Наследование: extends Neos\Flow\Mvc\View\AbstractView
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$fallbackView Neos\Flow\Mvc\View\ViewInterface
$fallbackViewEnabled boolean if FALSE, the fallback view will never be used.
$parsedTypoScript array The parsed TypoScript array in its internal representation
$supportedOptions array This contains the supported options, their default values, descriptions and types.
$typoScriptParser Neos\Fusion\Core\Parser
$typoScriptPath string Runtime cache of the TypoScript path which should be rendered; derived from the controller and action names or set by the user.
$typoScriptRuntime Neos\Fusion\Core\Runtime The TypoScript Runtime

Открытые методы

Метод Описание
disableFallbackView ( ) : void Disable the use of the Fallback View
enableFallbackView ( ) : void Re-Enable the use of the Fallback View. By default, it is enabled, so calling this method only makes sense if disableFallbackView() has been called before.
initializeTypoScriptRuntime ( ) : void Load the TypoScript Files form the defined paths and construct a Runtime from the parsed results
render ( ) : string Render the view
renderFallbackView ( ) : string Initialize and render the fallback view
setOption ( string $optionName, mixed $value ) : void Reset runtime cache if an option is changed
setPackageKey ( string $packageKey ) : void The package key where the TypoScript should be loaded from. If not given, is automatically derived from the current request.
setTypoScriptPath ( string $typoScriptPath ) : void Sets the TypoScript path to be rendered to an explicit value; to be used mostly inside tests.
setTypoScriptPathPattern ( string $pathPattern ) : void
setTypoScriptPathPatterns ( array $pathPatterns ) : void

Защищенные методы

Метод Описание
getPackageKey ( ) : string Get the package key to load the TypoScript from. If set, $this->getOption('packageKey') is used.
getTypoScriptPathForCurrentRequest ( ) : string Determines the TypoScript path depending on the current controller and action
isTypoScriptFoundForCurrentRequest ( ) : boolean Determine whether we are able to find TypoScript at the requested position
loadTypoScript ( ) : void Load TypoScript from the directories specified by $this->getOption('typoScriptPathPatterns')
renderTypoScript ( ) : string Render the given TypoScript and return the rendered page

Описание методов

disableFallbackView() публичный метод

Disable the use of the Fallback View
public disableFallbackView ( ) : void
Результат void

enableFallbackView() публичный метод

Re-Enable the use of the Fallback View. By default, it is enabled, so calling this method only makes sense if disableFallbackView() has been called before.
public enableFallbackView ( ) : void
Результат void

getPackageKey() защищенный метод

Otherwise, the current request is taken and the controller package key is extracted from there.
protected getPackageKey ( ) : string
Результат string the package key to load TypoScript from

getTypoScriptPathForCurrentRequest() защищенный метод

Determines the TypoScript path depending on the current controller and action
protected getTypoScriptPathForCurrentRequest ( ) : string
Результат string

initializeTypoScriptRuntime() публичный метод

Load the TypoScript Files form the defined paths and construct a Runtime from the parsed results
public initializeTypoScriptRuntime ( ) : void
Результат void

isTypoScriptFoundForCurrentRequest() защищенный метод

Determine whether we are able to find TypoScript at the requested position
protected isTypoScriptFoundForCurrentRequest ( ) : boolean
Результат boolean TRUE if TypoScript exists at the current TypoScript path; FALSE otherwise

loadTypoScript() защищенный метод

Load TypoScript from the directories specified by $this->getOption('typoScriptPathPatterns')
protected loadTypoScript ( ) : void
Результат void

render() публичный метод

Render the view
public render ( ) : string
Результат string The rendered view

renderFallbackView() публичный метод

Initialize and render the fallback view
public renderFallbackView ( ) : string
Результат string

renderTypoScript() защищенный метод

Render the given TypoScript and return the rendered page
protected renderTypoScript ( ) : string
Результат string

setOption() публичный метод

Reset runtime cache if an option is changed
public setOption ( string $optionName, mixed $value ) : void
$optionName string
$value mixed
Результат void

setPackageKey() публичный метод

The package key where the TypoScript should be loaded from. If not given, is automatically derived from the current request.
public setPackageKey ( string $packageKey ) : void
$packageKey string
Результат void

setTypoScriptPath() публичный метод

Sets the TypoScript path to be rendered to an explicit value; to be used mostly inside tests.
public setTypoScriptPath ( string $typoScriptPath ) : void
$typoScriptPath string
Результат void

setTypoScriptPathPattern() публичный метод

public setTypoScriptPathPattern ( string $pathPattern ) : void
$pathPattern string
Результат void

setTypoScriptPathPatterns() публичный метод

public setTypoScriptPathPatterns ( array $pathPatterns ) : void
$pathPatterns array
Результат void

Описание свойств

$fallbackView защищенное свойство

protected ViewInterface,Neos\Flow\Mvc\View $fallbackView
Результат Neos\Flow\Mvc\View\ViewInterface

$fallbackViewEnabled защищенное свойство

if FALSE, the fallback view will never be used.
protected bool $fallbackViewEnabled
Результат boolean

$parsedTypoScript защищенное свойство

The parsed TypoScript array in its internal representation
protected array $parsedTypoScript
Результат array

$supportedOptions защищенное свойство

This contains the supported options, their default values, descriptions and types.
protected array $supportedOptions
Результат array

$typoScriptParser защищенное свойство

protected Parser,Neos\Fusion\Core $typoScriptParser
Результат Neos\Fusion\Core\Parser

$typoScriptPath защищенное свойство

Runtime cache of the TypoScript path which should be rendered; derived from the controller and action names or set by the user.
protected string $typoScriptPath
Результат string

$typoScriptRuntime защищенное свойство

The TypoScript Runtime
protected Runtime,Neos\Fusion\Core $typoScriptRuntime
Результат Neos\Fusion\Core\Runtime