Newscoop\Services\CommentService::updateComment PHP Method

updateComment() public method

Update comment
public updateComment ( Comment $comment, array $attributes ) : Comment
$comment Newscoop\Entity\Comment
$attributes array
return Newscoop\Entity\Comment
    public function updateComment($comment, $attributes)
    {
        $comment = $this->em->getRepository('Newscoop\\Entity\\Comment')->update($comment, $attributes);
        // save persisted comment object
        $this->em->flush();
        $cacheService = \Zend_Registry::get('container')->getService('newscoop.cache');
        $cacheService->clearNamespace('comment');
        return $comment;
    }