TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\Fluid\ViewHelpers\Format\HtmlViewHelper Class Reference
Inheritance diagram for TYPO3\CMS\Fluid\ViewHelpers\Format\HtmlViewHelper:
TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper TYPO3\CMS\Fluid\Core\ViewHelper\Facets\CompilableInterface

Public Member Functions

 render ($parseFuncTSPath='lib.parseFunc_RTE')
 
- Public Member Functions inherited from TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper
 setArguments (array $arguments)
 
 setRenderingContext (\TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext)
 
 injectObjectManager (\TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager)
 
 injectReflectionService (\TYPO3\CMS\Extbase\Reflection\ReflectionService $reflectionService)
 
 isEscapingInterceptorEnabled ()
 
 setViewHelperNode (\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ViewHelperNode $node)
 
 setRenderChildrenClosure (\Closure $renderChildrenClosure)
 
 initializeArgumentsAndRender ()
 
 initialize ()
 
 renderChildren ()
 
 prepareArguments ()
 
 validateArguments ()
 
 initializeArguments ()
 
 compile ($argumentsVariableName, $renderChildrenClosureVariableName, &$initializationPhpCode, \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\AbstractNode $syntaxTreeNode, \TYPO3\CMS\Fluid\Core\Compiler\TemplateCompiler $templateCompiler)
 
 resetState ()
 
- Public Member Functions inherited from TYPO3\CMS\Fluid\Core\ViewHelper\Facets\CompilableInterface
 compile ($argumentsVariableName, $renderChildrenClosureVariableName, &$initializationPhpCode, \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\AbstractNode $syntaxTreeNode, \TYPO3\CMS\Fluid\Core\Compiler\TemplateCompiler $templateCompiler)
 

Static Public Member Functions

static renderStatic (array $arguments, \Closure $renderChildrenClosure, RenderingContextInterface $renderingContext)
 
- Static Public Member Functions inherited from TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper
static renderStatic (array $arguments, \Closure $renderChildrenClosure, \TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext)
 
- Static Public Member Functions inherited from TYPO3\CMS\Fluid\Core\ViewHelper\Facets\CompilableInterface
static renderStatic (array $arguments, \Closure $renderChildrenClosure, \TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext)
 

Static Protected Member Functions

static simulateFrontendEnvironment ()
 
static resetFrontendEnvironment ()
 

Protected Attributes

 $escapingInterceptorEnabled = false
 
- Protected Attributes inherited from TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper
 $arguments
 
 $templateVariableContainer
 
 $controllerContext
 
 $renderingContext
 
 $renderChildrenClosure = null
 
 $viewHelperVariableContainer
 
 $objectManager
 
 $escapingInterceptorEnabled = true
 

Static Protected Attributes

static $tsfeBackup
 

Additional Inherited Members

- Protected Member Functions inherited from TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper
 registerArgument ($name, $type, $description, $required=false, $defaultValue=null)
 
 overrideArgument ($name, $type, $description, $required=false, $defaultValue=null)
 
 callRenderMethod ()
 
 getLogger ()
 
 buildRenderChildrenClosure ()
 
 hasArgument ($argumentName)
 

Detailed Description

Renders a string by passing it to a TYPO3 parseFunc. You can either specify a path to the TypoScript setting or set the parseFunc options directly. By default lib.parseFunc_RTE is used to parse the string.

== Examples ==

<f:format.html>foo bar. Some <LINK 1>link</LINK>.</f:format.html> <output>

foo bar. Some link.

(depending on your TYPO3 setup) </output>

<f:format.html parseFuncTSPath="lib.parseFunc">foo bar. Some <LINK 1>link</LINK>.</f:format.html> <output> foo bar. Some link. </output>

{someText -> f:format.html(parseFuncTSPath: 'lib.parseFunc')} <output> foo bar. Some link. </output>

See also
https://docs.typo3.org/typo3cms/TyposcriptReference/Functions/Parsefunc/

Definition at line 56 of file HtmlViewHelper.php.

Member Function Documentation

◆ render()

TYPO3\CMS\Fluid\ViewHelpers\Format\HtmlViewHelper::render (   $parseFuncTSPath = 'lib.parseFunc_RTE')
Parameters
string$parseFuncTSPathpath to TypoScript parseFunc setup.
Returns
string the parsed string.

Definition at line 76 of file HtmlViewHelper.php.

References TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper\buildRenderChildrenClosure().

◆ renderStatic()

static TYPO3\CMS\Fluid\ViewHelpers\Format\HtmlViewHelper::renderStatic ( array  $arguments,
\Closure  $renderChildrenClosure,
RenderingContextInterface  $renderingContext 
)
static
Parameters
array$arguments
callable$renderChildrenClosure
RenderingContextInterface$renderingContext
Returns
string

Definition at line 94 of file HtmlViewHelper.php.

References TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper\$renderChildrenClosure, and TYPO3\CMS\Core\Utility\GeneralUtility\makeInstance().

◆ resetFrontendEnvironment()

static TYPO3\CMS\Fluid\ViewHelpers\Format\HtmlViewHelper::resetFrontendEnvironment ( )
staticprotected

Resets $GLOBALS['TSFE'] if it was previously changed by simulateFrontendEnvironment()

Returns
void
See also
simulateFrontendEnvironment()

Definition at line 132 of file HtmlViewHelper.php.

References $GLOBALS.

◆ simulateFrontendEnvironment()

static TYPO3\CMS\Fluid\ViewHelpers\Format\HtmlViewHelper::simulateFrontendEnvironment ( )
staticprotected

Copies the specified parseFunc configuration to $GLOBALS['TSFE']->tmpl->setup in Backend mode This somewhat hacky work around is currently needed because the parseFunc() function of relies on those variables to be set

Returns
void

Definition at line 116 of file HtmlViewHelper.php.

References $GLOBALS, TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper\$objectManager, TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface\CONFIGURATION_TYPE_FULL_TYPOSCRIPT, and TYPO3\CMS\Core\Utility\GeneralUtility\makeInstance().

Member Data Documentation

◆ $escapingInterceptorEnabled

TYPO3\CMS\Fluid\ViewHelpers\Format\HtmlViewHelper::$escapingInterceptorEnabled = false
protected

Definition at line 70 of file HtmlViewHelper.php.

◆ $tsfeBackup

TYPO3\CMS\Fluid\ViewHelpers\Format\HtmlViewHelper::$tsfeBackup
staticprotected

Definition at line 61 of file HtmlViewHelper.php.