src/JuridicusBundle/Entity/Bundesland.php line 16

Open in your IDE?
  1. <?php
  2. namespace JF\JuridicusBundle\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Symfony\Component\Validator\Constraints as Assert;
  5. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  6. use Doctrine\Common\Collections\ArrayCollection;
  7. /**
  8. * Bundesland
  9. *
  10. * @ORM\Entity
  11. * @UniqueEntity("name")
  12. */
  13. class Bundesland
  14. {
  15. const CLASSNAME = __CLASS__;
  16. /**
  17. * @var integer
  18. */
  19. private $id;
  20. /**
  21. * @Assert\NotNull()
  22. *
  23. * @var string
  24. */
  25. private $name;
  26. /**
  27. * @Assert\NotNull()
  28. *
  29. * @var string
  30. */
  31. private $kuerzel;
  32. /**
  33. * @var string
  34. */
  35. private $slug;
  36. /**
  37. * @var \Doctrine\Common\Collections\Collection
  38. */
  39. private $kunden;
  40. /**
  41. * @var \Doctrine\Common\Collections\Collection
  42. */
  43. private $pruefungsaemter;
  44. /**
  45. * Constructor
  46. */
  47. public function __construct()
  48. {
  49. $this->kunden = new ArrayCollection();
  50. $this->pruefungsaemter = new ArrayCollection();
  51. }
  52. /**
  53. * Get id
  54. *
  55. * @return integer
  56. */
  57. public function getId()
  58. {
  59. return $this->id;
  60. }
  61. /**
  62. * Set name
  63. *
  64. * @param string $name
  65. * @return Bundesland
  66. */
  67. public function setName($name)
  68. {
  69. $this->name = $name;
  70. return $this;
  71. }
  72. /**
  73. * Get name
  74. *
  75. * @return string
  76. */
  77. public function getName()
  78. {
  79. return $this->name;
  80. }
  81. /**
  82. * Set kuerzel
  83. *
  84. * @param string $kuerzel
  85. * @return Bundesland
  86. */
  87. public function setKuerzel($kuerzel)
  88. {
  89. $this->kuerzel = $kuerzel;
  90. return $this;
  91. }
  92. /**
  93. * Get kuerzel
  94. *
  95. * @return string
  96. */
  97. public function getKuerzel()
  98. {
  99. return $this->kuerzel;
  100. }
  101. /**
  102. * Set slug
  103. *
  104. * @param string $slug
  105. * @return Bundesland
  106. */
  107. public function setSlug($slug)
  108. {
  109. $this->slug = $slug;
  110. return $this;
  111. }
  112. /**
  113. * Get slug
  114. *
  115. * @return string
  116. */
  117. public function getSlug()
  118. {
  119. return $this->slug;
  120. }
  121. /**
  122. * Add kunden [INVERSE SITE]
  123. *
  124. * @param \JF\JuridicusBundle\Entity\Kunde $kunden
  125. * @return Bundesland
  126. */
  127. public function addKunden(Kunde $kunden)
  128. {
  129. $this->kunden[] = $kunden;
  130. return $this;
  131. }
  132. /**
  133. * Remove kunden [INVERSE SITE]
  134. *
  135. * @param \JF\JuridicusBundle\Entity\Kunde $kunden
  136. */
  137. public function removeKunden(Kunde $kunden)
  138. {
  139. $this->kunden->removeElement($kunden);
  140. }
  141. /**
  142. * Get kunden
  143. *
  144. * @return \Doctrine\Common\Collections\Collection
  145. */
  146. public function getKunden()
  147. {
  148. return $this->kunden;
  149. }
  150. /**
  151. * Add pruefungsaemter [INVERSE SITE]
  152. *
  153. * @param \JF\JuridicusBundle\Entity\Pruefungsamt $pruefungsaemter
  154. * @return Bundesland
  155. */
  156. public function addPruefungsaemter(Pruefungsamt $pruefungsaemter)
  157. {
  158. $this->pruefungsaemter[] = $pruefungsaemter;
  159. return $this;
  160. }
  161. /**
  162. * Remove pruefungsaemter [INVERSE SITE]
  163. *
  164. * @param \JF\JuridicusBundle\Entity\Pruefungsamt $pruefungsaemter
  165. */
  166. public function removePruefungsaemter(Pruefungsamt $pruefungsaemter)
  167. {
  168. $this->pruefungsaemter->removeElement($pruefungsaemter);
  169. }
  170. /**
  171. * Get pruefungsaemter
  172. *
  173. * @return \Doctrine\Common\Collections\Collection
  174. */
  175. public function getPruefungsaemter()
  176. {
  177. return $this->pruefungsaemter;
  178. }
  179. /**
  180. * String Representation
  181. *
  182. * @return string
  183. */
  184. public function __toString()
  185. {
  186. return $this->getName();
  187. }
  188. }