Attention
TYPO3 v11 has reached end-of-life as of October 31th 2024 and is no longer being maintained. Use the version switcher on the top left of this page to select documentation for a supported version of TYPO3.
Need more time before upgrading? You can purchase Extended Long Term Support (ELTS) for TYPO3 v10 here: TYPO3 ELTS.
round
With this property you can round the value up, down or to a certain number of decimals. For each roundType the according PHP function will be used.
The value will be converted to a float value before applying the selected round method.
Properties
roundType
decimals
round
- Property
- round
- Data type
- boolean
- Description
- Set round = 1 to enable rounding.
- Default
- 0
Examples
lib.number = TEXT
lib.number {
value = 3.14159
stdWrap.round = 1
stdWrap.round.roundType = round
stdWrap.round.decimals = 2
}
Copied!
This returns 3.
.