number_field_formatter_info
function number_field_formatter_info
number_field_formatter_info()
Implements hook_field_formatter_info().
File
- modules/field/modules/number/number.module, line 182
- Defines numeric field types.
Code
function number_field_formatter_info() { return array( // The 'Default' formatter is different for integer fields on the one hand, // and for decimal and float fields on the other hand, in order to be able // to use different default values for the settings. 'number_integer' => array( 'label' => t('Default'), 'field types' => array('number_integer'), 'settings' => array( 'thousand_separator' => '', // The 'decimal_separator' and 'scale' settings are not configurable // through the UI, and will therefore keep their default values. They // are only present so that the 'number_integer' and 'number_decimal' // formatters can use the same code. 'decimal_separator' => '.', 'scale' => 0, 'prefix_suffix' => TRUE, ), ), 'number_decimal' => array( 'label' => t('Default'), 'field types' => array('number_decimal', 'number_float'), 'settings' => array( 'thousand_separator' => '', 'decimal_separator' => '.', 'scale' => 2, 'prefix_suffix' => TRUE, ), ), 'number_unformatted' => array( 'label' => t('Unformatted'), 'field types' => array('number_integer', 'number_decimal', 'number_float'), ), ); }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!field!modules!number!number.module/function/number_field_formatter_info/7.x