function field_extract_entityreference_extract in Field Extract Values 7
1 string reference to 'field_extract_entityreference_extract'
- field_extract_entityreference_info in includes/
entityreference.inc - @file field_extract support for date field
File
- includes/
entityreference.inc, line 19 - field_extract support for date field
Code
function field_extract_entityreference_extract($item, $options = array()) {
$entity_type = $options['field_info']['settings']['target_type'];
$entity = reset(entity_load($entity_type, array(
$item[$options['key']],
)));
$entity->entity_type = $entity_type;
return $entity;
}