You are here

function getlocations_feeds_feeds_processor_targets_alter in Get Locations 7

Same name and namespace in other branches
  1. 7.2 modules/getlocations_feeds/getlocations_feeds.module \getlocations_feeds_feeds_processor_targets_alter()

Implements hook_feeds_processor_targets_alter().

Alter mapping targets for entities. Use this hook to add additional target options to the mapping form of Node processors.

If the key in $targets[] does not correspond to the actual key on the node object ($node->key), real_target MUST be specified. See mappers/link.inc

For an example implementation, see mappers/content.inc

Parameters

&$targets: Array containing the targets to be offered to the user. Add to this array to expose additional options. Remove from this array to suppress options. Remove with caution.

$entity_type: The entity type of the target, for instance a 'node' entity.

$bundle_name: The bundle name for which to alter targets.

File

modules/getlocations_feeds/getlocations_feeds.module, line 36
getlocations_feeds.module @author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL

Code

function getlocations_feeds_feeds_processor_targets_alter(&$targets, $entity_type, $bundle_name) {
  $fields = field_read_fields(array(
    'module' => 'getlocations_fields',
  ));
  $location_fields = _getlocations_feeds_fields();
  foreach ($fields as $field_name => $field) {
    _getlocations_feeds_fill_targets($targets, 'getlocations_fields', $field_name, $location_fields);
  }
}