You are here

function getlocations_fields_entity_getlocations_fields_property_callback in Get Locations 7.2

Same name and namespace in other branches
  1. 7 modules/getlocations_fields_entity/getlocations_fields_entity.module \getlocations_fields_entity_getlocations_fields_property_callback()

Property callback for getlocations fields.

1 string reference to 'getlocations_fields_entity_getlocations_fields_property_callback'
getlocations_fields_entity_field_info_alter in modules/getlocations_fields_entity/getlocations_fields_entity.module
Implements hook_field_info_alter().

File

modules/getlocations_fields_entity/getlocations_fields_entity.module, line 25
getlocations_fields_entity.module @author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL

Code

function getlocations_fields_entity_getlocations_fields_property_callback(&$info, $entity_type, $field, $instance, $field_type) {
  $property =& $info[$entity_type]['bundles'][$instance['bundle']]['properties'][$field['field_name']];
  $property['getter callback'] = 'entity_metadata_field_verbatim_get';
  $property['setter callback'] = 'entity_metadata_field_verbatim_set';
  foreach (getlocations_fields_entity_key_map() as $key => $item) {
    $property['property info'][$key] = array(
      'type' => $item['type'],
      'label' => $item['label'],
      'description' => $item['description'],
      'getter callback' => 'entity_property_verbatim_get',
      'setter callback' => 'entity_property_verbatim_set',
    );
  }
  unset($property['query callback']);
}