You are here

function bat_event_state_reference_info_callback in Booking and Availability Management Tools for Drupal 7

Callback to alter the property info of State reference fields.

See also

bat_event_field_info().

1 string reference to 'bat_event_state_reference_info_callback'
bat_event_field_info in modules/bat_event/bat_event.module
Implements hook_field_info().

File

modules/bat_event/bat_event.module, line 1638
Manage Events - Events store the EventValue of a Unit over a period of time.

Code

function bat_event_state_reference_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<bat_event_state_reference>' : 'bat_event_state_reference';
  $property['getter callback'] = 'entity_metadata_field_verbatim_get';
  $property['setter callback'] = 'bat_event_state_entity_metadata_field_verbatim_set';
  $property['property info'] = bat_event_state_reference_field_data_property_info();
  unset($property['query callback']);
}