You are here

function youtube_property_info_callback in YouTube Field 7

Callback to alter the property info of youtube fields.

See also

hook_field_info()

1 string reference to 'youtube_property_info_callback'
youtube_field_info in ./youtube.module
Implements hook_field_info().

File

./youtube.module, line 185

Code

function youtube_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<youtube>' : 'youtube';
  $property['getter callback'] = 'entity_metadata_field_verbatim_get';
  $property['setter callback'] = 'entity_metadata_field_verbatim_set';
  $property['property info'] = youtube_field_data_property_info();
  unset($property['query callback']);
}