TYPO3CMS  8
 All Classes Namespaces Files Functions Variables Pages
PaddingViewHelper Class Reference
Inheritance diagram for PaddingViewHelper:
AbstractViewHelper

Public Member Functions

 initializeArguments ()
 
- Public Member Functions inherited from AbstractViewHelper
 setRenderingContext (\TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface $renderingContext)
 
 injectObjectManager (\TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager)
 
 injectReflectionService (\TYPO3\CMS\Extbase\Reflection\ReflectionService $reflectionService)
 
 prepareArguments ()
 

Static Public Member Functions

static renderStatic (array $arguments,\Closure $renderChildrenClosure, RenderingContextInterface $renderingContext)
 

Protected Attributes

 $escapeChildren = false
 
- Protected Attributes inherited from AbstractViewHelper
 $controllerContext
 
 $objectManager
 

Additional Inherited Members

- Protected Member Functions inherited from AbstractViewHelper
 callRenderMethod ()
 
 getLogger ()
 
 registerRenderMethodArguments ()
 

Detailed Description

Formats a string using PHPs str_pad function.

See also
http://www.php.net/manual/en/function.str_pad.php

= Examples =

<f:format.padding padLength="10">TYPO3</f:format.padding> <output> TYPO3 (note the trailing whitespace) <output>

<f:format.padding padLength="10" padString="-=">TYPO3</f:format.padding> <output> TYPO3-=-=- </output>

<f:format.padding padLength="10" padString="-" padType="both">TYPO3</f:format.padding> <output> –TYPO3— </output>

Definition at line 48 of file PaddingViewHelper.php.

Member Function Documentation

initializeArguments ( )

Initialize arguments.

Exceptions
TYPO3Fluid

Definition at line 64 of file PaddingViewHelper.php.

static renderStatic ( array  $arguments,
\Closure  $renderChildrenClosure,
RenderingContextInterface  $renderingContext 
)
static

Pad a string to a certain length with another string

Parameters
array$arguments
\Closure$renderChildrenClosure
\TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface$renderingContext
Returns
string The formatted value

Definition at line 81 of file PaddingViewHelper.php.

Member Data Documentation

$escapeChildren = false
protected

Definition at line 57 of file PaddingViewHelper.php.