2 code examples of PHP Oro\Bundle\CaseBundle\Entity\CaseComment extracted from open source projects
public function addComment(CaseComment $comment): self
{
$this->comments->add($comment);
$comment->setCase($this);
return $this;
}
protected function syncCaseCommentFields(CaseComment $caseComment, TicketComment $ticketComment)
{
$caseComment->setPublic($ticketComment->getPublic());
if ($ticketComment->getOriginCreatedAt()) {
$caseComment->setCreatedAt($ticketComment->getOriginCreatedAt());
}
$caseComment->setMessage($ticketComment->getBody());
$this->syncCaseCommentOwnerAndUser($caseComment, $ticketComment);
}