Skip to content
Snippets Groups Projects
Commit 53b304bd authored by Anja Leichsenring's avatar Anja Leichsenring Committed by Andreas Fernandez
Browse files

[FOLLOWUP][TASK] Remove render arguments in BytesVH

We missed the default value for the decimals argument.
It is added now.

Resolves: #77046
Releases: master
Change-Id: If5c0e2b223b13921c97fd50b501f18cbc64b8be4
Reviewed-on: https://review.typo3.org/49339


Tested-by: default avatarBamboo TYPO3com <info@typo3.com>
Reviewed-by: default avatarWouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: default avatarNicole Cordes <typo3@cordes.co>
Tested-by: default avatarNicole Cordes <typo3@cordes.co>
Reviewed-by: default avatarAndreas Fernandez <typo3@scripting-base.de>
Tested-by: default avatarAndreas Fernandez <typo3@scripting-base.de>
parent 694dbadc
No related merge requests found
......@@ -69,15 +69,11 @@ class BytesViewHelper extends AbstractViewHelper
public function initializeArguments()
{
parent::initializeArguments();
$this->registerArgument('value', 'int',
'The incoming data to convert, or NULL if VH children should be used');
$this->registerArgument('decimals', 'int', 'The number of digits after the decimal point');
$this->registerArgument('decimalSeparator', 'string', 'The decimal point character', false,
'.');
$this->registerArgument('thousandsSeparator', 'string',
'The character for grouping the thousand digits', false, ',');
$this->registerArgument('units', 'string',
'comma separated list of available units, default is LocalizationUtility::translate(\'viewhelper.format.bytes.units\', \'fluid\')');
$this->registerArgument('value', 'int', 'The incoming data to convert, or NULL if VH children should be used');
$this->registerArgument('decimals', 'int', 'The number of digits after the decimal point', false, 0);
$this->registerArgument('decimalSeparator', 'string', 'The decimal point character', false, '.');
$this->registerArgument('thousandsSeparator', 'string', 'The character for grouping the thousand digits', false, ',');
$this->registerArgument('units', 'string', 'comma separated list of available units, default is LocalizationUtility::translate(\'viewhelper.format.bytes.units\', \'fluid\')');
}
/**
......@@ -104,11 +100,8 @@ class BytesViewHelper extends AbstractViewHelper
*
* @return string
*/
public static function renderStatic(
array $arguments,
\Closure $renderChildrenClosure,
RenderingContextInterface $renderingContext
) {
public static function renderStatic(array $arguments, \Closure $renderChildrenClosure, RenderingContextInterface $renderingContext)
{
if ($arguments['units'] !== null) {
$units = $arguments['units'];
} else {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment