Advertisement
Guest User

Untitled

a guest
Jan 30th, 2015
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.61 KB | None | 0 0
  1. <?php
  2. namespace Contenu\ContenuBundle\Entity;
  3.  
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6. * Categories
  7. *
  8. * @ORM\Table("categories")
  9. * @ORM\Entity(repositoryClass="Contenu\ContenuBundle\Repository\CategoriesRepository")
  10. */
  11. class Categories
  12. {
  13. /**
  14. * @var integer
  15. *
  16. * @ORM\Column(name="id", type="integer")
  17. * @ORM\Id
  18. * @ORM\GeneratedValue(strategy="AUTO")
  19. */
  20. private $id;
  21. /**
  22. * @ORM\OneToOne(targetEntity="Contenu\ContenuBundle\Entity\Media", cascade={"persist","remove"})
  23. * @ORM\JoinColumn(nullable=false)
  24. */
  25. private $image;
  26.  
  27. /**
  28. * @var string
  29. *
  30. * @ORM\Column(name="nom", type="string", length=125)
  31. */
  32. private $nom;
  33. /**
  34. * Get id
  35. *
  36. * @return integer
  37. */
  38. public function getId()
  39. {
  40. return $this->id;
  41. }
  42. /**
  43. * Set nom
  44. *
  45. * @param string $nom
  46. * @return Categories
  47. */
  48. public function setNom($nom)
  49. {
  50. $this->nom = $nom;
  51. return $this;
  52. }
  53. /**
  54. * Get nom
  55. *
  56. * @return string
  57. */
  58. public function getNom()
  59. {
  60. return $this->nom;
  61. }
  62. /**
  63. * Set image
  64. *
  65. * @param \Contenu\ContenuBundle\Entity\Media $image
  66. * @return Categories
  67. */
  68. public function setImage(\Contenu\ContenuBundle\Entity\Media $image)
  69. {
  70. $this->image = $image;
  71. return $this;
  72. }
  73. /**
  74. * Get image
  75. *
  76. * @return \Contenu\ContenuBundle\Entity\Media
  77. */
  78. public function getImage()
  79. {
  80. return $this->image;
  81. }
  82.  
  83. public function __toString()
  84. {
  85. return $this->getNom();
  86. }
  87. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement