You are here

public function FeedsCommentProcessor::setTargetElement in Feeds Comment Processor 6

Same name and namespace in other branches
  1. 7 FeedsCommentProcessor.inc \FeedsCommentProcessor::setTargetElement()

Override setTargetElement to operate on a target item that is a comment.

Overrides FeedsProcessor::setTargetElement

File

./FeedsCommentProcessor.inc, line 234
Class definition of FeedsCommentProcessor.

Class

FeedsCommentProcessor
Creates comments from feed items.

Code

public function setTargetElement($target_comment, $target_element, $value) {
  if (in_array($target_element, array(
    'guid',
  ))) {
    $target_comment->feeds_comment_item->{$target_element} = $value;
  }
  elseif (array_key_exists($target_element, $this
    ->getMappingTargets())) {
    $target_comment->{$target_element} = $value;
  }
}