src/Entity/SystemeAdhesionGoal.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. * SystemeAdhesionGoal.
  9. *
  10. * @ORM\Table(name="SystemeAdhesionGoal")
  11. *
  12. * @ORM\Entity
  13. */
  14. class SystemeAdhesionGoal
  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\ManyToMany(targetEntity="Structure", mappedBy="systemeAdhesionGoal")
  34. */
  35. private $structures;
  36. /**
  37. * @ORM\OneToMany(targetEntity="FiltreStructure", mappedBy="systemeAdhesionGoal")
  38. */
  39. private $filtreStructures;
  40. /**
  41. * Get id.
  42. *
  43. * @return int
  44. */
  45. public function getId()
  46. {
  47. return $this->id;
  48. }
  49. /**
  50. * Set nom.
  51. *
  52. * @param string $nom
  53. *
  54. * @return AdherentAutreFederation
  55. */
  56. public function setNom($nom): static
  57. {
  58. $this->nom = $nom;
  59. return $this;
  60. }
  61. /**
  62. * Get nom.
  63. *
  64. * @return string
  65. */
  66. public function getNom()
  67. {
  68. return $this->nom;
  69. }
  70. /**
  71. * Methode pour afficher le nom.
  72. */
  73. #[\Override]
  74. public function __toString(): string
  75. {
  76. return $this->getNom();
  77. }
  78. /**
  79. * Constructor.
  80. */
  81. public function __construct()
  82. {
  83. $this->structures = new \Doctrine\Common\Collections\ArrayCollection();
  84. $this->filtreStructures = new ArrayCollection();
  85. }
  86. /**
  87. * Add structures.
  88. *
  89. * @return AdherentAutreFederation
  90. */
  91. public function addStructure(Structure $structures): static
  92. {
  93. $this->structures[] = $structures;
  94. return $this;
  95. }
  96. /**
  97. * Remove structures.
  98. */
  99. public function removeStructure(Structure $structures): void
  100. {
  101. $this->structures->removeElement($structures);
  102. }
  103. /**
  104. * Get structures.
  105. *
  106. * @return \Doctrine\Common\Collections\Collection
  107. */
  108. public function getStructures()
  109. {
  110. return $this->structures;
  111. }
  112. /**
  113. * Add filtreStructures.
  114. *
  115. * @return AdherentAutreFederation
  116. */
  117. public function addFiltreStructure(FiltreStructure $filtreStructures): static
  118. {
  119. $this->filtreStructures[] = $filtreStructures;
  120. return $this;
  121. }
  122. /**
  123. * Remove filtreStructures.
  124. */
  125. public function removeFiltreStructure(FiltreStructure $filtreStructures): void
  126. {
  127. $this->filtreStructures->removeElement($filtreStructures);
  128. }
  129. /**
  130. * Get filtreStructures.
  131. *
  132. * @return \Doctrine\Common\Collections\Collection
  133. */
  134. public function getFiltreStructures()
  135. {
  136. return $this->filtreStructures;
  137. }
  138. }