You are here

function geofield_set_target_simple in Geofield 7

Same name and namespace in other branches
  1. 7.2 geofield.feeds.inc \geofield_set_target_simple()

Example callback specified in hook_feeds_processor_targets_alter().

Parameters

$source: Field mapper source settings.

$entity: An entity object, for instance a node object.

$target: A string identifying the target on the node.

$value: The value to populate the target with.

1 string reference to 'geofield_set_target_simple'
geofield_feeds_processor_targets_alter in ./geofield.feeds.inc
Implements hook_feeds_node_processor_targets_alter().

File

./geofield.feeds.inc, line 132
Provides integration with Feeds module (http://drupal.org/project/feeds)

Code

function geofield_set_target_simple($source, $entity, $target, $value) {
  list($field_name, $sub_field) = explode(':', $target, 2);
  $entity->{$field_name}['und'][0][$sub_field] = $value;
}