You are here

function physical_volume_field_data_property_info in Physical Fields 7

Defines info for the properties of the volume field data structure.

1 call to physical_volume_field_data_property_info()
physical_volume_property_info_callback in ./physical.module
Callback to alter the property info of volume fields.

File

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

Code

function physical_volume_field_data_property_info($name = NULL) {
  return array(
    'volume' => array(
      'label' => t('Volume'),
      'description' => !empty($name) ? t('Volume value of field %name', array(
        '%name' => $name,
      )) : '',
      'type' => 'decimal',
      'getter callback' => 'entity_property_verbatim_get',
      'setter callback' => 'entity_property_verbatim_set',
    ),
    'unit' => array(
      'label' => t('Unit of measurement'),
      'description' => !empty($name) ? t('Unit of measurement of field %name', array(
        '%name' => $name,
      )) : '',
      'type' => 'text',
      'getter callback' => 'entity_property_verbatim_get',
      'setter callback' => 'entity_property_verbatim_set',
      'options list' => 'physical_volume_unit_options',
    ),
  );
}