function range_metadata_field_range_callback in Range 7
Defines properties for range field.
See also
entity_metadata_field_entity_property_info()
1 string reference to 'range_metadata_field_range_callback'
- range_field_info in ./
range.module - Implements hook_field_info().
File
- ./
range.module, line 767 - Defines range field types.
Code
function range_metadata_field_range_callback(&$info, $entity_type, $field, $instance, $field_type) {
$property =& $info[$entity_type]['bundles'][$instance['bundle']]['properties'][$field['field_name']];
// Define a data structure so it's possible to deal with files and their
// descriptions.
$property['getter callback'] = 'entity_metadata_field_verbatim_get';
$property['setter callback'] = 'entity_metadata_field_verbatim_set';
// Auto-create the field $items as soon as a property is set.
$property['auto creation'] = 'entity_property_create_array';
$property['property info'] = range_property_field_item_range_info($field);
unset($property['query callback']);
}