function formatted_number_field_info in Formatted Number 7
Same name and namespace in other branches
- 6 formatted_number.module \formatted_number_field_info()
Implements hook_field_info().
2 calls to formatted_number_field_info()
- formatted_number_field_formatter_info in ./
formatted_number.module - Implements hook_field_formatter_info().
- formatted_number_field_widget_info in ./
formatted_number.module - Implements hook_field_widget_info().
File
- ./
formatted_number.module, line 25 - Defines numeric field types where the thousand and decimal separators are inherited from the Format Number API module.
Code
function formatted_number_field_info() {
return array(
'formatted_tinyint' => array(
'label' => t('Formatted tiny integer'),
'description' => t('Store a number in the database as a tiny integer (-128 to 127).'),
'settings' => array(
'min' => -128,
'max' => 127,
'max_length' => 4,
),
'instance_settings' => array(
'min' => '',
'max' => '',
'prefix' => '',
'suffix' => '',
),
'default_widget' => 'formatted_number',
'default_formatter' => 'formatted_number_integer',
),
'formatted_tinyint_unsigned' => array(
'label' => t('Formatted tiny integer (unsigned)'),
'description' => t('Store a number in the database as a tiny unsigned integer (0 to 255).'),
'settings' => array(
'min' => 0,
'max' => 255,
'max_length' => 4,
),
'instance_settings' => array(
'min' => '',
'max' => '',
'prefix' => '',
'suffix' => '',
),
'default_widget' => 'formatted_number',
'default_formatter' => 'formatted_number_integer',
),
'formatted_smallint' => array(
'label' => t('Formatted small integer'),
'description' => t('Store a number in the database as a small integer (-32768 to 32767).'),
'settings' => array(
'min' => -32768,
'max' => 32767,
'max_length' => 7,
),
'instance_settings' => array(
'min' => '',
'max' => '',
'prefix' => '',
'suffix' => '',
),
'default_widget' => 'formatted_number',
'default_formatter' => 'formatted_number_integer',
),
'formatted_smallint_unsigned' => array(
'label' => t('Formatted small integer (unsigned)'),
'description' => t('Store a number in the database as a small unsigned integer (0 to 65535).'),
'settings' => array(
'min' => 0,
'max' => 65535,
'max_length' => 7,
),
'instance_settings' => array(
'min' => '',
'max' => '',
'prefix' => '',
'suffix' => '',
),
'default_widget' => 'formatted_number',
'default_formatter' => 'formatted_number_integer',
),
'formatted_mediumint' => array(
'label' => t('Formatted medium integer'),
'description' => t('Store a number in the database as a medium integer (-8388608 to 8388607)'),
'settings' => array(
'min' => -8388608,
'max' => 8388607,
'max_length' => 10,
),
'instance_settings' => array(
'min' => '',
'max' => '',
'prefix' => '',
'suffix' => '',
),
'default_widget' => 'formatted_number',
'default_formatter' => 'formatted_number_integer',
),
'formatted_mediumint_unsigned' => array(
'label' => t('Formatted medium integer (unsigned)'),
'description' => t('Store a number in the database as a medium unsigned integer (0 to 16777215).'),
'settings' => array(
'min' => 0,
'max' => 16777215,
'max_length' => 10,
),
'instance_settings' => array(
'min' => '',
'max' => '',
'prefix' => '',
'suffix' => '',
),
'default_widget' => 'formatted_number',
'default_formatter' => 'formatted_number_integer',
),
'formatted_integer' => array(
'label' => t('Formatted integer'),
'description' => t('Store a number in the database as an integer (-2147483648 to 2147483647).'),
'settings' => array(
'min' => -2147483648,
'max' => 2147483647,
'max_length' => 15,
),
'instance_settings' => array(
'min' => '',
'max' => '',
'prefix' => '',
'suffix' => '',
),
'default_widget' => 'formatted_number',
'default_formatter' => 'formatted_number_integer',
),
'formatted_integer_unsigned' => array(
'label' => t('Formatted integer (unsigned)'),
'description' => t('Store a number in the database as an unsigned integer (0 to 4294967295).'),
'settings' => array(
'min' => 0,
'max' => 4294967295,
'max_length' => 15,
),
'instance_settings' => array(
'min' => '',
'max' => '',
'prefix' => '',
'suffix' => '',
),
'default_widget' => 'formatted_number',
'default_formatter' => 'formatted_number_integer',
),
'formatted_decimal' => array(
'label' => t('Formatted decimal'),
'description' => t('Store a number in the database in a fixed decimal format.'),
'settings' => array(
'min' => '',
'max' => '',
'max_length' => 30,
'precision' => 10,
'scale' => 2,
),
'instance_settings' => array(
'min' => '',
'max' => '',
'prefix' => '',
'suffix' => '',
),
'default_widget' => 'formatted_number',
'default_formatter' => 'formatted_number_decimal',
),
'formatted_float' => array(
'label' => t('Formatted float'),
'description' => t('Store a number in the database in a floating point format.'),
'settings' => array(
'min' => '',
'max' => '',
'max_length' => 30,
),
'instance_settings' => array(
'min' => '',
'max' => '',
'prefix' => '',
'suffix' => '',
),
'default_widget' => 'formatted_number',
'default_formatter' => 'formatted_number_decimal',
),
);
}