You are here

function physical_dimensions_property_info_callback in Physical Fields 7

Callback to alter the property info of Dimensions fields.

See also

physical_field_info().

1 string reference to 'physical_dimensions_property_info_callback'
physical_field_info in ./physical.module
Implements hook_field_info().

File

./physical.module, line 1321
Defines fields (e.g. weight and dimensions) to support describing the physical attributes of entities.

Code

function physical_dimensions_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<physical_dimensions>' : 'physical_dimensions';
  $property['getter callback'] = 'entity_metadata_field_verbatim_get';
  $property['setter callback'] = 'entity_metadata_field_verbatim_set';
  $property['auto creation'] = 'physical_dimensions_field_data_auto_creation';
  $property['property info'] = physical_dimensions_field_data_property_info();
  unset($property['query callback']);
}