You are here

function bat_options_property_info_callback in Booking and Availability Management Tools for Drupal 7

Property callback for the Entity Metadata framework.

1 string reference to 'bat_options_property_info_callback'
bat_options_field_info in modules/bat_options/bat_options.module
Implements hook_field_info().

File

modules/bat_options/bat_options.module, line 61

Code

function bat_options_property_info_callback(&$info, $entity_type, $field, $instance, $field_type) {

  // Apply the default.
  entity_metadata_field_default_property_callback($info, $entity_type, $field, $instance, $field_type);

  // Finally add in instance specific property info.
  $name = $field['field_name'];
  $property =& $info[$entity_type]['bundles'][$instance['bundle']]['properties'][$name];
  $property['type'] = $field['cardinality'] != 1 ? 'list<bat_options>' : 'bat_options';
  $property['property info'] = bat_options_data_property_info('Type options');
  $property['getter callback'] = 'entity_metadata_field_verbatim_get';
  $property['setter callback'] = 'entity_metadata_field_verbatim_set';
}