Organization.php 51 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894
  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Entity\Organization;
  4. use ApiPlatform\Core\Annotation\ApiResource;
  5. use ApiPlatform\Core\Annotation\ApiSubresource;
  6. use App\Entity\Access\Access;
  7. use App\Entity\Billing\BillingSetting;
  8. use App\Entity\Booking\Attendance;
  9. use App\Entity\Booking\Course;
  10. use App\Entity\Booking\EducationalProject;
  11. use App\Entity\Booking\Event;
  12. use App\Entity\Booking\Examen;
  13. use App\Entity\Booking\OrganizationHoliday;
  14. use App\Entity\Core\BankAccount;
  15. use App\Entity\Core\ContactPoint;
  16. use App\Entity\Core\File;
  17. use App\Entity\Core\Notification;
  18. use App\Entity\Core\Tagg;
  19. use App\Entity\Donor\Donor;
  20. use App\Entity\Education\CriteriaNotation;
  21. use App\Entity\Education\Cycle;
  22. use App\Entity\Education\EducationCategory;
  23. use App\Entity\Education\EducationNotationConfig;
  24. use App\Entity\Education\EducationTiming;
  25. use App\Entity\Education\PeriodNotation;
  26. use App\Entity\Message\Email;
  27. use App\Entity\Message\Mail;
  28. use App\Entity\Message\Sms;
  29. use App\Entity\Network\NetworkOrganization;
  30. use App\Entity\Person\Commission;
  31. use App\Entity\Place\Place;
  32. use App\Entity\Product\Equipment;
  33. use App\Entity\Product\Intangible;
  34. use App\Repository\Organization\OrganizationRepository;
  35. use AppBundle\Services\Messenger\Message;
  36. use Doctrine\Common\Collections\ArrayCollection;
  37. use Doctrine\Common\Collections\Collection;
  38. use Doctrine\ORM\Mapping as ORM;
  39. use JetBrains\PhpStorm\Pure;
  40. use Symfony\Component\Validator\Constraints as Assert;
  41. /**
  42. * Structure, organisation
  43. */
  44. #[ApiResource(
  45. itemOperations: [
  46. 'get' => [
  47. 'security' => '(is_granted("ROLE_ORGANIZATION_VIEW") or is_granted("ROLE_ORGANIZATION")) and object.getId() == user.getOrganization().getId()'
  48. ],
  49. 'put' => [
  50. 'security' => 'is_granted("ROLE_ORGANIZATION") and object.getId() == user.getOrganization().getId()'
  51. ]
  52. ]
  53. )]
  54. #[ORM\Entity(repositoryClass: OrganizationRepository::class)]
  55. class Organization
  56. {
  57. #[ORM\Id]
  58. #[ORM\Column]
  59. #[ORM\GeneratedValue]
  60. private ?int $id = null;
  61. #[ORM\Column(length: 128, nullable: false)]
  62. public string $name;
  63. #[ORM\Column(length: 128)]
  64. private string $identifier;
  65. #[ORM\Column(length: 255, nullable: true)]
  66. #[Assert\Choice(callback: ['\App\Enum\Organization\LegalEnum', 'toArray'], message: 'invalid-legal-status')]
  67. private ?string $legalStatus = null;
  68. #[ORM\Column(length: 255, nullable: true)]
  69. #[Assert\Choice(callback: ['\App\Enum\Organization\PrincipalTypeEnum', 'toArray'], message: 'invalid-principal-type')]
  70. private ?string $principalType = null;
  71. #[ORM\OneToOne(mappedBy: 'organization', cascade: ['persist', 'remove'])]
  72. private Settings $settings;
  73. #[ORM\OneToMany(mappedBy: 'organization', targetEntity: Access::class, orphanRemoval: true)]
  74. private Collection $accesses;
  75. #[ORM\OneToMany(mappedBy: 'organization', targetEntity: NetworkOrganization::class, orphanRemoval: true)]
  76. #[ApiSubresource]
  77. private Collection $networkOrganizations;
  78. #[ORM\OneToMany(mappedBy: 'parent', targetEntity: NetworkOrganization::class, orphanRemoval: true)]
  79. private Collection $networkOrganizationChildren;
  80. #[ORM\OneToMany(mappedBy: 'organization', targetEntity: EducationNotationConfig::class, orphanRemoval: true)]
  81. private Collection $educationNotationConfigs;
  82. #[ORM\OneToOne( inversedBy: 'organization', targetEntity: Parameters::class)]
  83. #[ORM\JoinColumn(nullable: false)]
  84. private Parameters $parameters;
  85. #[ORM\OneToOne(mappedBy: 'organization', cascade: ['persist', 'remove'], orphanRemoval: true)]
  86. #[ApiSubresource]
  87. private BillingSetting $billingSetting;
  88. #[ORM\Column(type: 'text', nullable: true)]
  89. private ?string $description = null;
  90. #[ORM\Column(type: 'date', nullable: true)]
  91. private ?\DateTimeInterface $creationDate = null;
  92. #[ORM\Column(type: 'date', nullable: true)]
  93. private ?\DateTimeInterface $declarationDate = null;
  94. #[ORM\Column(length: 14, nullable: true)]
  95. private ?string $siretNumber = null;
  96. #[ORM\Column(length: 10, nullable: true)]
  97. private ?string $waldecNumber = null;
  98. #[ORM\Column(length: 5, nullable: true)]
  99. private ?string $apeNumber = null;
  100. #[ORM\Column(length: 50, nullable: true)]
  101. private ?string $tvaNumber = null;
  102. #[ORM\Column(length: 40, nullable: true)]
  103. private ?string $otherType = null;
  104. #[ORM\Column(length: 80, nullable: true)]
  105. private ?string $acronym = null;
  106. #[ORM\Column(length: 255, nullable: true)]
  107. private ?string $facebook = null;
  108. #[ORM\Column(length: 255, nullable: true)]
  109. private ?string $twitter = null;
  110. #[ORM\Column(length: 255, nullable: true)]
  111. private ?string $youtube = null;
  112. #[ORM\Column(length: 255, nullable: true)]
  113. private ?string $instagram = null;
  114. #[ORM\Column(length: 35, nullable: true)]
  115. private ?string $collectiveAgreement = null;
  116. #[ORM\Column(length: 255, nullable: true)]
  117. #[Assert\Choice(callback: ['\App\Enum\Organization\OpcaEnum', 'toArray'], message: 'invalid-opca')]
  118. private ?string $opca = null;
  119. #[ORM\Column(length: 35, nullable: true)]
  120. private ?string $icomNumber = null;
  121. #[ORM\Column(length: 35, nullable: true)]
  122. private ?string $urssafNumber = null;
  123. #[ORM\Column(length: 20, nullable: true)]
  124. private ?string $youngApproval = null;
  125. #[ORM\Column(length: 20, nullable: true)]
  126. private ?string $trainingApproval = null;
  127. #[ORM\Column(length: 50, nullable: true)]
  128. private ?string $otherApproval = null;
  129. #[ORM\Column(length: 35, nullable: true)]
  130. private ?string $prefectureName = null;
  131. #[ORM\Column(length: 20, nullable: true)]
  132. private ?string $prefectureNumber = null;
  133. #[ORM\Column(length: 255, nullable: true)]
  134. #[Assert\Choice(callback: ['\App\Enum\Organization\CategoryEnum', 'toArray'], message: 'invalid-category')]
  135. private ?string $category = null;
  136. #[ORM\Column(length: 255, nullable: true)]
  137. #[Assert\Choice(callback: ['\App\Enum\Organization\SchoolCategoryEnum', 'toArray'], message: 'invalid-school-category')]
  138. private ?string $schoolCategory = null;
  139. #[ORM\Column(length: 255, nullable: true)]
  140. #[Assert\Choice(callback: ['\App\Enum\Organization\TypeEstablishmentEnum', 'toArray'], message: 'invalid-type-establishment')]
  141. private ?string $typeEstablishment = null;
  142. #[ORM\Column(length: 255, nullable: true)]
  143. #[Assert\Choice(callback: ['\App\Enum\Organization\TypeEstablishmentDetailEnum', 'toArray'], message: 'invalid-type-establishment-detail')]
  144. private ?string $typeEstablishmentDetail = null;
  145. #[ORM\Column(nullable: true)]
  146. private ?float $budget = null;
  147. #[ORM\Column(nullable: true)]
  148. private ?bool $isPedagogicIsPrincipalActivity = null;
  149. #[ORM\Column(nullable: true)]
  150. private ?float $pedagogicBudget = null;
  151. #[ORM\Column(nullable: true)]
  152. private ?bool $isPerformanceContractor = null;
  153. #[ORM\Column(length:20, nullable: true)]
  154. private ?string $ffecApproval = null;
  155. #[ORM\Column]
  156. private bool $portailVisibility;
  157. #[ORM\Column(nullable: true)]
  158. private ?int $cmsId = null;
  159. #[ORM\ManyToOne(inversedBy: 'organizationLogos')]
  160. #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
  161. private ?File $logo = null;
  162. #[ORM\ManyToOne(inversedBy: 'organizationImages')]
  163. #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
  164. private ?File $image = null;
  165. #[ORM\ManyToMany(targetEntity: TypeOfPractice::class, mappedBy: 'organizations')]
  166. #[ApiSubresource]
  167. private Collection $typeOfPractices;
  168. #[ORM\Column(nullable: true)]
  169. private ?string $otherPractice = null;
  170. #[ORM\ManyToMany(targetEntity: ContactPoint::class, mappedBy: 'organization')]
  171. #[ApiSubresource]
  172. private Collection $contactPoints;
  173. #[ORM\ManyToMany(targetEntity: BankAccount::class, inversedBy: 'organization')]
  174. #[ORM\JoinColumn(name: 'organization_id', referencedColumnName: 'id', unique: true)]
  175. #[ORM\InverseJoinColumn(name: 'bankAccount_id', referencedColumnName: 'id')]
  176. #[ApiSubresource]
  177. private Collection $bankAccounts;
  178. #[ORM\OneToMany( mappedBy: 'organization', targetEntity: OrganizationAddressPostal::class, orphanRemoval: true)]
  179. #[ApiSubresource]
  180. private Collection $organizationAddressPostals;
  181. #[ORM\OneToMany(mappedBy: 'organization', targetEntity: OrganizationLicence::class, orphanRemoval: true)]
  182. private Collection $organizationLicences;
  183. #[ORM\OneToMany(mappedBy: 'organization', targetEntity: OrganizationArticle::class, orphanRemoval: true)]
  184. #[ApiSubresource]
  185. private Collection $organizationArticles;
  186. #[ORM\OneToMany(mappedBy: 'organization', targetEntity: Cycle::class, orphanRemoval: true)]
  187. private Collection $cycles;
  188. #[ORM\OneToMany(mappedBy: 'organization', targetEntity: EducationTiming::class, orphanRemoval: true)]
  189. private Collection $educationTimings;
  190. #[ORM\OneToMany( mappedBy: 'organization', targetEntity: Subdomain::class)]
  191. #[ApiSubresource]
  192. private Collection $subdomains;
  193. #[ORM\ManyToOne(inversedBy: 'organizationContacts')]
  194. #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
  195. private ?Access $contactPerson;
  196. #[ORM\OneToMany(mappedBy: 'organization', targetEntity: OrganizationHoliday::class, cascade: ['persist'], orphanRemoval: true)]
  197. private Collection $holidays;
  198. #[ORM\OneToMany(mappedBy: 'organization', targetEntity: Course::class, orphanRemoval: true)]
  199. private Collection $courses;
  200. #[ORM\OneToMany(mappedBy: 'organization', targetEntity: EducationalProject::class, orphanRemoval: true)]
  201. private Collection $educationalProjects;
  202. #[ORM\OneToMany(mappedBy: 'organization', targetEntity: Event::class, orphanRemoval: true)]
  203. private Collection $events;
  204. #[ORM\OneToMany(mappedBy: 'organization', targetEntity: Examen::class, orphanRemoval: true)]
  205. private Collection $examens;
  206. #[ORM\OneToMany(mappedBy: 'organization', targetEntity: CriteriaNotation::class, cascade: ['persist'], orphanRemoval: true)]
  207. private Collection $critereNotations;
  208. #[ORM\OneToMany(mappedBy: 'organization', targetEntity: EducationCategory::class, orphanRemoval: true)]
  209. private Collection $educationCategories;
  210. #[ORM\OneToMany(mappedBy: 'organization', targetEntity: PeriodNotation::class, orphanRemoval: true)]
  211. private Collection $periodNotations;
  212. #[ORM\OneToMany(mappedBy: 'organization', targetEntity: File::class, orphanRemoval: true)]
  213. private Collection $files;
  214. #[ORM\OneToMany(mappedBy: 'recipientOrganization', targetEntity: Notification::class, orphanRemoval: true)]
  215. private Collection $notifications;
  216. #[ORM\OneToMany(mappedBy: 'author', targetEntity: Email::class)]
  217. private Collection $emails;
  218. #[ORM\OneToMany(mappedBy: 'author', targetEntity: Mail::class)]
  219. private Collection $mails;
  220. #[ORM\OneToMany(mappedBy: 'author', targetEntity: Sms::class)]
  221. private Collection $sms;
  222. #[ORM\OneToMany(mappedBy: 'organization', targetEntity: Activity::class, cascade: ['persist'], orphanRemoval: true)]
  223. private Collection $activities;
  224. #[ORM\OneToMany(mappedBy: 'organization', targetEntity: Jury::class, orphanRemoval: true)]
  225. private Collection $juries;
  226. #[ORM\OneToMany(mappedBy: 'organization', targetEntity: Commission::class, orphanRemoval: true)]
  227. private Collection $commissions;
  228. #[ORM\OneToMany(mappedBy: 'organization', targetEntity: Place::class, orphanRemoval: true)]
  229. private Collection $places;
  230. #[ORM\OneToMany(mappedBy: 'organization', targetEntity: Attendance::class, orphanRemoval: true)]
  231. private Collection $attendances;
  232. #[ORM\OneToMany(mappedBy: 'organization', targetEntity: Equipment::class, orphanRemoval: true)]
  233. private Collection $equipments;
  234. #[ORM\OneToMany(mappedBy: 'organization', targetEntity: Intangible::class, orphanRemoval: true)]
  235. private Collection $intangibles;
  236. #[ORM\OneToMany(mappedBy: 'organization', targetEntity: Donor::class, orphanRemoval: true)]
  237. private Collection $donors;
  238. #[ORM\ManyToMany(targetEntity: Tagg::class, inversedBy: 'organizations', cascade: ['persist'])]
  239. #[ORM\JoinTable(name: 'tag_organization')]
  240. #[ORM\JoinColumn(name: 'organization_id', referencedColumnName: 'id')]
  241. #[ORM\InverseJoinColumn(name: 'tag_id', referencedColumnName: 'id')]
  242. private Collection $tags;
  243. #[Pure] public function __construct()
  244. {
  245. $this->accesses = new ArrayCollection();
  246. $this->networkOrganizations = new ArrayCollection();
  247. $this->networkOrganizationChildren = new ArrayCollection();
  248. $this->typeOfPractices = new ArrayCollection();
  249. $this->contactPoints = new ArrayCollection();
  250. $this->bankAccounts = new ArrayCollection();
  251. $this->organizationAddressPostals = new ArrayCollection();
  252. $this->organizationLicences = new ArrayCollection();
  253. $this->organizationArticles = new ArrayCollection();
  254. $this->cycles = new ArrayCollection();
  255. $this->educationTimings = new ArrayCollection();
  256. $this->educationNotationConfigs = new ArrayCollection();
  257. $this->subdomains = new ArrayCollection();
  258. $this->holidays = new ArrayCollection();
  259. $this->courses = new ArrayCollection();
  260. $this->educationalProjects = new ArrayCollection();
  261. $this->events = new ArrayCollection();
  262. $this->examens = new ArrayCollection();
  263. $this->critereNotations = new ArrayCollection();
  264. $this->educationCategories = new ArrayCollection();
  265. $this->periodNotations = new ArrayCollection();
  266. $this->files = new ArrayCollection();
  267. $this->notifications = new ArrayCollection();
  268. $this->emails = new ArrayCollection();
  269. $this->mails = new ArrayCollection();
  270. $this->sms = new ArrayCollection();
  271. $this->activities = new ArrayCollection();
  272. $this->juries = new ArrayCollection();
  273. $this->commissions = new ArrayCollection();
  274. $this->places = new ArrayCollection();
  275. $this->attendances = new ArrayCollection();
  276. $this->equipments = new ArrayCollection();
  277. $this->intangibles = new ArrayCollection();
  278. $this->donors = new ArrayCollection();
  279. $this->tags = new ArrayCollection();
  280. }
  281. public function getId(): ?int
  282. {
  283. return $this->id;
  284. }
  285. public function getName(): string
  286. {
  287. return $this->name;
  288. }
  289. public function setName(string $name): self
  290. {
  291. $this->name = $name;
  292. return $this;
  293. }
  294. public function getIdentifier(): string
  295. {
  296. return $this->identifier;
  297. }
  298. public function setIdentifier(string $identifier): self
  299. {
  300. $this->identifier = $identifier;
  301. return $this;
  302. }
  303. public function getLegalStatus(): ?string
  304. {
  305. return $this->legalStatus;
  306. }
  307. public function setLegalStatus(?string $legalStatus): self
  308. {
  309. $this->legalStatus = $legalStatus;
  310. return $this;
  311. }
  312. public function getPrincipalType(): ?string
  313. {
  314. return $this->principalType;
  315. }
  316. public function setPrincipalType(?string $principalType): self
  317. {
  318. $this->principalType = $principalType;
  319. return $this;
  320. }
  321. public function getSettings(): Settings
  322. {
  323. return $this->settings;
  324. }
  325. public function setSettings(Settings $settings): self
  326. {
  327. // set the owning side of the relation if necessary
  328. if ($settings->getOrganization() !== $this) {
  329. $settings->setOrganization($this);
  330. }
  331. $this->settings = $settings;
  332. return $this;
  333. }
  334. public function getAccesses(): Collection
  335. {
  336. return $this->accesses;
  337. }
  338. public function getNetworkOrganizations(): Collection
  339. {
  340. return $this->networkOrganizations;
  341. }
  342. public function addNetworkOrganization(NetworkOrganization $networkOrganization): self
  343. {
  344. if (!$this->networkOrganizations->contains($networkOrganization)) {
  345. $this->networkOrganizations[] = $networkOrganization;
  346. $networkOrganization->setOrganization($this);
  347. }
  348. return $this;
  349. }
  350. public function removeNetworkOrganization(NetworkOrganization $networkOrganization): self
  351. {
  352. if ($this->networkOrganizations->removeElement($networkOrganization)) {
  353. // set the owning side to null (unless already changed)
  354. if ($networkOrganization->getOrganization() === $this) {
  355. $networkOrganization->setOrganization(null);
  356. }
  357. }
  358. return $this;
  359. }
  360. public function getNetworkOrganizationChildren(): Collection
  361. {
  362. return $this->networkOrganizationChildren;
  363. }
  364. public function addNetworkOrganizationChild(NetworkOrganization $networkOrganizationChild): self
  365. {
  366. if (!$this->networkOrganizationChildren->contains($networkOrganizationChild)) {
  367. $this->networkOrganizationChildren[] = $networkOrganizationChild;
  368. $networkOrganizationChild->setParent($this);
  369. }
  370. return $this;
  371. }
  372. public function removeNetworkOrganizationChild(NetworkOrganization $networkOrganizationChild): self
  373. {
  374. if ($this->networkOrganizationChildren->removeElement($networkOrganizationChild)) {
  375. // set the owning side to null (unless already changed)
  376. if ($networkOrganizationChild->getParent() === $this) {
  377. $networkOrganizationChild->setParent(null);
  378. }
  379. }
  380. return $this;
  381. }
  382. public function getParameters(): Parameters
  383. {
  384. return $this->parameters;
  385. }
  386. public function setParameters(Parameters $parameters): self
  387. {
  388. $this->parameters = $parameters;
  389. return $this;
  390. }
  391. /**
  392. * @return File
  393. */
  394. public function getLogo(): File
  395. {
  396. return $this->logo;
  397. }
  398. /**
  399. * @param File $logo
  400. */
  401. public function setLogo(File $logo): void
  402. {
  403. $this->logo = $logo;
  404. }
  405. public function getBillingSetting(): BillingSetting
  406. {
  407. return $this->billingSetting;
  408. }
  409. public function setBillingSetting(BillingSetting $billingSetting): self
  410. {
  411. $this->billingSetting = $billingSetting;
  412. return $this;
  413. }
  414. public function getDescription(): ?string
  415. {
  416. return $this->description;
  417. }
  418. public function setDescription(?string $description): self
  419. {
  420. $this->description = $description;
  421. return $this;
  422. }
  423. public function getCreationDate(): ?\DateTimeInterface
  424. {
  425. return $this->creationDate;
  426. }
  427. public function setCreationDate(?\DateTimeInterface $creationDate): self
  428. {
  429. $this->creationDate = $creationDate;
  430. return $this;
  431. }
  432. public function getDeclarationDate(): ?\DateTimeInterface
  433. {
  434. return $this->declarationDate;
  435. }
  436. public function setDeclarationDate(?\DateTimeInterface $declarationDate): self
  437. {
  438. $this->declarationDate = $declarationDate;
  439. return $this;
  440. }
  441. public function getSiretNumber(): ?string
  442. {
  443. return $this->siretNumber;
  444. }
  445. public function setSiretNumber(?string $siretNumber): self
  446. {
  447. $this->siretNumber = $siretNumber;
  448. return $this;
  449. }
  450. public function getWaldecNumber(): ?string
  451. {
  452. return $this->waldecNumber;
  453. }
  454. public function setWaldecNumber(?string $waldecNumber): self
  455. {
  456. $this->waldecNumber = $waldecNumber;
  457. return $this;
  458. }
  459. public function getApeNumber(): ?string
  460. {
  461. return $this->apeNumber;
  462. }
  463. public function setApeNumber(?string $apeNumber): self
  464. {
  465. $this->apeNumber = $apeNumber;
  466. return $this;
  467. }
  468. public function getTvaNumber(): ?string
  469. {
  470. return $this->tvaNumber;
  471. }
  472. public function setTvaNumber(?string $tvaNumber): self
  473. {
  474. $this->tvaNumber = $tvaNumber;
  475. return $this;
  476. }
  477. public function getOtherType(): ?string
  478. {
  479. return $this->otherType;
  480. }
  481. public function setOtherType(?string $otherType): self
  482. {
  483. $this->otherType = $otherType;
  484. return $this;
  485. }
  486. public function getAcronym(): ?string
  487. {
  488. return $this->acronym;
  489. }
  490. public function setAcronym(?string $acronym): self
  491. {
  492. $this->acronym = $acronym;
  493. return $this;
  494. }
  495. public function getFacebook(): ?string
  496. {
  497. return $this->facebook;
  498. }
  499. public function setFacebook(?string $facebook): self
  500. {
  501. $this->facebook = $facebook;
  502. return $this;
  503. }
  504. public function getTwitter(): ?string
  505. {
  506. return $this->twitter;
  507. }
  508. public function setTwitter(?string $twitter): self
  509. {
  510. $this->twitter = $twitter;
  511. return $this;
  512. }
  513. public function getYoutube(): ?string
  514. {
  515. return $this->youtube;
  516. }
  517. public function setYoutube(?string $youtube): self
  518. {
  519. $this->youtube = $youtube;
  520. return $this;
  521. }
  522. public function getInstagram(): ?string
  523. {
  524. return $this->instagram;
  525. }
  526. public function setInstagram(?string $instagram): self
  527. {
  528. $this->instagram = $instagram;
  529. return $this;
  530. }
  531. public function getCollectiveAgreement(): ?string
  532. {
  533. return $this->collectiveAgreement;
  534. }
  535. public function setCollectiveAgreement(?string $collectiveAgreement): self
  536. {
  537. $this->collectiveAgreement = $collectiveAgreement;
  538. return $this;
  539. }
  540. public function getOpca(): ?string
  541. {
  542. return $this->opca;
  543. }
  544. public function setOpca(?string $opca): self
  545. {
  546. $this->opca = $opca;
  547. return $this;
  548. }
  549. public function getIcomNumber(): ?string
  550. {
  551. return $this->icomNumber;
  552. }
  553. public function setIcomNumber(?string $icomNumber): self
  554. {
  555. $this->icomNumber = $icomNumber;
  556. return $this;
  557. }
  558. public function getUrssafNumber(): ?string
  559. {
  560. return $this->urssafNumber;
  561. }
  562. public function setUrssafNumber(?string $urssafNumber): self
  563. {
  564. $this->urssafNumber = $urssafNumber;
  565. return $this;
  566. }
  567. public function getYoungApproval(): ?string
  568. {
  569. return $this->youngApproval;
  570. }
  571. public function setYoungApproval(?string $youngApproval): self
  572. {
  573. $this->youngApproval = $youngApproval;
  574. return $this;
  575. }
  576. public function getTrainingApproval(): ?string
  577. {
  578. return $this->trainingApproval;
  579. }
  580. public function setTrainingApproval(?string $trainingApproval): self
  581. {
  582. $this->trainingApproval = $trainingApproval;
  583. return $this;
  584. }
  585. public function getOtherApproval(): ?string
  586. {
  587. return $this->otherApproval;
  588. }
  589. public function setOtherApproval(?string $otherApproval): self
  590. {
  591. $this->otherApproval = $otherApproval;
  592. return $this;
  593. }
  594. public function getPrefectureName(): ?string
  595. {
  596. return $this->prefectureName;
  597. }
  598. public function setPrefectureName(?string $prefectureName): self
  599. {
  600. $this->prefectureName = $prefectureName;
  601. return $this;
  602. }
  603. public function getPrefectureNumber(): ?string
  604. {
  605. return $this->prefectureNumber;
  606. }
  607. public function setPrefectureNumber(?string $prefectureNumber): self
  608. {
  609. $this->prefectureNumber = $prefectureNumber;
  610. return $this;
  611. }
  612. public function getCategory(): ?string
  613. {
  614. return $this->category;
  615. }
  616. public function setCategory(?string $category): self
  617. {
  618. $this->category = $category;
  619. return $this;
  620. }
  621. public function getSchoolCategory(): ?string
  622. {
  623. return $this->schoolCategory;
  624. }
  625. public function setSchoolCategory(?string $schoolCategory): self
  626. {
  627. $this->schoolCategory = $schoolCategory;
  628. return $this;
  629. }
  630. public function getTypeEstablishment(): ?string
  631. {
  632. return $this->typeEstablishment;
  633. }
  634. public function setTypeEstablishment(?string $typeEstablishment): self
  635. {
  636. $this->typeEstablishment = $typeEstablishment;
  637. return $this;
  638. }
  639. public function getTypeEstablishmentDetail(): ?string
  640. {
  641. return $this->typeEstablishmentDetail;
  642. }
  643. public function setTypeEstablishmentDetail(?string $typeEstablishmentDetail): self
  644. {
  645. $this->typeEstablishmentDetail = $typeEstablishmentDetail;
  646. return $this;
  647. }
  648. public function getBudget(): ?float
  649. {
  650. return $this->budget;
  651. }
  652. public function setBudget(?float $budget): self
  653. {
  654. $this->budget = $budget;
  655. return $this;
  656. }
  657. public function getIsPedagogicIsPrincipalActivity(): ?bool
  658. {
  659. return $this->isPedagogicIsPrincipalActivity;
  660. }
  661. public function setIsPedagogicIsPrincipalActivity(?bool $isPedagogicIsPrincipalActivity): self
  662. {
  663. $this->isPedagogicIsPrincipalActivity = $isPedagogicIsPrincipalActivity;
  664. return $this;
  665. }
  666. public function getPedagogicBudget(): ?float
  667. {
  668. return $this->pedagogicBudget;
  669. }
  670. public function setPedagogicBudget(?float $pedagogicBudget): self
  671. {
  672. $this->pedagogicBudget = $pedagogicBudget;
  673. return $this;
  674. }
  675. public function getIsPerformanceContractor(): ?bool
  676. {
  677. return $this->isPerformanceContractor;
  678. }
  679. public function setIsPerformanceContractor(?bool $isPerformanceContractor): self
  680. {
  681. $this->isPerformanceContractor = $isPerformanceContractor;
  682. return $this;
  683. }
  684. public function getFfecApproval(): ?string
  685. {
  686. return $this->ffecApproval;
  687. }
  688. public function setFfecApproval(?string $ffecApproval): self
  689. {
  690. $this->ffecApproval = $ffecApproval;
  691. return $this;
  692. }
  693. public function getPortailVisibility(): bool
  694. {
  695. return $this->portailVisibility;
  696. }
  697. public function setPortailVisibility(bool $portailVisibility): self
  698. {
  699. $this->portailVisibility = $portailVisibility;
  700. return $this;
  701. }
  702. public function getCmsId(): ?int
  703. {
  704. return $this->cmsId;
  705. }
  706. public function setCmsId(?int $cmsId): self
  707. {
  708. $this->cmsId = $cmsId;
  709. return $this;
  710. }
  711. public function setImage(?File $image):self
  712. {
  713. $this->image = $image;
  714. return $this;
  715. }
  716. public function getImage(): ?File
  717. {
  718. return $this->image;
  719. }
  720. public function getTypeOfPractices(): Collection
  721. {
  722. return $this->typeOfPractices;
  723. }
  724. public function addTypeOfPractice(TypeOfPractice $typeOfPractice): self
  725. {
  726. if (!$this->typeOfPractices->contains($typeOfPractice)) {
  727. $this->typeOfPractices[] = $typeOfPractice;
  728. $typeOfPractice->addOrganization($this);
  729. }
  730. return $this;
  731. }
  732. public function removeTypeOfPractice(TypeOfPractice $typeOfPractice): self
  733. {
  734. if ($this->typeOfPractices->removeElement($typeOfPractice)) {
  735. $typeOfPractice->removeOrganization($this);
  736. }
  737. return $this;
  738. }
  739. public function getOtherPractice(): ?string
  740. {
  741. return $this->otherPractice;
  742. }
  743. public function setOtherPractice(?string $otherPractice): self
  744. {
  745. $this->otherPractice = $otherPractice;
  746. return $this;
  747. }
  748. public function getContactPoints(): Collection
  749. {
  750. return $this->contactPoints;
  751. }
  752. public function addContactPoint(ContactPoint $contactPoint): self
  753. {
  754. if (!$this->contactPoints->contains($contactPoint)) {
  755. $this->contactPoints[] = $contactPoint;
  756. $contactPoint->addOrganization($this);
  757. }
  758. return $this;
  759. }
  760. public function removeContactPoint(ContactPoint $contactPoint): self
  761. {
  762. if ($this->contactPoints->removeElement($contactPoint)) {
  763. $contactPoint->removeOrganization($this);
  764. }
  765. return $this;
  766. }
  767. public function getBankAccounts(): Collection
  768. {
  769. return $this->bankAccounts;
  770. }
  771. public function addBankAccount(BankAccount $bankAccount): self
  772. {
  773. if (!$this->bankAccounts->contains($bankAccount)) {
  774. $this->bankAccounts[] = $bankAccount;
  775. $bankAccount->addOrganization($this);
  776. }
  777. return $this;
  778. }
  779. public function removeBankAccount(BankAccount $bankAccount): self
  780. {
  781. if ($this->bankAccounts->removeElement($bankAccount)) {
  782. $bankAccount->removeOrganization($this);
  783. }
  784. return $this;
  785. }
  786. public function getOrganizationAddressPostals(): Collection
  787. {
  788. return $this->organizationAddressPostals;
  789. }
  790. public function addOrganizationAddressPostal(OrganizationAddressPostal $organizationAddressPostal): self
  791. {
  792. if (!$this->organizationAddressPostals->contains($organizationAddressPostal)) {
  793. $this->organizationAddressPostals[] = $organizationAddressPostal;
  794. $organizationAddressPostal->setOrganization($this);
  795. }
  796. return $this;
  797. }
  798. public function removeOrganizationAddressPostal(OrganizationAddressPostal $organizationAddressPostal): self
  799. {
  800. if ($this->organizationAddressPostals->removeElement($organizationAddressPostal)) {
  801. // set the owning side to null (unless already changed)
  802. if ($organizationAddressPostal->getOrganization() === $this) {
  803. $organizationAddressPostal->setOrganization(null);
  804. }
  805. }
  806. return $this;
  807. }
  808. public function getOrganizationLicences(): Collection
  809. {
  810. return $this->organizationLicences;
  811. }
  812. public function addOrganizationLicence(OrganizationLicence $organizationLicence): self
  813. {
  814. if (!$this->organizationLicences->contains($organizationLicence)) {
  815. $this->organizationLicences[] = $organizationLicence;
  816. $organizationLicence->setOrganization($this);
  817. }
  818. return $this;
  819. }
  820. public function removeOrganizationLicence(OrganizationLicence $organizationLicence): self
  821. {
  822. if ($this->organizationLicences->removeElement($organizationLicence)) {
  823. // set the owning side to null (unless already changed)
  824. if ($organizationLicence->getOrganization() === $this) {
  825. $organizationLicence->setOrganization(null);
  826. }
  827. }
  828. return $this;
  829. }
  830. public function getOrganizationArticles(): Collection
  831. {
  832. return $this->organizationArticles;
  833. }
  834. public function addOrganizationArticle(OrganizationArticle $organizationArticle): self
  835. {
  836. if (!$this->organizationArticles->contains($organizationArticle)) {
  837. $this->organizationArticles[] = $organizationArticle;
  838. $organizationArticle->setOrganization($this);
  839. }
  840. return $this;
  841. }
  842. public function removeOrganizationArticle(OrganizationArticle $organizationArticle): self
  843. {
  844. if ($this->organizationArticles->removeElement($organizationArticle)) {
  845. // set the owning side to null (unless already changed)
  846. if ($organizationArticle->getOrganization() === $this) {
  847. $organizationArticle->setOrganization(null);
  848. }
  849. }
  850. return $this;
  851. }
  852. public function addCycle(Cycle $cycle): self
  853. {
  854. if (!$this->cycles->contains($cycle)) {
  855. $this->cycles[] = $cycle;
  856. $cycle->setOrganization($this);
  857. }
  858. return $this;
  859. }
  860. public function removeCycle(Cycle $cycle): self
  861. {
  862. if ($this->cycles->removeElement($cycle)) {
  863. // set the owning side to null (unless already changed)
  864. if ($cycle->getOrganization() === $this) {
  865. $cycle->setOrganization(null);
  866. }
  867. }
  868. return $this;
  869. }
  870. public function getCycles(): Collection
  871. {
  872. return $this->cycles;
  873. }
  874. public function addEducationNotationConfig(EducationNotationConfig $educationNotationConfig): self
  875. {
  876. if (!$this->educationNotationConfigs->contains($educationNotationConfig)) {
  877. $this->educationNotationConfigs[] = $educationNotationConfig;
  878. $educationNotationConfig->setOrganization($this);
  879. }
  880. return $this;
  881. }
  882. public function removeEducationNotationConfig(EducationNotationConfig $educationNotationConfig): self
  883. {
  884. if ($this->educationNotationConfigs->removeElement($educationNotationConfig)) {
  885. // set the owning side to null (unless already changed)
  886. if ($educationNotationConfig->getOrganization() === $this) {
  887. $educationNotationConfig->setOrganization(null);
  888. }
  889. }
  890. return $this;
  891. }
  892. public function getEducationNotationConfigs(): Collection
  893. {
  894. return $this->educationNotationConfigs;
  895. }
  896. public function addEducationTiming(EducationTiming $educationTiming): self
  897. {
  898. if (!$this->educationTimings->contains($educationTiming)) {
  899. $this->educationTimings[] = $educationTiming;
  900. $educationTiming->setOrganization($this);
  901. }
  902. return $this;
  903. }
  904. public function removeEducationTiming(EducationTiming $educationTiming): self
  905. {
  906. if ($this->educationTimings->removeElement($educationTiming)) {
  907. // set the owning side to null (unless already changed)
  908. if ($educationTiming->getOrganization() === $this) {
  909. $educationTiming->setOrganization(null);
  910. }
  911. }
  912. return $this;
  913. }
  914. public function getEducationTimings(): Collection
  915. {
  916. return $this->educationTimings;
  917. }
  918. public function getSubdomains(): Collection
  919. {
  920. return $this->subdomains;
  921. }
  922. public function addSubdomain($subdomain): self
  923. {
  924. $subdomain->setOrganization($this);
  925. $this->subdomains[] = $subdomain;
  926. return $this;
  927. }
  928. public function removeSubdomain($subdomain): self
  929. {
  930. $subdomain->setOrganization(null);
  931. $this->subdomains->removeElement($subdomain);
  932. return $this;
  933. }
  934. public function addAccess(Access $access): self
  935. {
  936. if (!$this->accesses->contains($access)) {
  937. $this->accesses[] = $access;
  938. $access->setOrganization($this);
  939. }
  940. return $this;
  941. }
  942. public function removeAccess(Access $access): self
  943. {
  944. if ($this->accesses->removeElement($access)) {
  945. // set the owning side to null (unless already changed)
  946. if ($access->getOrganization() === $this) {
  947. $access->setOrganization(null);
  948. }
  949. }
  950. return $this;
  951. }
  952. public function getContactPerson(): ?Access
  953. {
  954. return $this->contactPerson;
  955. }
  956. public function setContactPerson(?Access $contactPerson): self
  957. {
  958. $this->contactPerson = $contactPerson;
  959. return $this;
  960. }
  961. /**
  962. * @return Collection<int, OrganizationHoliday>
  963. */
  964. public function getHolidays(): Collection
  965. {
  966. return $this->holidays;
  967. }
  968. public function addHoliday(OrganizationHoliday $holiday): self
  969. {
  970. if (!$this->holidays->contains($holiday)) {
  971. $this->holidays[] = $holiday;
  972. $holiday->setOrganization($this);
  973. }
  974. return $this;
  975. }
  976. public function removeHoliday(OrganizationHoliday $holiday): self
  977. {
  978. if ($this->holidays->removeElement($holiday)) {
  979. // set the owning side to null (unless already changed)
  980. if ($holiday->getOrganization() === $this) {
  981. $holiday->setOrganization(null);
  982. }
  983. }
  984. return $this;
  985. }
  986. /**
  987. * @return Collection<int, Course>
  988. */
  989. public function getCourses(): Collection
  990. {
  991. return $this->courses;
  992. }
  993. public function addCourse(Course $course): self
  994. {
  995. if (!$this->courses->contains($course)) {
  996. $this->courses[] = $course;
  997. $course->setOrganization($this);
  998. }
  999. return $this;
  1000. }
  1001. public function removeCourse(Course $course): self
  1002. {
  1003. if ($this->courses->removeElement($course)) {
  1004. // set the owning side to null (unless already changed)
  1005. if ($course->getOrganization() === $this) {
  1006. $course->setOrganization(null);
  1007. }
  1008. }
  1009. return $this;
  1010. }
  1011. /**
  1012. * @return Collection<int, EducationalProject>
  1013. */
  1014. public function getEducationalProjects(): Collection
  1015. {
  1016. return $this->educationalProjects;
  1017. }
  1018. public function addEducationalProject(EducationalProject $educationalProject): self
  1019. {
  1020. if (!$this->educationalProjects->contains($educationalProject)) {
  1021. $this->educationalProjects[] = $educationalProject;
  1022. $educationalProject->setOrganization($this);
  1023. }
  1024. return $this;
  1025. }
  1026. public function removeEducationalProject(EducationalProject $educationalProject): self
  1027. {
  1028. if ($this->educationalProjects->removeElement($educationalProject)) {
  1029. // set the owning side to null (unless already changed)
  1030. if ($educationalProject->getOrganization() === $this) {
  1031. $educationalProject->setOrganization(null);
  1032. }
  1033. }
  1034. return $this;
  1035. }
  1036. /**
  1037. * @return Collection<int, Event>
  1038. */
  1039. public function getEvents(): Collection
  1040. {
  1041. return $this->events;
  1042. }
  1043. public function addEvent(Event $event): self
  1044. {
  1045. if (!$this->events->contains($event)) {
  1046. $this->events[] = $event;
  1047. $event->setOrganization($this);
  1048. }
  1049. return $this;
  1050. }
  1051. public function removeEvent(Event $event): self
  1052. {
  1053. if ($this->events->removeElement($event)) {
  1054. // set the owning side to null (unless already changed)
  1055. if ($event->getOrganization() === $this) {
  1056. $event->setOrganization(null);
  1057. }
  1058. }
  1059. return $this;
  1060. }
  1061. /**
  1062. * @return Collection<int, Examen>
  1063. */
  1064. public function getExamens(): Collection
  1065. {
  1066. return $this->examens;
  1067. }
  1068. public function addExamen(Examen $examen): self
  1069. {
  1070. if (!$this->examens->contains($examen)) {
  1071. $this->examens[] = $examen;
  1072. $examen->setOrganization($this);
  1073. }
  1074. return $this;
  1075. }
  1076. public function removeExamen(Examen $examen): self
  1077. {
  1078. if ($this->examens->removeElement($examen)) {
  1079. // set the owning side to null (unless already changed)
  1080. if ($examen->getOrganization() === $this) {
  1081. $examen->setOrganization(null);
  1082. }
  1083. }
  1084. return $this;
  1085. }
  1086. /**
  1087. * @return Collection<int, CriteriaNotation>
  1088. */
  1089. public function getCritereNotations(): Collection
  1090. {
  1091. return $this->critereNotations;
  1092. }
  1093. public function addCritereNotation(CriteriaNotation $critereNotation): self
  1094. {
  1095. if (!$this->critereNotations->contains($critereNotation)) {
  1096. $this->critereNotations[] = $critereNotation;
  1097. $critereNotation->setOrganization($this);
  1098. }
  1099. return $this;
  1100. }
  1101. public function removeCritereNotation(CriteriaNotation $critereNotation): self
  1102. {
  1103. if ($this->critereNotations->removeElement($critereNotation)) {
  1104. // set the owning side to null (unless already changed)
  1105. if ($critereNotation->getOrganization() === $this) {
  1106. $critereNotation->setOrganization(null);
  1107. }
  1108. }
  1109. return $this;
  1110. }
  1111. /**
  1112. * @return Collection<int, EducationCategory>
  1113. */
  1114. public function getEducationCategories(): Collection
  1115. {
  1116. return $this->educationCategories;
  1117. }
  1118. public function addEducationCategory(EducationCategory $educationCategory): self
  1119. {
  1120. if (!$this->educationCategories->contains($educationCategory)) {
  1121. $this->educationCategories[] = $educationCategory;
  1122. $educationCategory->setOrganization($this);
  1123. }
  1124. return $this;
  1125. }
  1126. public function removeEducationCategory(EducationCategory $educationCategory): self
  1127. {
  1128. if ($this->educationCategories->removeElement($educationCategory)) {
  1129. // set the owning side to null (unless already changed)
  1130. if ($educationCategory->getOrganization() === $this) {
  1131. $educationCategory->setOrganization(null);
  1132. }
  1133. }
  1134. return $this;
  1135. }
  1136. /**
  1137. * @return Collection<int, PeriodNotation>
  1138. */
  1139. public function getPeriodNotations(): Collection
  1140. {
  1141. return $this->periodNotations;
  1142. }
  1143. public function addPeriodNotation(PeriodNotation $periodNotation): self
  1144. {
  1145. if (!$this->periodNotations->contains($periodNotation)) {
  1146. $this->periodNotations[] = $periodNotation;
  1147. $periodNotation->setOrganization($this);
  1148. }
  1149. return $this;
  1150. }
  1151. public function removePeriodNotation(PeriodNotation $periodNotation): self
  1152. {
  1153. if ($this->periodNotations->removeElement($periodNotation)) {
  1154. // set the owning side to null (unless already changed)
  1155. if ($periodNotation->getOrganization() === $this) {
  1156. $periodNotation->setOrganization(null);
  1157. }
  1158. }
  1159. return $this;
  1160. }
  1161. /**
  1162. * @return Collection<int, File>
  1163. */
  1164. public function getFiles(): Collection
  1165. {
  1166. return $this->files;
  1167. }
  1168. public function addFile(File $file): self
  1169. {
  1170. if (!$this->files->contains($file)) {
  1171. $this->files[] = $file;
  1172. $file->setOrganization($this);
  1173. }
  1174. return $this;
  1175. }
  1176. public function removeFile(File $file): self
  1177. {
  1178. if ($this->files->removeElement($file)) {
  1179. // set the owning side to null (unless already changed)
  1180. if ($file->getOrganization() === $this) {
  1181. $file->setOrganization(null);
  1182. }
  1183. }
  1184. return $this;
  1185. }
  1186. /**
  1187. * @return Collection<int, Notification>
  1188. */
  1189. public function getNotifications(): Collection
  1190. {
  1191. return $this->notifications;
  1192. }
  1193. public function addNotification(Notification $notification): self
  1194. {
  1195. if (!$this->notifications->contains($notification)) {
  1196. $this->notifications[] = $notification;
  1197. $notification->setRecipientOrganization($this);
  1198. }
  1199. return $this;
  1200. }
  1201. public function removeNotification(Notification $notification): self
  1202. {
  1203. if ($this->notifications->removeElement($notification)) {
  1204. // set the owning side to null (unless already changed)
  1205. if ($notification->getRecipientOrganization() === $this) {
  1206. $notification->setRecipientOrganization(null);
  1207. }
  1208. }
  1209. return $this;
  1210. }
  1211. /**
  1212. * @return Collection<int, Email>
  1213. */
  1214. public function getEmails(): Collection
  1215. {
  1216. return $this->emails;
  1217. }
  1218. public function addEmail(Email $email): self
  1219. {
  1220. if (!$this->emails->contains($email)) {
  1221. $this->emails[] = $email;
  1222. $email->setAuthor($this);
  1223. }
  1224. return $this;
  1225. }
  1226. public function removeEmail(Email $email): self
  1227. {
  1228. if ($this->emails->removeElement($email)) {
  1229. // set the owning side to null (unless already changed)
  1230. if ($email->getAuthor() === $this) {
  1231. $email->setAuthor(null);
  1232. }
  1233. }
  1234. return $this;
  1235. }
  1236. /**
  1237. * @return Collection<int, Mail>
  1238. */
  1239. public function getMails(): Collection
  1240. {
  1241. return $this->mails;
  1242. }
  1243. public function addMail(Mail $mail): self
  1244. {
  1245. if (!$this->mails->contains($mail)) {
  1246. $this->mails[] = $mail;
  1247. $mail->setAuthor($this);
  1248. }
  1249. return $this;
  1250. }
  1251. public function removeMail(Mail $mail): self
  1252. {
  1253. if ($this->mails->removeElement($mail)) {
  1254. // set the owning side to null (unless already changed)
  1255. if ($mail->getAuthor() === $this) {
  1256. $mail->setAuthor(null);
  1257. }
  1258. }
  1259. return $this;
  1260. }
  1261. /**
  1262. * @return Collection<int, Sms>
  1263. */
  1264. public function getSms(): Collection
  1265. {
  1266. return $this->sms;
  1267. }
  1268. public function addSms(Sms $sms): self
  1269. {
  1270. if (!$this->sms->contains($sms)) {
  1271. $this->sms[] = $sms;
  1272. $sms->setAuthor($this);
  1273. }
  1274. return $this;
  1275. }
  1276. public function removeSms(Sms $sms): self
  1277. {
  1278. if ($this->sms->removeElement($sms)) {
  1279. // set the owning side to null (unless already changed)
  1280. if ($sms->getAuthor() === $this) {
  1281. $sms->setAuthor(null);
  1282. }
  1283. }
  1284. return $this;
  1285. }
  1286. /**
  1287. * @return Collection<int, Activity>
  1288. */
  1289. public function getActivities(): Collection
  1290. {
  1291. return $this->activities;
  1292. }
  1293. public function addActivity(Activity $activity): self
  1294. {
  1295. if (!$this->activities->contains($activity)) {
  1296. $this->activities[] = $activity;
  1297. $activity->setOrganization($this);
  1298. }
  1299. return $this;
  1300. }
  1301. public function removeActivity(Activity $activity): self
  1302. {
  1303. if ($this->activities->removeElement($activity)) {
  1304. // set the owning side to null (unless already changed)
  1305. if ($activity->getOrganization() === $this) {
  1306. $activity->setOrganization(null);
  1307. }
  1308. }
  1309. return $this;
  1310. }
  1311. /**
  1312. * @return Collection<int, Jury>
  1313. */
  1314. public function getJuries(): Collection
  1315. {
  1316. return $this->juries;
  1317. }
  1318. public function addJury(Jury $jury): self
  1319. {
  1320. if (!$this->juries->contains($jury)) {
  1321. $this->juries[] = $jury;
  1322. $jury->setOrganization($this);
  1323. }
  1324. return $this;
  1325. }
  1326. public function removeJury(Jury $jury): self
  1327. {
  1328. if ($this->juries->removeElement($jury)) {
  1329. // set the owning side to null (unless already changed)
  1330. if ($jury->getOrganization() === $this) {
  1331. $jury->setOrganization(null);
  1332. }
  1333. }
  1334. return $this;
  1335. }
  1336. /**
  1337. * @return Collection<int, Commission>
  1338. */
  1339. public function getCommissions(): Collection
  1340. {
  1341. return $this->commissions;
  1342. }
  1343. public function addCommission(Commission $commission): self
  1344. {
  1345. if (!$this->commissions->contains($commission)) {
  1346. $this->commissions[] = $commission;
  1347. $commission->setOrganization($this);
  1348. }
  1349. return $this;
  1350. }
  1351. public function removeCommission(Commission $commission): self
  1352. {
  1353. if ($this->commissions->removeElement($commission)) {
  1354. // set the owning side to null (unless already changed)
  1355. if ($commission->getOrganization() === $this) {
  1356. $commission->setOrganization(null);
  1357. }
  1358. }
  1359. return $this;
  1360. }
  1361. /**
  1362. * @return Collection<int, Place>
  1363. */
  1364. public function getPlaces(): Collection
  1365. {
  1366. return $this->places;
  1367. }
  1368. public function addPlace(Place $place): self
  1369. {
  1370. if (!$this->places->contains($place)) {
  1371. $this->places[] = $place;
  1372. $place->setOrganization($this);
  1373. }
  1374. return $this;
  1375. }
  1376. public function removePlace(Place $place): self
  1377. {
  1378. if ($this->places->removeElement($place)) {
  1379. // set the owning side to null (unless already changed)
  1380. if ($place->getOrganization() === $this) {
  1381. $place->setOrganization(null);
  1382. }
  1383. }
  1384. return $this;
  1385. }
  1386. /**
  1387. * @return Collection<int, Attendance>
  1388. */
  1389. public function getAttendances(): Collection
  1390. {
  1391. return $this->attendances;
  1392. }
  1393. public function addAttendance(Attendance $attendance): self
  1394. {
  1395. if (!$this->attendances->contains($attendance)) {
  1396. $this->attendances[] = $attendance;
  1397. $attendance->setOrganization($this);
  1398. }
  1399. return $this;
  1400. }
  1401. public function removeAttendance(Attendance $attendance): self
  1402. {
  1403. if ($this->attendances->removeElement($attendance)) {
  1404. // set the owning side to null (unless already changed)
  1405. if ($attendance->getOrganization() === $this) {
  1406. $attendance->setOrganization(null);
  1407. }
  1408. }
  1409. return $this;
  1410. }
  1411. /**
  1412. * @return Collection<int, Equipment>
  1413. */
  1414. public function getEquipments(): Collection
  1415. {
  1416. return $this->equipments;
  1417. }
  1418. public function addEquipment(Equipment $equipment): self
  1419. {
  1420. if (!$this->equipments->contains($equipment)) {
  1421. $this->equipments[] = $equipment;
  1422. $equipment->setOrganization($this);
  1423. }
  1424. return $this;
  1425. }
  1426. public function removeEquipment(Equipment $equipment): self
  1427. {
  1428. if ($this->equipments->removeElement($equipment)) {
  1429. // set the owning side to null (unless already changed)
  1430. if ($equipment->getOrganization() === $this) {
  1431. $equipment->setOrganization(null);
  1432. }
  1433. }
  1434. return $this;
  1435. }
  1436. /**
  1437. * @return Collection<int, Intangible>
  1438. */
  1439. public function getIntangibles(): Collection
  1440. {
  1441. return $this->intangibles;
  1442. }
  1443. public function addIntangible(Intangible $intangible): self
  1444. {
  1445. if (!$this->intangibles->contains($intangible)) {
  1446. $this->intangibles[] = $intangible;
  1447. $intangible->setOrganization($this);
  1448. }
  1449. return $this;
  1450. }
  1451. public function removeIntangible(Intangible $intangible): self
  1452. {
  1453. if ($this->intangibles->removeElement($intangible)) {
  1454. // set the owning side to null (unless already changed)
  1455. if ($intangible->getOrganization() === $this) {
  1456. $intangible->setOrganization(null);
  1457. }
  1458. }
  1459. return $this;
  1460. }
  1461. /**
  1462. * @return Collection<int, Donor>
  1463. */
  1464. public function getDonors(): Collection
  1465. {
  1466. return $this->donors;
  1467. }
  1468. public function addDonor(Donor $donor): self
  1469. {
  1470. if (!$this->donors->contains($donor)) {
  1471. $this->donors[] = $donor;
  1472. $donor->setOrganization($this);
  1473. }
  1474. return $this;
  1475. }
  1476. public function removeDonor(Donor $donor): self
  1477. {
  1478. if ($this->donors->removeElement($donor)) {
  1479. // set the owning side to null (unless already changed)
  1480. if ($donor->getOrganization() === $this) {
  1481. $donor->setOrganization(null);
  1482. }
  1483. }
  1484. return $this;
  1485. }
  1486. /**
  1487. * @return Collection<int, Tagg>
  1488. */
  1489. public function getTags(): Collection
  1490. {
  1491. return $this->tags;
  1492. }
  1493. public function addTag(Tagg $tag): self
  1494. {
  1495. if (!$this->tags->contains($tag)) {
  1496. $this->tags[] = $tag;
  1497. }
  1498. return $this;
  1499. }
  1500. public function removeTag(Tagg $tag): self
  1501. {
  1502. $this->tags->removeElement($tag);
  1503. return $this;
  1504. }
  1505. }