Project

General

Profile

Actions

Bug #82731

closed

allow 'value'-argument for inline-usage of <f:format.number>

Added by Dieter Porth over 6 years ago. Updated over 6 years ago.

Status:
Rejected
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2017-10-11
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Viewhelper won't work inline, because you can't give a number to the inline-version.

add the following line in the method initializeArguments of the viewhelper
$this->registerArgument('value', 'string', 'The value, which should be converted', false, '');

replace in method renderStatic
$stringToFormat = $renderChildrenClosure();
with
$stringToFormat = (isset($arguments['value']) ? $arguments['value'] : $renderChildrenClosure());

Actions #1

Updated by Susanne Moog over 6 years ago

  • Status changed from New to Rejected

Works fine for me - even inline:

PHP:
$this->view->assign('foo', 546456);

Fluid: {foo -> f:format.number()}

See also documentation of inline syntax here https://wiki.typo3.org/Fluid_Inline_Notation

Actions

Also available in: Atom PDF