You are here

function boolean_field_info in Boolean Field 7

Implements hook_field_info().

@todo Adding settings causes 'undefined index' notice until settings are saved.

1 call to boolean_field_info()
boolean_field_instance_settings_form in ./boolean.module
Implements hook_field_instance_settings_form().

File

./boolean.module, line 30
Defines boolean field type.

Code

function boolean_field_info() {
  return array(
    'number_boolean' => array(
      'label' => t('Boolean (3-states)'),
      'description' => t('This field stores simple on/off or yes/no options along with a not set state.'),
      'instance_settings' => array(
        'labels' => array(),
        'suppress_warning' => FALSE,
        'omit_strings' => FALSE,
        'none' => array(
          'prefix' => '',
          'suffix' => '',
        ),
        'false' => array(
          'prefix' => '',
          'suffix' => '',
        ),
        'true' => array(
          'prefix' => '',
          'suffix' => '',
        ),
      ),
      'default_widget' => 'boolean_checkbox',
      'default_formatter' => 'number_boolean',
      // For use with Entity API and Rules modules.
      'property_type' => 'number_boolean',
    ),
  );
}