AppBundle\Entity\Book::getId PHP Method

getId() public method

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

Usage Example

 /**
  * @Method("GET")
  * @Route("books/{id}", name="book_detail")
  */
 public function getAction(Book $book)
 {
     $comments = $this->getRepository("AppBundle:BookComment")->getCommentsForBook($book->getId());
     return $this->render('book/detail.html.twig', ['book' => $book, 'comments' => $comments]);
 }
All Usage Examples Of AppBundle\Entity\Book::getId