/**
* Create new editorial comment for Article
*
* @param string $commentContent
* @param Article $article
* @param User $user
* @param EditorialComment\null $parrentComment
*/
public function create($commentContent, Article $article, User $user, $parrentComment = null)
{
$editorialComment = new EditorialComment();
$editorialComment->setComment($commentContent);
$editorialComment->setUser($user);
$editorialComment->setArticle($article);
if ($parrentComment) {
$editorialComment->setParent($parrentComment);
}
$this->em->persist($editorialComment);
$this->em->flush();
return $editorialComment;
}