You are here

function blockreference_feeds_processor_targets_alter in Block reference 7.2

Implements hook_feeds_processor_targets_alter().

See also

FeedsNodeProcessor::getMappingTargets()

File

./blockreference.feeds.inc, line 8

Code

function blockreference_feeds_processor_targets_alter(&$targets, $entity_type, $bundle_name) {
  foreach (field_info_instances($entity_type, $bundle_name) as $name => $instance) {
    $info = field_info_field($name);
    if ($info['type'] == 'blockreference') {
      $targets[$name . ':moddelta'] = array(
        'name' => check_plain($instance['label']) . ' (moddelta)',
        'callback' => 'blockreference_feeds_set_target',
        'description' => t('The field instance @label of @field_name matched by moddelta.', array(
          '@label' => $instance['label'],
          '@field_name' => $name,
        )),
        'real_target' => $name,
      );
    }
  }
}