You are here

function field_collection_entity_metadata_property_callback in Field collection 7

Callback for generating entity metadata property info for our field instances.

See also

field_collection_field_info()

1 string reference to 'field_collection_entity_metadata_property_callback'
field_collection_field_info in ./field_collection.module
Implements hook_field_info().

File

./field_collection.module, line 1983
Module implementing field collection field type.

Code

function field_collection_entity_metadata_property_callback(&$info, $entity_type, $field, $instance, $field_type) {
  $property =& $info[$entity_type]['bundles'][$instance['bundle']]['properties'][$field['field_name']];

  // Set the bundle as we know it is the name of the field.
  $property['bundle'] = $field['field_name'];
  $property['getter callback'] = 'field_collection_field_property_get';
  $property['setter callback'] = 'field_collection_field_property_set';
}