/** * Add comment * * @param \AppBundle\Entity\Comment $comment * * @return Book */ public function addComment(\AppBundle\Entity\Comment $comment) { $this->comments[] = $comment; $comment->setBook($this); return $this; }