From 20c02e39d615d171e9dfbbc08cbfc24a8324ff6c Mon Sep 17 00:00:00 2001 From: Mark Story Date: Tue, 22 Dec 2009 19:17:23 -0500 Subject: [PATCH] Adding doc block for options on NumberHelper::currency() --- cake/libs/view/helpers/number.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/cake/libs/view/helpers/number.php b/cake/libs/view/helpers/number.php index fec893b0f..c9a565407 100644 --- a/cake/libs/view/helpers/number.php +++ b/cake/libs/view/helpers/number.php @@ -152,6 +152,18 @@ class NumberHelper extends AppHelper { /** * Formats a number into a currency format. * + * ### Options + * + * - `before` - The currency symbol to place before whole numbers ie. '$' + * - `after` - The currency symbol to place after decimal numbers ie. 'c'. Set to boolean false to + * use no decimal symbol. eg. 0.35 => $0.35. + * - `zero` - The text to use for zero values, can be a string or a number. ie. 0, 'Free!' + * - `places` - Number of decimal places to use. ie. 2 + * - `thousands` - Thousands separator ie. ',' + * - `decimals` - Decimal separator symbol ie. '.' + * - `negative` - Symbol for negative numbers. If equal to '()', the number will be wrapped with ( and ) + * - `escape` - Should the output be htmlentity escaped? Defaults to true + * * @param float $number * @param string $currency Shortcut to default options. Valid values are 'USD', 'EUR', 'GBP', otherwise * set at least 'before' and 'after' options. @@ -224,6 +236,7 @@ class NumberHelper extends AppHelper { * @param string $formatName The format name to be used in the future. * @param array $options The array of options for this format. * @return void + * @see NumberHelper::currency() */ function addFormat($formatName, $options) { $this->_currencies[$formatName] = $options + $this->_currencyDefaults;