/** * Create Comment command for update action * @param Comment $comment * @return CommentCommand */ public function createCommentCommandForUpdate(Comment $comment) { $command = new CommentCommand(); $command->id = $comment->getId(); $command->content = $comment->getContent(); $command->author = (string) $comment->getAuthor(); $command->ticket = $comment->getTicket()->getId(); $command->attachmentList = $comment->getAttachments(); $command->ticketStatus = $comment->getTicket()->getStatus()->getValue(); $command->private = $comment->isPrivate(); return $command; }