Nl2brViewHelper extends AbstractViewHelper uses CompileWithContentArgumentAndRenderStatic

ViewHelper

This class is the implementation of a Fluid ViewHelper.

View this class in the TYPO3 ViewHelper reference: <f:format.nl2br>

Wrapper for PHPs :php:`nl2br` function.

See https://www.php.net/manual/function.nl2br.php.

Examples

Default

::

<f:format.nl2br>{text_with_linebreaks}</f:format.nl2br>

Text with line breaks replaced by <br />

Inline notation

::

{text_with_linebreaks -> f:format.nl2br()}

Text with line breaks replaced by <br />

Table of Contents

Properties

$escapeOutput  : bool

Methods

initializeArguments()  : mixed
Initialize arguments.
renderStatic()  : string
Applies nl2br() on the specified value.

Properties

$escapeOutput

protected bool $escapeOutput = false

Methods

initializeArguments()

Initialize arguments.

public initializeArguments() : mixed
Tags
throws
Exception

renderStatic()

Applies nl2br() on the specified value.

public static renderStatic(array<string|int, mixed> $arguments, Closure $renderChildrenClosure, RenderingContextInterface $renderingContext) : string
Parameters
$arguments : array<string|int, mixed>
$renderChildrenClosure : Closure
$renderingContext : RenderingContextInterface
Return values
string

        
On this page

Search results