PHP Class Neos\FluidAdaptor\ViewHelpers\Format\BytesViewHelper

= Examples = {fileSize -> f:format.bytes()} 123 KB depending on the value of {fileSize} {fileSize -> f:format.bytes(decimals: 2, decimalSeparator: ',', thousandsSeparator: ',')} 1,023.00 B depending on the value of {fileSize}
Inheritance: extends Neos\FluidAdaptor\Core\ViewHelper\AbstractViewHelper
Show file Open project: neos/flow-development-collection

Public Methods

Method Description
render ( integer $value = null, integer $decimals, string $decimalSeparator = '.', string $thousandsSeparator = ',' ) : string Render the supplied byte count as a human readable string.
renderStatic ( array $arguments, Closure $renderChildrenClosure, TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface $renderingContext ) : string Applies htmlspecialchars() on the specified value.

Method Details

render() public method

Render the supplied byte count as a human readable string.
public render ( integer $value = null, integer $decimals, string $decimalSeparator = '.', string $thousandsSeparator = ',' ) : string
$value integer The incoming data to convert, or NULL if VH children should be used
$decimals integer The number of digits after the decimal point
$decimalSeparator string The decimal point character
$thousandsSeparator string The character for grouping the thousand digits
return string Formatted byte count

renderStatic() public static method

Applies htmlspecialchars() 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