id; } /** * Set name * * @param string $name * * @return Category */ public function setName($name) { $this->name = $name; return $this; } /** * Get name * * @return string */ public function getName() { return $this->name; } /** * Constructor */ public function __construct() { $this->books = new \Doctrine\Common\Collections\ArrayCollection(); } /** * Add book * * @param \AppBundle\Entity\Book $book * * @return Category */ public function addBook(\AppBundle\Entity\Book $book) { $this->books[] = $book; return $this; } /** * Remove book * * @param \AppBundle\Entity\Book $book */ public function removeBook(\AppBundle\Entity\Book $book) { $this->books->removeElement($book); } /** * Get books * * @return \Doctrine\Common\Collections\Collection */ public function getBooks() { return $this->books; } }