/** * Add chapters * * @param \AppBundle\Entity\Chapter $chapters * @return Book */ public function addChapter(\AppBundle\Entity\Chapter $chapter) { $chapter->setBook($this); $this->chapters[] = $chapter; return $this; }