public function FeedsCommentProcessor::getMappingTargets in Feeds Comment Processor 7
Same name and namespace in other branches
- 6 FeedsCommentProcessor.inc \FeedsCommentProcessor::getMappingTargets()
File
- ./
FeedsCommentProcessor.inc, line 292 - Contains FeedsCommentProcessor.
Class
- FeedsCommentProcessor
- Creates comments from feed items.
Code
public function getMappingTargets() {
$targets = array(
'cid' => array(
'name' => t('Comment ID'),
'description' => t('The Drupal comment cid. NOTE: use this feature with care, comment ids are usually assigned by Drupal.'),
),
'pid' => array(
'name' => t('Parent ID'),
'description' => t('The cid to which this comment is a reply.'),
),
'pid_by_guid' => array(
'name' => t('Parent ID by GUID'),
'description' => t('The comment to which this comment is a reply, looked up by the GUID of a previous import.'),
),
'thread' => array(
'name' => t('Thread structure'),
'description' => t('The thread structure as kept by Drupal in van syntax.'),
),
'nid' => array(
'name' => t('Node ID'),
'description' => t('The nid to which this comment is a reply.'),
),
'nid_by_guid' => array(
'name' => t('Node ID by GUID'),
'description' => t('The node to which this comment is a reply, looked up by the GUID of a previous import.'),
),
'nid_by_title' => array(
'name' => t('Node ID by title'),
'description' => t('The node to which this comment is a reply, looked up by the title of the node.'),
),
'uid' => array(
'name' => t('User ID'),
'description' => t('The Drupal user ID of the comment author.'),
),
'user_name' => array(
'name' => t('Username'),
'description' => t('The Drupal username of the comment author.'),
),
'user_mail' => array(
'name' => t('User email'),
'description' => t('The email address of the comment author.'),
),
'subject' => array(
'name' => t('Title'),
'description' => t('The title of the comment.'),
),
'hostname' => array(
'name' => t('Hostname'),
'description' => t("The author's host name."),
),
'created' => array(
'name' => t('Published date'),
'description' => t('The time when a comment was saved.'),
),
'changed' => array(
'name' => t('Updated date'),
'description' => t('The time when a comment was updated.'),
),
'status' => array(
'name' => t('Published status'),
'description' => t('The published status of a comment. (0 = Not Published, 1 = Published)'),
),
'name' => array(
'name' => t('Name'),
'description' => t("The comment author's name."),
),
'mail' => array(
'name' => t('Email'),
'description' => t("The comment author's e-mail address."),
),
'homepage' => array(
'name' => t('Homepage'),
'description' => t("The comment author's home page address"),
),
) + parent::getMappingTargets();
// @todo Remove this at some point.
drupal_alter('feeds_comment_processor_targets', $targets);
// Detect modern version of Feeds.
if (method_exists($this, 'getHookTargets')) {
$this
->getHookTargets($targets);
}
else {
self::loadMappers();
$entity_type = $this
->entityType();
$bundle = $this
->bundle();
drupal_alter('feeds_processor_targets', $targets, $entity_type, $bundle);
}
return $targets;
}