You are here

function fraction_property_info_callback in Fraction 7

Callback to alter the property info of fraction fields.

See also

fraction_field_info().

1 string reference to 'fraction_property_info_callback'
fraction_field_info in ./fraction.field.inc
Implements of hook_field_info().

File

./fraction.field.inc, line 32
Fraction Field API functions

Code

function fraction_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<field_item_fraction>' : 'field_item_fraction';
  $property['getter callback'] = 'entity_metadata_field_verbatim_get';
  $property['setter callback'] = 'entity_metadata_field_verbatim_set';
  $property['auto creation'] = 'fraction_default_values';
  $property['property info'] = fraction_data_property_info();
  unset($property['query callback']);
}