All Classes Namespaces Files Functions Variables Pages
ViewHelperResolver Class Reference
Inheritance diagram for ViewHelperResolver:

Public Member Functions

 __construct ()
 createViewHelperInstanceFromClassName ($viewHelperClassName)

Protected Member Functions

 getObjectManager ()
 getBackendUser ()

Detailed Description

Class ViewHelperResolver

Class whose purpose is dedicated to resolving classes which can be used as ViewHelpers and ExpressionNodes in Fluid.

This CMS-specific version of the ViewHelperResolver works almost exactly like the one from Fluid itself, with the main differences being that this one supports a legacy mode flag which when toggled on makes the Fluid parser behave exactly like it did in the legacy CMS Fluid package.

In addition to modifying the behavior or the parser when legacy mode is requested, this ViewHelperResolver is also made capable of "mixing" two different ViewHelper namespaces to effectively create aliases for the Fluid core ViewHelpers to be loaded in the TYPO3 scope as well.

Default ViewHelper namespaces are read TYPO3 configuration at:


Extending this array allows third party ViewHelper providers to automatically add or extend namespaces which then become available in every Fluid template file without having to register the namespace.

Definition at line 49 of file ViewHelperResolver.php.

Constructor & Destructor Documentation

__construct ( )

ViewHelperResolver constructor

Loads namespaces defined in global TYPO3 configuration. Overlays f: with f:debug: when Fluid debugging is enabled in the admin panel, causing debugging-specific ViewHelpers to be resolved in that case.

Definition at line 58 of file ViewHelperResolver.php.

References $GLOBALS, and ViewHelperResolver\getBackendUser().

Member Function Documentation

createViewHelperInstanceFromClassName (   $viewHelperClassName)

Definition at line 74 of file ViewHelperResolver.php.

References ViewHelperResolver\getObjectManager().

getBackendUser ( )

Definition at line 90 of file ViewHelperResolver.php.

References $GLOBALS.

Referenced by ViewHelperResolver\__construct().

getObjectManager ( )

Definition at line 82 of file ViewHelperResolver.php.

References GeneralUtility\makeInstance().

Referenced by ViewHelperResolver\createViewHelperInstanceFromClassName().