1 number.module number_field_info()

Implements hook_field_info().

File

core/modules/field/modules/number/number.module, line 10
Defines numeric field types.

Code

function number_field_info() {
  return array(
    'number_integer' => array(
      'label' => t('Number (integer)'),
      'description' => t('This field stores a number in the database as an integer.'),
      'instance_settings' => array('min' => '', 'max' => '', 'prefix' => '', 'suffix' => ''),
      'default_widget' => 'number',
      'default_formatter' => 'number_integer',
      'default_token_formatter' => 'number_unformatted',
    ),
    'number_decimal' => array(
      'label' => t('Number (decimal)'),
      'description' => t('This field stores a number in the database in a fixed decimal format.'),
      'settings' => array('precision' => 10, 'scale' => 2),
      'instance_settings' => array('min' => '', 'max' => '', 'prefix' => '', 'suffix' => ''),
      'default_widget' => 'number',
      'default_formatter' => 'number_decimal',
      'default_token_formatter' => 'number_unformatted',
    ),
    'number_float' => array(
      'label' => t('Number (float)'),
      'description' => t('This field stores a number in the database in a floating point format.'),
      'instance_settings' => array('min' => '', 'max' => '', 'prefix' => '', 'suffix' => ''),
      'default_widget' => 'number',
      'default_formatter' => 'number_decimal',
      'default_token_formatter' => 'number_unformatted',
    ),
  );
}