UrlencodeViewHelper extends AbstractViewHelper uses CompileWithContentArgumentAndRenderStatic
This class is the implementation of a Fluid ViewHelper.
View this class in the TYPO3 ViewHelper reference: <f:format.urlencode>
Encodes the given string according to http://www.faqs.org/rfcs/rfc3986.html Applying PHPs :php:`rawurlencode()` function.
See https://www.php.net/manual/function.rawurlencode.php.
.. note:: The output is not escaped. You may have to ensure proper escaping on your own.
Examples
Default notation
::
<f:format.urlencode>foo @+%/</f:format.urlencode>
foo%20%40%2B%25%2F
:php:rawurlencode()
applied.
Inline notation
::
{text -> f:format.urlencode()}
Url encoded text :php:rawurlencode()
applied.
Table of Contents
Properties
- $escapeChildren : bool
- Output is escaped already. We must not escape children, to avoid double encoding.
Methods
- initializeArguments() : void
- renderStatic() : mixed
- Escapes special characters with their escaped counterparts as needed using PHPs rawurlencode() function.
- resolveContentArgumentName() : string
- Explicitly set argument name to be used as content.
Properties
$escapeChildren
Output is escaped already. We must not escape children, to avoid double encoding.
protected
bool
$escapeChildren
= false
Methods
initializeArguments()
public
initializeArguments() : void
renderStatic()
Escapes special characters with their escaped counterparts as needed using PHPs rawurlencode() function.
public
static renderStatic(array<string|int, mixed> $arguments, Closure $renderChildrenClosure, RenderingContextInterface $renderingContext) : mixed
Parameters
- $arguments : array<string|int, mixed>
- $renderChildrenClosure : Closure
- $renderingContext : RenderingContextInterface
Tags
resolveContentArgumentName()
Explicitly set argument name to be used as content.
public
resolveContentArgumentName() : string