You are here

function _money_get_displayed_decimals in Money field 5

Get the number of displayed decimals, use the default if the variable is empty.

Parameters

$displayed_decimals: A variable that possibly contains the number of displayed decimals

Return value

A number of displayed decimals, either the variable or the default (2).

3 calls to _money_get_displayed_decimals()
money_field_formatter in ./money.module
Implementation of hook_field_formatter().
money_field_settings in ./money.module
Implementation of hook_field_settings().
money_widget in ./money.module
Implementation of hook_widget().

File

./money.module, line 501
This module defines the "money" CCK field. It uses the Currency API, which is included in the Currency module, to get a list of valid currencies.

Code

function _money_get_displayed_decimals($displayed_decimals = NULL) {
  return isset($displayed_decimals) ? $displayed_decimals : 2;
}