Organization.php 51 KB

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