function physical_dimensions_field_data_property_info in Physical Fields 7
Defines info for the properties of the Dimensions field data structure.
1 call to physical_dimensions_field_data_property_info()
- physical_dimensions_property_info_callback in ./
physical.module - Callback to alter the property info of Dimensions fields.
File
- ./
physical.module, line 1345 - Defines fields (e.g. weight and dimensions) to support describing the physical attributes of entities.
Code
function physical_dimensions_field_data_property_info($name = NULL) {
return array(
'length' => array(
'label' => t('Length'),
'description' => !empty($name) ? t('Length value of field %name', array(
'%name' => $name,
)) : '',
'type' => 'decimal',
'getter callback' => 'entity_property_verbatim_get',
'setter callback' => 'entity_property_verbatim_set',
),
'width' => array(
'label' => t('Width'),
'description' => !empty($name) ? t('Width value of field %name', array(
'%name' => $name,
)) : '',
'type' => 'decimal',
'getter callback' => 'entity_property_verbatim_get',
'setter callback' => 'entity_property_verbatim_set',
),
'height' => array(
'label' => t('Height'),
'description' => !empty($name) ? t('Height 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_dimensions_unit_options',
),
);
}