You are here

function commerce_price_table_property_info_callback in Commerce Price Table 7

Callback to alter the property info of price fields.

See also

commerce_price_field_info().

1 string reference to 'commerce_price_table_property_info_callback'
commerce_price_table_field_info in ./commerce_price_table.module
Implements hook_field_info().

File

./commerce_price_table.module, line 263

Code

function commerce_price_table_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<commerce_price_table>' : 'commerce_price_table';
  $property['getter callback'] = 'entity_metadata_field_verbatim_get';
  $property['setter callback'] = 'entity_metadata_field_verbatim_set';
  $property['auto creation'] = 'commerce_price_field_data_auto_creation';
  $property['property info'] = commerce_price_table_field_data_property_info();
  unset($property['query callback']);
}