src/Entity/AdherentAutreFederation.php line 18

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Entity;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8. * AdherentAutreFederation.
  9. *
  10. * @ORM\Table(name="AdherentAutreFederation")
  11. *
  12. * @ORM\Entity
  13. */
  14. class AdherentAutreFederation
  15. {
  16. /**
  17. * @var int
  18. *
  19. * @ORM\Column(name="id", type="integer")
  20. *
  21. * @ORM\Id
  22. *
  23. * @ORM\GeneratedValue(strategy="AUTO")
  24. */
  25. private $id;
  26. /**
  27. * @var string
  28. *
  29. * @ORM\Column(name="nom", type="string", length=255)
  30. */
  31. private $nom;
  32. /**
  33. * @ORM\OneToMany(targetEntity="Structure", mappedBy="adherentAutreFederation")
  34. */
  35. private $structures;
  36. /**
  37. * @ORM\ManyToMany(targetEntity="Structure", mappedBy="adherentAutreFederation2")
  38. */
  39. private $structures2;
  40. /**
  41. * @ORM\OneToMany(targetEntity="FiltreStructure", mappedBy="adherentAutreFederation")
  42. */
  43. private $filtreStructures;
  44. /**
  45. * Get id.
  46. *
  47. * @return int
  48. */
  49. public function getId()
  50. {
  51. return $this->id;
  52. }
  53. /**
  54. * Set nom.
  55. *
  56. * @param string $nom
  57. */
  58. public function setNom($nom): static
  59. {
  60. $this->nom = $nom;
  61. return $this;
  62. }
  63. /**
  64. * Get nom.
  65. *
  66. * @return string
  67. */
  68. public function getNom()
  69. {
  70. return $this->nom;
  71. }
  72. /**
  73. * Methode pour afficher le nom.
  74. */
  75. #[\Override]
  76. public function __toString(): string
  77. {
  78. return $this->getNom();
  79. }
  80. /**
  81. * Constructor.
  82. */
  83. public function __construct()
  84. {
  85. $this->structures = new \Doctrine\Common\Collections\ArrayCollection();
  86. $this->structures2 = new ArrayCollection();
  87. $this->filtreStructures = new ArrayCollection();
  88. }
  89. /**
  90. * Add structures.
  91. */
  92. public function addStructure(Structure $structures): static
  93. {
  94. $this->structures[] = $structures;
  95. return $this;
  96. }
  97. /**
  98. * Remove structures.
  99. */
  100. public function removeStructure(Structure $structures): void
  101. {
  102. $this->structures->removeElement($structures);
  103. }
  104. /**
  105. * Get structures.
  106. *
  107. * @return \Doctrine\Common\Collections\Collection
  108. */
  109. public function getStructures()
  110. {
  111. return $this->structures;
  112. }
  113. /**
  114. * Add filtreStructures.
  115. */
  116. public function addFiltreStructure(FiltreStructure $filtreStructures): static
  117. {
  118. $this->filtreStructures[] = $filtreStructures;
  119. return $this;
  120. }
  121. /**
  122. * Remove filtreStructures.
  123. */
  124. public function removeFiltreStructure(FiltreStructure $filtreStructures): void
  125. {
  126. $this->filtreStructures->removeElement($filtreStructures);
  127. }
  128. /**
  129. * Get filtreStructures.
  130. *
  131. * @return \Doctrine\Common\Collections\Collection
  132. */
  133. public function getFiltreStructures()
  134. {
  135. return $this->filtreStructures;
  136. }
  137. /**
  138. * Add structures2.
  139. */
  140. public function addStructures2(Structure $structures2): static
  141. {
  142. $this->structures2[] = $structures2;
  143. return $this;
  144. }
  145. /**
  146. * Remove structures2.
  147. */
  148. public function removeStructures2(Structure $structures2): void
  149. {
  150. $this->structures2->removeElement($structures2);
  151. }
  152. /**
  153. * Get structures2.
  154. *
  155. * @return \Doctrine\Common\Collections\Collection
  156. */
  157. public function getStructures2()
  158. {
  159. return $this->structures2;
  160. }
  161. }