diff --git a/reference/forms/types/money.rst b/reference/forms/types/money.rst index 3f6af5941ef..e3f7c59c907 100644 --- a/reference/forms/types/money.rst +++ b/reference/forms/types/money.rst @@ -17,6 +17,7 @@ how the input and output of the data is handled. | Options | - `currency`_ | | | - `divisor`_ | | | - `grouping`_ | +| | - `rounding_mode`_ | | | - `scale`_ | +-------------+---------------------------------------------------------------------+ | Overridden | - `compound`_ | @@ -79,6 +80,8 @@ be set back on your object. .. include:: /reference/forms/types/options/grouping.rst.inc +.. include:: /reference/forms/types/options/rounding_mode.rst.inc + scale ~~~~~ diff --git a/reference/forms/types/number.rst b/reference/forms/types/number.rst index 843ef81e51e..17d52d97f4e 100644 --- a/reference/forms/types/number.rst +++ b/reference/forms/types/number.rst @@ -43,34 +43,7 @@ Field Options .. include:: /reference/forms/types/options/scale.rst.inc -rounding_mode -~~~~~~~~~~~~~ - -**type**: ``integer`` **default**: ``NumberToLocalizedStringTransformer::ROUND_HALF_UP`` - -If a submitted number needs to be rounded (based on the `scale`_ -option), you have several configurable options for that rounding. Each -option is a constant on the :class:`Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\NumberToLocalizedStringTransformer`: - -* ``NumberToLocalizedStringTransformer::ROUND_DOWN`` Round towards zero. - -* ``NumberToLocalizedStringTransformer::ROUND_FLOOR`` Round towards negative - infinity. - -* ``NumberToLocalizedStringTransformer::ROUND_UP`` Round away from zero. - -* ``NumberToLocalizedStringTransformer::ROUND_CEILING`` Round towards - positive infinity. - -* ``NumberToLocalizedStringTransformer::ROUND_HALF_DOWN`` Round towards the - "nearest neighbor". If both neighbors are equidistant, round down. - -* ``NumberToLocalizedStringTransformer::ROUND_HALF_EVEN`` Round towards the - "nearest neighbor". If both neighbors are equidistant, round towards the - even neighbor. - -* ``NumberToLocalizedStringTransformer::ROUND_HALF_UP`` Round towards the - "nearest neighbor". If both neighbors are equidistant, round up. +.. include:: /reference/forms/types/options/rounding_mode.rst.inc Overridden Options ------------------ diff --git a/reference/forms/types/options/rounding_mode.rst.inc b/reference/forms/types/options/rounding_mode.rst.inc new file mode 100644 index 00000000000..d24ed18c551 --- /dev/null +++ b/reference/forms/types/options/rounding_mode.rst.inc @@ -0,0 +1,22 @@ +rounding_mode +~~~~~~~~~~~~~ + +**type**: ``integer`` **default**: ``NumberToLocalizedStringTransformer::ROUND_HALF_UP`` + +If a submitted number needs to be rounded (based on the `scale`_ +option), you have several configurable options for that rounding. Each +option is a constant on the :class:`Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\NumberToLocalizedStringTransformer`: + +* ``NumberToLocalizedStringTransformer::ROUND_DOWN`` Round towards zero. + +* ``NumberToLocalizedStringTransformer::ROUND_FLOOR`` Round towards negative infinity. + +* ``NumberToLocalizedStringTransformer::ROUND_UP`` Round away from zero. + +* ``NumberToLocalizedStringTransformer::ROUND_CEILING`` Round towards positive infinity. + +* ``NumberToLocalizedStringTransformer::ROUND_HALF_DOWN`` Round towards the "nearest neighbor". If both neighbors are equidistant, round down. + +* ``NumberToLocalizedStringTransformer::ROUND_HALF_EVEN`` Round towards the "nearest neighbor". If both neighbors are equidistant, round towards the even neighbor. + +* ``NumberToLocalizedStringTransformer::ROUND_HALF_UP`` Round towards the "nearest neighbor". If both neighbors are equidistant, round up.
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: