TYPO3 CMS  TYPO3_8-7
TYPO3\CMS\Fluid\ViewHelpers\Format\HtmlViewHelper Class Reference
Inheritance diagram for TYPO3\CMS\Fluid\ViewHelpers\Format\HtmlViewHelper:
TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper

Public Member Functions

 initializeArguments ()
 
- Public Member Functions inherited from TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper
 setRenderingContext (\TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface $renderingContext)
 
 injectObjectManager (\TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager)
 
 injectReflectionService (\TYPO3\CMS\Extbase\Reflection\ReflectionService $reflectionService)
 
 prepareArguments ()
 

Static Public Member Functions

static renderStatic (array $arguments, \Closure $renderChildrenClosure, RenderingContextInterface $renderingContext)
 

Static Protected Member Functions

static simulateFrontendEnvironment ()
 
static resetFrontendEnvironment ()
 

Protected Attributes

 $escapeChildren = false
 
 $escapeOutput = false
 
- Protected Attributes inherited from TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper
 $controllerContext
 
 $objectManager
 

Static Protected Attributes

static $tsfeBackup
 

Additional Inherited Members

- Protected Member Functions inherited from TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper
 callRenderMethod ()
 
 getLogger ()
 
 registerRenderMethodArguments ()
 

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

◆ initializeArguments()

TYPO3\CMS\Fluid\ViewHelpers\Format\HtmlViewHelper::initializeArguments ( )

Initialize arguments.

Exceptions

Definition at line 84 of file HtmlViewHelper.php.

◆ renderStatic()

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

Definition at line 97 of file HtmlViewHelper.php.

References 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()

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

Definition at line 117 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

◆ $escapeChildren

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

Definition at line 70 of file HtmlViewHelper.php.

◆ $escapeOutput

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

Definition at line 77 of file HtmlViewHelper.php.

◆ $tsfeBackup

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

Definition at line 63 of file HtmlViewHelper.php.