Ojs\JournalBundle\Entity\Article::getId PHP Method

getId() public method

Get id
public getId ( ) : integer
return integer
    public function getId()
    {
        return $this->id;
    }

Usage Example

Example #1
0
 /**
  * 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();
 }
All Usage Examples Of Ojs\JournalBundle\Entity\Article::getId