Untitled


SUBMITTED BY: antoineh1

DATE: May 8, 2016, 2:11 p.m.

FORMAT: Text only

SIZE: 2.1 kB

HITS: 4795

  1. <?php
  2. namespace Pfe\CometaBundle\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5. * Categorie
  6. *
  7. * @ORM\Table()
  8. * @ORM\Entity(repositoryClass="Pfe\CometaBundle\Entity\CategorieRepository")
  9. */
  10. class Categorie
  11. {
  12. /**
  13. * @var integer
  14. *
  15. * @ORM\Column(name="id", type="integer")
  16. * @ORM\Id
  17. * @ORM\GeneratedValue(strategy="AUTO")
  18. */
  19. private $id;
  20. /**
  21. * @var string
  22. *
  23. * @ORM\Column(name="libelle_categorie", type="string", length=255)
  24. */
  25. private $libelleCategorie;
  26. /**
  27. *@ORM\OneToMany(targetEntity="Produit", mappedBy="Categorie")
  28. */
  29. private $produits;
  30. public function __construct()
  31. {
  32. $this->produits= new \Doctrine\Common\Collections\ArrayCollection();
  33. }
  34. /**
  35. * Get id
  36. *
  37. * @return integer
  38. */
  39. public function getId()
  40. {
  41. return $this->id;
  42. }
  43. /**
  44. * Set libelleCategorie
  45. *
  46. * @param string $libelleCategorie
  47. * @return Categorie
  48. */
  49. public function setLibelleCategorie($libelleCategorie)
  50. {
  51. $this->libelleCategorie = $libelleCategorie;
  52. return $this;
  53. }
  54. /**
  55. * Get libelleCategorie
  56. *
  57. * @return string
  58. */
  59. public function getLibelleCategorie()
  60. {
  61. return $this->libelleCategorie;
  62. }
  63. /**
  64. * Add produits
  65. *
  66. * @param \Pfe\CometaBundle\Entity\Produit $produits
  67. * @return Categorie
  68. */
  69. public function addProduit(\Pfe\CometaBundle\Entity\Produit $produits)
  70. {
  71. $this->produits[] = $produits;
  72. return $this;
  73. }
  74. /**
  75. * Remove produits
  76. *
  77. * @param \Pfe\CometaBundle\Entity\Produit $produits
  78. */
  79. public function removeProduit(\Pfe\CometaBundle\Entity\Produit $produits)
  80. {
  81. $this->produits->removeElement($produits);
  82. }
  83. /**
  84. * Get produits
  85. *
  86. * @return \Doctrine\Common\Collections\Collection
  87. */
  88. public function getProduits()
  89. {
  90. return $this->produits;
  91. }
  92. }

comments powered by Disqus