function list_field_info

Implements hook_field_info().

File

modules/field/modules/list/list.module, line 24

Code

function list_field_info() {
    return array(
        'list_integer' => array(
            'label' => t('List (integer)'),
            'description' => t("This field stores integer values from a list of allowed 'value => label' pairs, i.e. 'Lifetime in days': 1 => 1 day, 7 => 1 week, 31 => 1 month."),
            'settings' => array(
                'allowed_values' => array(),
                'allowed_values_function' => '',
            ),
            'default_widget' => 'options_select',
            'default_formatter' => 'list_default',
        ),
        'list_float' => array(
            'label' => t('List (float)'),
            'description' => t("This field stores float values from a list of allowed 'value => label' pairs, i.e. 'Fraction': 0 => 0, .25 => 1/4, .75 => 3/4, 1 => 1."),
            'settings' => array(
                'allowed_values' => array(),
                'allowed_values_function' => '',
            ),
            'default_widget' => 'options_select',
            'default_formatter' => 'list_default',
        ),
        'list_text' => array(
            'label' => t('List (text)'),
            'description' => t("This field stores text values from a list of allowed 'value => label' pairs, i.e. 'US States': IL => Illinois, IA => Iowa, IN => Indiana."),
            'settings' => array(
                'allowed_values' => array(),
                'allowed_values_function' => '',
            ),
            'default_widget' => 'options_select',
            'default_formatter' => 'list_default',
        ),
        'list_boolean' => array(
            'label' => t('Boolean'),
            'description' => t('This field stores simple on/off or yes/no options.'),
            'settings' => array(
                'allowed_values' => array(),
                'allowed_values_function' => '',
            ),
            'default_widget' => 'options_buttons',
            'default_formatter' => 'list_default',
        ),
    );
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.