You are here

function physical_field_info in Physical Fields 7

Implements hook_field_info().

File

./physical.module, line 13
Defines fields (e.g. weight and dimensions) to support describing the physical attributes of entities.

Code

function physical_field_info() {
  return array(
    'physical_volume' => array(
      'label' => t('Physical volume'),
      'description' => t('This field stores the a physical volume and unit of measure.'),
      'settings' => array(),
      'instance_settings' => array(),
      'default_widget' => 'physical_volume_input',
      'default_formatter' => 'physical_volume_formatted',
      'property_type' => 'physical_volume',
      'property_callbacks' => array(
        'physical_volume_property_info_callback',
      ),
    ),
    'physical_weight' => array(
      'label' => t('Physical weight'),
      'description' => t('This field stores the a physical weight amount and unit of measure.'),
      'settings' => array(),
      'instance_settings' => array(),
      'default_widget' => 'physical_weight_textfield',
      'default_formatter' => 'physical_weight_formatted',
      'property_type' => 'physical_weight',
      'property_callbacks' => array(
        'physical_weight_property_info_callback',
      ),
    ),
    'physical_dimensions' => array(
      'label' => t('Physical dimensions'),
      'description' => t('This field stores a set of physical dimensions and unit of measure.'),
      'settings' => array(),
      'instance_settings' => array(),
      'default_widget' => 'physical_dimensions_textfields',
      'default_formatter' => 'physical_dimensions_formatted',
      'property_type' => 'physical_dimensions',
      'property_callbacks' => array(
        'physical_dimensions_property_info_callback',
      ),
    ),
  );
}