public function FeedsFieldCollectionProcessor::getMappingTargets in Field collection feeds 7
Return available mapping targets.
File
- plugins/
FeedsFieldCollectionProcessor.inc, line 194 - Class definition of FeedsFieldCollectionProcessor.
Class
- FeedsFieldCollectionProcessor
- Creates field collection from feed items.
Code
public function getMappingTargets() {
$targets = parent::getMappingTargets();
// Add general GUID target
$targets['guid'] = array(
'name' => t('GUID'),
'description' => t('The globally unique identifier of the item. E. g. the feed item GUID in the case of a syndication feed. May be unique.'),
'optional_unique' => TRUE,
);
// Add hostEntity GUID target
$targets['host_entity_guid'] = array(
'name' => t('Host Entity GUID'),
'description' => t('The globally unique identifier of the host entity. Must be unique. We used this value to fetch hostEntityId.'),
);
// Add identifier field target
$targets['identifier_field'] = array(
'name' => t('Identifier Field'),
'description' => t("The field collection item's identifier field within host entity. We used this value to fetch item id."),
);
$targets['item_id'] = array(
'name' => t('Item ID'),
'description' => t('The item id of the field collection. NOTE: use this feature with care, field collection item ids are usually assigned by Drupal.'),
'optional_unique' => TRUE,
);
// Let other modules expose mapping targets.
self::loadMappers();
$entity_type = $this
->entityType();
$bundle = $this->config['field_name'];
drupal_alter('feeds_processor_targets', $targets, $entity_type, $bundle);
return $targets;
}