function geolocation_property_info_callback in Geolocation Field 7
Callback to alter the property info of geolocation fields.
See also
1 string reference to 'geolocation_property_info_callback'
- geolocation_field_info in ./
geolocation.module - Implements hook_field_info().
File
- ./
geolocation.module, line 29 - A geolocation field using the Field API.
Code
function geolocation_property_info_callback(&$info, $entity_type, $field, $instance, $field_type) {
$name = $field['field_name'];
$property =& $info[$entity_type]['bundles'][$instance['bundle']]['properties'][$name];
$property['type'] = $field['cardinality'] != 1 ? 'list<geolocation>' : 'geolocation';
$property['getter callback'] = 'entity_metadata_field_verbatim_get';
$property['setter callback'] = 'entity_metadata_field_verbatim_set';
$property['property info'] = geolocation_data_property_info();
unset($property['query callback']);
}