PaddingViewHelper extends AbstractViewHelper uses CompileWithContentArgumentAndRenderStatic
This class is the implementation of a Fluid ViewHelper.
View this class in the TYPO3 ViewHelper reference: <f:format.padding>
Formats a string using PHPs :php:`str_pad` function.
See https://www.php.net/manual/en/function.str-pad.
Examples
Defaults
::
<f:format.padding padLength="10">TYPO3</f:format.padding>
Output::
TYPO3␠␠␠␠␠
TYPO3␠␠␠␠␠
Specify padding string
::
<f:format.padding padLength="10" padString="-=">TYPO3</f:format.padding>
TYPO3-=-=-
Specify padding type
::
<f:format.padding padLength="10" padString="-" padType="both">TYPO3</f:format.padding>
--TYPO3---
Table of Contents
Properties
- $escapeChildren : bool
- Output is escaped already. We must not escape children, to avoid double encoding.
Methods
- initializeArguments() : void
- renderStatic() : string
- Pad a string to a certain length with another string.
- 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()
Pad a string to a certain length with another string.
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
stringresolveContentArgumentName()
Explicitly set argument name to be used as content.
public
resolveContentArgumentName() : string