function data_entity_feeds_processor_targets_alter in Data 7
Implements hook_feeds_processor_targets_alter().
See also
data_entity_feed_unique_callback()
File
- data_entity/
data_entity.module, line 251 - data_entity.module TODO: Enter file description here.
Code
function data_entity_feeds_processor_targets_alter(&$targets, $entity_type, $bundle_name) {
// Get the information about this entity.
$entity_info = entity_get_info($entity_type);
// See if this is a Data entity.
if (isset($entity_info['module']) && $entity_info['module'] == 'data_entity') {
// Add a unique callback for each target field.
foreach ($targets as &$target) {
$target['unique_callbacks'][] = 'data_entity_feed_unique_callback';
$target['bundle_name'] = $bundle_name;
$target['optional_unique'] = TRUE;
}
}
}