function physical_weight_field_data_property_info in Physical Fields 7
Defines info for the properties of the Weight field data structure.
1 call to physical_weight_field_data_property_info()
- physical_weight_property_info_callback in ./
physical.module - Callback to alter the property info of weight fields.
File
- ./
physical.module, line 1060 - Defines fields (e.g. weight and dimensions) to support describing the physical attributes of entities.
Code
function physical_weight_field_data_property_info($name = NULL) {
return array(
'weight' => array(
'label' => t('Weight'),
'description' => !empty($name) ? t('Weight 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_weight_unit_options',
),
);
}