HtmlViewHelper extends AbstractViewHelper uses CompileWithRenderStatic

ViewHelper

This class is the implementation of a Fluid ViewHelper.

View this class in the TYPO3 ViewHelper reference: <f:transform.html>

Transforms HTML and substitutes internal link scheme aspects.

Examples

Default parameters

::

<f:transform.html selector="a.href" onFailure="removeEnclosure"> Home </f:transform.html>

Output::

<a href="https://example.com/home" class="home">Home</a>

Inline notation

::

{content -> f:transform.html(selector:'a.href', onFailure:'removeEnclosure')}

Table of Contents

Constants

MAP_ON_FAILURE  = ['' => 0, 'null' => 0, 'removeTag' => \TYPO3\CMS\Frontend\Html\HtmlWorker::REMOVE_TAG_ON_FAILURE, 'removeAttr' => \TYPO3\CMS\Frontend\Html\HtmlWorker::REMOVE_ATTR_ON_FAILURE, 'removeEnclosure' => \TYPO3\CMS\Frontend\Html\HtmlWorker::REMOVE_ENCLOSURE_ON_FAILURE]

Properties

$escapeChildren  : bool
$escapeOutput  : bool

Methods

initializeArguments()  : mixed
renderStatic()  : string

Constants

MAP_ON_FAILURE

protected mixed MAP_ON_FAILURE = ['' => 0, 'null' => 0, 'removeTag' => \TYPO3\CMS\Frontend\Html\HtmlWorker::REMOVE_TAG_ON_FAILURE, 'removeAttr' => \TYPO3\CMS\Frontend\Html\HtmlWorker::REMOVE_ATTR_ON_FAILURE, 'removeEnclosure' => \TYPO3\CMS\Frontend\Html\HtmlWorker::REMOVE_ENCLOSURE_ON_FAILURE]

Properties

$escapeChildren

protected bool $escapeChildren = false

$escapeOutput

protected bool $escapeOutput = false

Methods

initializeArguments()

public initializeArguments() : mixed
Tags
throws
Exception

renderStatic()

public static renderStatic(array{selector: string} $arguments, Closure $renderChildrenClosure, RenderingContextInterface $renderingContext) : string
Parameters
$arguments : array{selector: string}
$renderChildrenClosure : Closure
$renderingContext : RenderingContextInterface
Return values
string

transformed markup


        
On this page

Search results