function mvf_property_info_callback in Measured Value Field 7
Callback to alter the property info of mvf field.
See also
1 string reference to 'mvf_property_info_callback'
- mvf_field_info in ./
mvf.module - Implements hook_field_info().
File
- ./
mvf.module, line 145 - Define a field type of measured value.
Code
function mvf_property_info_callback(&$info, $entity_type, $field, $instance, $field_type) {
$name = $field['field_name'];
$property =& $info[$entity_type]['bundles'][$instance['bundle']]['properties'][$name];
// We will expand the structure with additional properties for extracting
// converted value. Since the possible targets of unit conversions depend on
// conditions of a specific MVF field, we will populate that data through
// 'property info alter' on-the-fly.
$property['property info alter'] = 'mvf_property_info_alter';
$property['getter callback'] = 'entity_metadata_field_verbatim_get';
$property['setter callback'] = 'entity_metadata_field_verbatim_set';
$property['property info'] = mvf_data_property_info();
unset($property['query callback']);
}