PHP Class 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.
Inheritance: extends Neos\Flow\Mvc\View\AbstractView
Afficher le fichier Open project: neos/neos-development-collection Class Usage Examples

Protected Properties

Свойство Type Description
$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

Méthodes publiques

Méthode Description
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

Méthodes protégées

Méthode Description
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

Method Details

disableFallbackView() public méthode

Disable the use of the Fallback View
public disableFallbackView ( ) : void
Résultat void

enableFallbackView() public méthode

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
Résultat void

getPackageKey() protected méthode

Otherwise, the current request is taken and the controller package key is extracted from there.
protected getPackageKey ( ) : string
Résultat string the package key to load TypoScript from

getTypoScriptPathForCurrentRequest() protected méthode

Determines the TypoScript path depending on the current controller and action

initializeTypoScriptRuntime() public méthode

Load the TypoScript Files form the defined paths and construct a Runtime from the parsed results
public initializeTypoScriptRuntime ( ) : void
Résultat void

isTypoScriptFoundForCurrentRequest() protected méthode

Determine whether we are able to find TypoScript at the requested position
protected isTypoScriptFoundForCurrentRequest ( ) : boolean
Résultat boolean TRUE if TypoScript exists at the current TypoScript path; FALSE otherwise

loadTypoScript() protected méthode

Load TypoScript from the directories specified by $this->getOption('typoScriptPathPatterns')
protected loadTypoScript ( ) : void
Résultat void

render() public méthode

Render the view
public render ( ) : string
Résultat string The rendered view

renderFallbackView() public méthode

Initialize and render the fallback view
public renderFallbackView ( ) : string
Résultat string

renderTypoScript() protected méthode

Render the given TypoScript and return the rendered page
protected renderTypoScript ( ) : string
Résultat string

setOption() public méthode

Reset runtime cache if an option is changed
public setOption ( string $optionName, mixed $value ) : void
$optionName string
$value mixed
Résultat void

setPackageKey() public méthode

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
Résultat void

setTypoScriptPath() public méthode

Sets the TypoScript path to be rendered to an explicit value; to be used mostly inside tests.
public setTypoScriptPath ( string $typoScriptPath ) : void
$typoScriptPath string
Résultat void

setTypoScriptPathPattern() public méthode

public setTypoScriptPathPattern ( string $pathPattern ) : void
$pathPattern string
Résultat void

setTypoScriptPathPatterns() public méthode

public setTypoScriptPathPatterns ( array $pathPatterns ) : void
$pathPatterns array
Résultat void

Property Details

$fallbackView protected_oe property

protected ViewInterface,Neos\Flow\Mvc\View $fallbackView
Résultat Neos\Flow\Mvc\View\ViewInterface

$fallbackViewEnabled protected_oe property

if FALSE, the fallback view will never be used.
protected bool $fallbackViewEnabled
Résultat boolean

$parsedTypoScript protected_oe property

The parsed TypoScript array in its internal representation
protected array $parsedTypoScript
Résultat array

$supportedOptions protected_oe property

This contains the supported options, their default values, descriptions and types.
protected array $supportedOptions
Résultat array

$typoScriptParser protected_oe property

protected Parser,Neos\Fusion\Core $typoScriptParser
Résultat Neos\Fusion\Core\Parser

$typoScriptPath protected_oe property

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
Résultat string

$typoScriptRuntime protected_oe property

The TypoScript Runtime
protected Runtime,Neos\Fusion\Core $typoScriptRuntime
Résultat Neos\Fusion\Core\Runtime