PaddingViewHelper extends AbstractViewHelper

ViewHelper

This class is the implementation of a Fluid ViewHelper.

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

FinalYes

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

getContentArgumentName()  : string
Explicitly set argument name to be used as content.
initializeArguments()  : void
render()  : string
Pad a string to a certain length with another string.

Properties

$escapeChildren

Output is escaped already. We must not escape children, to avoid double encoding.

protected bool $escapeChildren = false

Methods

getContentArgumentName()

Explicitly set argument name to be used as content.

public getContentArgumentName() : string
Return values
string

initializeArguments()

public initializeArguments() : void

render()

Pad a string to a certain length with another string.

public render() : string
Return values
string

        
On this page

Search results