TYPO3
7.6
|
Static Public Member Functions | |
static | renderStatic (array $arguments,\Closure $renderChildrenClosure, RenderingContextInterface $renderingContext) |
Static Public Member Functions inherited from AbstractViewHelper | |
static | renderStatic (array $arguments,\Closure $renderChildrenClosure,\TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext) |
Static Public Member Functions inherited from CompilableInterface | |
static | renderStatic (array $arguments,\Closure $renderChildrenClosure,\TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext) |
Additional Inherited Members | |
Protected Member Functions inherited from AbstractViewHelper | |
registerArgument ($name, $type, $description, $required=false, $defaultValue=null) | |
overrideArgument ($name, $type, $description, $required=false, $defaultValue=null) | |
callRenderMethod () | |
getLogger () | |
buildRenderChildrenClosure () | |
hasArgument ($argumentName) | |
Protected Attributes inherited from AbstractViewHelper | |
$arguments | |
$templateVariableContainer | |
$controllerContext | |
$renderingContext | |
$renderChildrenClosure = null | |
$viewHelperVariableContainer | |
$objectManager | |
$escapingInterceptorEnabled = true | |
A view helper for formatting values with printf. Either supply an array for the arguments or a single value. See http://www.php.net/manual/en/function.sprintf.php
= Examples =
<f:format.printf arguments="{number: 362525200}">%.3e</f:format.printf>
<output> 3.625e+8 </output>
<f:format.printf arguments="{0: 3, 1: 'Kasper'}">%2$s is great, TYPO%1$d too. Yes, TYPO%1$d is great and so is %2$s!</f:format.printf>
<output> Kasper is great, TYPO3 too. Yes, TYPO3 is great and so is Kasper! </output>
<f:format.printf arguments="{1: 'TYPO3'}">We love s</f:format.printf>
<output> We love TYPO3 </output>
{someText -> f:format.printf(arguments: {1: 'TYPO3'})}
<output> We love TYPO3 </output>
Definition at line 55 of file PrintfViewHelper.php.
render | ( | array | $arguments, |
$value = null |
|||
) |
Format the arguments with the given printf format string.
array | $arguments | The arguments for vsprintf |
string | $value | string to format |
Definition at line 65 of file PrintfViewHelper.php.
References AbstractViewHelper\buildRenderChildrenClosure().
|
static |
Applies vsprintf() on the specified value.
array | $arguments | |
\Closure | $renderChildrenClosure | |
\TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface | $renderingContext |
Definition at line 85 of file PrintfViewHelper.php.
References AbstractViewHelper\$renderChildrenClosure.