Neos\FluidAdaptor\ViewHelpers\Format\PaddingViewHelper::renderStatic PHP Method

renderStatic() public static method

Applies str_pad() on the specified value.
public static renderStatic ( array $arguments, Closure $renderChildrenClosure, TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface $renderingContext ) : string
$arguments array
$renderChildrenClosure Closure
$renderingContext TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface
return string
    public static function renderStatic(array $arguments, \Closure $renderChildrenClosure, RenderingContextInterface $renderingContext)
    {
        $value = $arguments['value'];
        if ($value === null) {
            $value = $renderChildrenClosure();
        }
        $padTypes = array('left' => STR_PAD_LEFT, 'right' => STR_PAD_RIGHT, 'both' => STR_PAD_BOTH);
        $padType = $arguments['padType'];
        if (!isset($padTypes[$padType])) {
            $padType = 'right';
        }
        return str_pad($value, $arguments['padLength'], $arguments['padString'], $padTypes[$padType]);
    }
PaddingViewHelper