mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Adding doc block for options on NumberHelper::currency()
This commit is contained in:
parent
0b558c6eb0
commit
20c02e39d6
1 changed files with 13 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue