Ojs\JournalBundle\Entity\JournalPost::getId PHP 메소드

getId() 공개 메소드

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

Usage Example

예제 #1
0
 /**
  * Finds and displays a JournalPost entity.
  *
  * @param  JournalPost $journalPost
  * @return \Symfony\Component\HttpFoundation\Response
  */
 public function showAction(JournalPost $journalPost)
 {
     $journal = $this->get('ojs.journal_service')->getSelectedJournal();
     if (!$this->isGranted('VIEW', $journal, 'posts')) {
         throw new AccessDeniedException("You are not authorized for this post!");
     }
     $token = $this->get('security.csrf.token_manager')->refreshToken('ojs_journal_post' . $journalPost->getId());
     return $this->render('OjsJournalBundle:JournalPost:show.html.twig', ['entity' => $journalPost, 'token' => $token]);
 }