/**
* article view event log
* @param Request $request
* @param $article
*/
private function articleViewLog(Request $request, Article $article)
{
$entity = new ArticleEventLog();
$em = $this->getDoctrine()->getManager();
$entity->setArticleId($article->getId());
$entity->setEventInfo(ArticleEventLogParams::$ARTICLE_VIEW);
$entity->setIp($request->getClientIp());
$em->persist($entity);
$em->flush();
}