Access.php 66 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177
  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Entity\Access;
  4. use ApiPlatform\Doctrine\Orm\Filter\BooleanFilter;
  5. use ApiPlatform\Metadata\ApiFilter;
  6. use ApiPlatform\Metadata\ApiResource;
  7. use ApiPlatform\Serializer\Filter\GroupFilter;
  8. use App\Entity\AccessWish\AccessWish;
  9. use App\Entity\Billing\AccessBilling;
  10. use App\Entity\Billing\AccessFictionalIntangible;
  11. use App\Entity\Billing\AccessIntangible;
  12. use App\Entity\Billing\AccessPayer;
  13. use App\Entity\Billing\Bill;
  14. use App\Entity\Billing\BillCredit;
  15. use App\Entity\Billing\BillLine;
  16. use App\Entity\Billing\EducationalProjectPayer;
  17. use App\Entity\Booking\Attendance;
  18. use App\Entity\Booking\AttendanceBooking;
  19. use App\Entity\Booking\Course;
  20. use App\Entity\Booking\EducationalProject;
  21. use App\Entity\Booking\Event;
  22. use App\Entity\Booking\EventUser;
  23. use App\Entity\Booking\ExamenConvocation;
  24. use App\Entity\Booking\PersonHoliday;
  25. use App\Entity\Booking\WorkByUser;
  26. use App\Entity\Core\Notification;
  27. use App\Entity\Core\NotificationUser;
  28. use App\Entity\Core\Tagg;
  29. use App\Entity\Donor\Donor;
  30. use App\Entity\Education\EducationNotationConfig;
  31. use App\Entity\Education\EducationStudent;
  32. use App\Entity\Education\EducationTeacher;
  33. use App\Entity\Message\Email;
  34. use App\Entity\Message\Mail;
  35. use App\Entity\Message\Sms;
  36. use App\Entity\Organization\Jury;
  37. use App\Entity\Organization\Organization;
  38. use App\Entity\Organization\OrganizationLicence;
  39. use App\Entity\Organization\Parameters;
  40. use App\Entity\Person\CommissionMember;
  41. use App\Entity\Person\CompanyPerson;
  42. use App\Entity\Person\Person;
  43. use App\Entity\Person\PersonActivity;
  44. use App\Entity\Place\PlaceRepair;
  45. use App\Entity\Place\RoomRepair;
  46. use App\Entity\Product\Equipment;
  47. use App\Entity\Product\EquipmentLoan;
  48. use App\Entity\Product\EquipmentRepair;
  49. use App\Entity\Reward\AccessReward;
  50. use App\Entity\Traits\CreatedOnAndByTrait;
  51. use App\Filter\ApiPlatform\Person\FullNameFilter;
  52. use App\Filter\ApiPlatform\Utils\InFilter;
  53. use App\Repository\Access\AccessRepository;
  54. // use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
  55. use Doctrine\Common\Collections\ArrayCollection;
  56. use Doctrine\Common\Collections\Collection;
  57. use Doctrine\ORM\Mapping as ORM;
  58. use JetBrains\PhpStorm\Pure;
  59. use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
  60. use Symfony\Component\Security\Core\User\UserInterface;
  61. use Symfony\Component\Serializer\Annotation\Groups;
  62. /**
  63. * Fais le lien entre une Person et une Organization.
  64. *
  65. * Security :
  66. *
  67. * @see ~/config/api_platform/Access/access.yaml
  68. * @see App\Doctrine\Access\CurrentAccessExtension
  69. */
  70. #[ApiResource]
  71. // #[Auditable]
  72. #[ORM\Entity(repositoryClass: AccessRepository::class)]
  73. #[ApiFilter(filterClass: BooleanFilter::class, properties: ['person.isPhysical'])]
  74. #[ApiFilter(filterClass: FullNameFilter::class)]
  75. #[ApiFilter(filterClass: InFilter::class, properties: ['id'])]
  76. #[ApiFilter(GroupFilter::class, arguments: ['whitelist' => ['access_people_ref']])]
  77. class Access implements UserInterface, PasswordAuthenticatedUserInterface
  78. {
  79. use CreatedOnAndByTrait;
  80. #[ORM\Id]
  81. #[ORM\Column]
  82. #[ORM\GeneratedValue]
  83. #[Groups('access_people_ref')]
  84. private ?int $id = null;
  85. #[ORM\Column(options: ['default' => false])]
  86. private bool $adminAccess = false;
  87. #[ORM\Column(options: ['default' => false])]
  88. #[Groups(['private'])]
  89. private bool $superAdminAccess = false;
  90. #[ORM\Column(nullable: true)]
  91. #[Groups(['my_access:input'])]
  92. private ?int $activityYear = null;
  93. #[ORM\ManyToOne(cascade: ['persist'], inversedBy: 'access')]
  94. #[ORM\JoinColumn(nullable: false)]
  95. #[Groups(['access_people_ref', 'access_address'])]
  96. private Person $person;
  97. #[ORM\ManyToOne(inversedBy: 'accesses')]
  98. #[ORM\JoinColumn(nullable: false)]
  99. private Organization $organization;
  100. /** @var mixed[]|null */
  101. #[ORM\Column(type: 'json', length: 4294967295, nullable: true)]
  102. private ?array $roles = [];
  103. #[ORM\Column(options: ['default' => false])]
  104. private bool $loginEnabled = false;
  105. /** @var mixed[]|null */
  106. #[Groups(['my_access:input'])]
  107. #[ORM\Column(type: 'json', length: 4294967295, nullable: true)]
  108. private ?array $setting = [];
  109. #[ORM\OneToOne(mappedBy: 'access', cascade: ['persist'], orphanRemoval: true)]
  110. private AccessBilling $accessBilling;
  111. #[ORM\OneToMany(mappedBy: 'access', targetEntity: PersonActivity::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
  112. private Collection $personActivity;
  113. #[ORM\OneToMany(mappedBy: 'access', targetEntity: OrganizationFunction::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
  114. private Collection $organizationFunction;
  115. #[ORM\OneToMany(mappedBy: 'licensee', targetEntity: OrganizationLicence::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
  116. private Collection $organizationLicences;
  117. #[ORM\OneToMany(mappedBy: 'access', targetEntity: PersonalizedList::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
  118. private Collection $personalizedLists;
  119. #[ORM\OneToMany(mappedBy: 'recipientAccess', targetEntity: Notification::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
  120. private Collection $notifications;
  121. #[ORM\OneToMany(mappedBy: 'access', targetEntity: NotificationUser::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
  122. private Collection $notificationUsers;
  123. #[ORM\ManyToMany(targetEntity: Access::class, mappedBy: 'children', cascade: ['persist'])]
  124. private Collection $guardians;
  125. #[ORM\ManyToMany(targetEntity: Access::class, inversedBy: 'guardians', cascade: ['persist'])]
  126. #[ORM\JoinTable(name: 'children_guardians')]
  127. #[ORM\JoinColumn(name: 'guardians_id', referencedColumnName: 'id')]
  128. #[ORM\InverseJoinColumn(name: 'children_id', referencedColumnName: 'id')]
  129. private Collection $children;
  130. #[ORM\OneToMany(mappedBy: 'accessPayer', targetEntity: AccessPayer::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
  131. private Collection $billingPayers;
  132. #[ORM\OneToMany(mappedBy: 'accessReceiver', targetEntity: AccessPayer::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
  133. private Collection $billingReceivers;
  134. #[ORM\OneToMany(mappedBy: 'access', targetEntity: AccessIntangible::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
  135. private Collection $accessIntangibles;
  136. #[ORM\ManyToOne(inversedBy: 'publicationDirectors')]
  137. #[ORM\JoinColumn(referencedColumnName: 'id', nullable: false)]
  138. private ?Parameters $publicationDirector;
  139. #[ORM\ManyToOne(inversedBy: 'teachers')]
  140. #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
  141. private ?EducationNotationConfig $educationNotationConfig;
  142. #[ORM\OneToMany(mappedBy: 'company', targetEntity: CompanyPerson::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
  143. private Collection $companyPersonAccesses;
  144. #[ORM\OneToMany(mappedBy: 'access', targetEntity: CompanyPerson::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
  145. private Collection $companyPersonCompany;
  146. #[ORM\OneToMany(mappedBy: 'access', targetEntity: EducationStudent::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
  147. private Collection $educationStudent;
  148. #[ORM\ManyToMany(targetEntity: EducationStudent::class, mappedBy: 'teachers', cascade: ['persist', 'remove'], orphanRemoval: true)]
  149. private Collection $educationStudentByTeacher;
  150. #[ORM\OneToMany(mappedBy: 'teacher', targetEntity: EducationTeacher::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
  151. private Collection $educationTeachers;
  152. #[ORM\OneToMany(mappedBy: 'access', targetEntity: PersonHoliday::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
  153. private Collection $holidays;
  154. #[ORM\ManyToMany(targetEntity: Course::class, mappedBy: 'students', cascade: ['persist'])]
  155. private Collection $courses;
  156. #[ORM\ManyToMany(targetEntity: Course::class, mappedBy: 'organizer', cascade: ['persist'])]
  157. private Collection $practicalCourses;
  158. #[ORM\ManyToMany(targetEntity: Event::class, mappedBy: 'organizer', cascade: ['persist'])]
  159. private Collection $eventOrganizers;
  160. #[ORM\ManyToMany(targetEntity: EducationalProject::class, mappedBy: 'organizer', cascade: ['persist'])]
  161. private Collection $educationalProjectOrganizers;
  162. #[ORM\ManyToOne(cascade: ['persist'], inversedBy: 'accesses')]
  163. #[ORM\JoinColumn(referencedColumnName: 'id', nullable: false, onDelete: 'SET NULL')]
  164. private AccessFamily $accessFamily;
  165. #[ORM\Column]
  166. private bool $newAccess = false;
  167. #[ORM\Column]
  168. private bool $ielEnabled = false;
  169. #[ORM\OneToMany(mappedBy: 'educationalProjectPayer', targetEntity: EducationalProjectPayer::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
  170. private Collection $billingEducationalProjectPayers;
  171. #[ORM\OneToMany(mappedBy: 'access', targetEntity: Bill::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
  172. private Collection $bills;
  173. #[ORM\OneToMany(mappedBy: 'access', targetEntity: BillLine::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
  174. private Collection $billLines;
  175. #[ORM\OneToMany(mappedBy: 'access', targetEntity: BillCredit::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
  176. private Collection $billCredits;
  177. #[ORM\OneToMany(mappedBy: 'silentPartner', targetEntity: EducationalProject::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
  178. private Collection $silentPartners;
  179. #[ORM\OneToMany(mappedBy: 'operationalPartner', targetEntity: EducationalProject::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
  180. private Collection $operationalPartners;
  181. #[ORM\OneToMany(mappedBy: 'guest', targetEntity: EventUser::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
  182. private Collection $eventUsers;
  183. #[ORM\OneToMany(mappedBy: 'student', targetEntity: ExamenConvocation::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
  184. private Collection $examenConvocations;
  185. #[ORM\OneToMany(mappedBy: 'provider', targetEntity: EquipmentRepair::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
  186. private Collection $equipmentRepairProviders;
  187. #[ORM\OneToMany(mappedBy: 'access', targetEntity: Attendance::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
  188. private Collection $attendances;
  189. #[ORM\OneToMany(mappedBy: 'access', targetEntity: AttendanceBooking::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
  190. private Collection $attendanceBookings;
  191. #[ORM\OneToMany(mappedBy: 'replacement', targetEntity: Attendance::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
  192. private Collection $attendanceReplacements;
  193. #[ORM\OneToMany(mappedBy: 'provider', targetEntity: RoomRepair::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
  194. private Collection $roomRepairProviders;
  195. #[ORM\OneToMany(mappedBy: 'provider', targetEntity: PlaceRepair::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
  196. private Collection $placeRepairProviders;
  197. #[ORM\OneToMany(mappedBy: 'author', targetEntity: Email::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
  198. private Collection $emails;
  199. #[ORM\OneToMany(mappedBy: 'author', targetEntity: Mail::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
  200. private Collection $mails;
  201. #[ORM\OneToMany(mappedBy: 'author', targetEntity: Sms::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
  202. private Collection $sms;
  203. #[ORM\ManyToMany(targetEntity: Jury::class, mappedBy: 'members', orphanRemoval: true)]
  204. private Collection $juryMembers;
  205. #[ORM\OneToMany(mappedBy: 'contactPerson', targetEntity: Organization::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
  206. private Collection $organizationContacts;
  207. #[ORM\OneToMany(mappedBy: 'member', targetEntity: CommissionMember::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
  208. private Collection $commissionMembers;
  209. #[ORM\OneToMany(mappedBy: 'supplier', targetEntity: Equipment::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
  210. private Collection $equipmentSuppliers;
  211. #[ORM\OneToMany(mappedBy: 'controlManager', targetEntity: Equipment::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
  212. private Collection $equipmentControlManagers;
  213. #[ORM\OneToMany(mappedBy: 'editor', targetEntity: Equipment::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
  214. private Collection $equipmentEditors;
  215. #[ORM\OneToMany(mappedBy: 'borrower', targetEntity: EquipmentLoan::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
  216. private Collection $equipmentLoans;
  217. #[ORM\OneToMany(mappedBy: 'access', targetEntity: Equipment::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
  218. private Collection $equipments;
  219. #[ORM\OneToMany(mappedBy: 'access', targetEntity: AccessFictionalIntangible::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
  220. private Collection $accessFictionalIntangibles;
  221. #[ORM\OneToMany(mappedBy: 'access', targetEntity: Donor::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
  222. private Collection $donors;
  223. #[ORM\OneToMany(mappedBy: 'access', targetEntity: AccessReward::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
  224. private Collection $accessRewards;
  225. #[ORM\OneToMany(mappedBy: 'access', targetEntity: OrganizationResponsability::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
  226. private Collection $organizationResponsabilities;
  227. #[ORM\OneToMany(mappedBy: 'accessOriginal', targetEntity: AccessWish::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
  228. private Collection $accessWishes;
  229. #[ORM\OneToMany(mappedBy: 'student', targetEntity: WorkByUser::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
  230. private Collection $workByUsers;
  231. #[ORM\ManyToMany(targetEntity: Tagg::class, inversedBy: 'accesses', cascade: ['persist'])]
  232. #[ORM\JoinTable(name: 'tag_access')]
  233. #[ORM\JoinColumn(name: 'access_id', referencedColumnName: 'id')]
  234. #[ORM\InverseJoinColumn(name: 'tag_id', referencedColumnName: 'id')]
  235. private Collection $tags;
  236. #[ORM\OneToOne(mappedBy: 'access', cascade: ['persist'], fetch: 'EAGER', orphanRemoval: true)]
  237. private ?Preferences $preferences;
  238. #[Pure]
  239. public function __construct()
  240. {
  241. $this->personActivity = new ArrayCollection();
  242. $this->organizationFunction = new ArrayCollection();
  243. $this->organizationLicences = new ArrayCollection();
  244. $this->personalizedLists = new ArrayCollection();
  245. $this->guardians = new ArrayCollection();
  246. $this->children = new ArrayCollection();
  247. $this->billingPayers = new ArrayCollection();
  248. $this->billingReceivers = new ArrayCollection();
  249. $this->accessIntangibles = new ArrayCollection();
  250. $this->notifications = new ArrayCollection();
  251. $this->notificationUsers = new ArrayCollection();
  252. $this->companyPersonAccesses = new ArrayCollection();
  253. $this->companyPersonCompany = new ArrayCollection();
  254. $this->educationStudent = new ArrayCollection();
  255. $this->educationStudentByTeacher = new ArrayCollection();
  256. $this->educationTeachers = new ArrayCollection();
  257. $this->holidays = new ArrayCollection();
  258. $this->courses = new ArrayCollection();
  259. $this->practicalCourses = new ArrayCollection();
  260. $this->billingEducationalProjectPayers = new ArrayCollection();
  261. $this->bills = new ArrayCollection();
  262. $this->billLines = new ArrayCollection();
  263. $this->billCredits = new ArrayCollection();
  264. $this->silentPartners = new ArrayCollection();
  265. $this->operationalPartners = new ArrayCollection();
  266. $this->eventUsers = new ArrayCollection();
  267. $this->examenConvocations = new ArrayCollection();
  268. $this->equipmentRepairProviders = new ArrayCollection();
  269. $this->attendances = new ArrayCollection();
  270. $this->attendanceBookings = new ArrayCollection();
  271. $this->attendanceReplacements = new ArrayCollection();
  272. $this->roomRepairProviders = new ArrayCollection();
  273. $this->placeRepairProviders = new ArrayCollection();
  274. $this->juryMembers = new ArrayCollection();
  275. $this->organizationContacts = new ArrayCollection();
  276. $this->commissionMembers = new ArrayCollection();
  277. $this->equipmentSuppliers = new ArrayCollection();
  278. $this->equipmentControlManagers = new ArrayCollection();
  279. $this->equipmentEditors = new ArrayCollection();
  280. $this->equipmentLoans = new ArrayCollection();
  281. $this->equipments = new ArrayCollection();
  282. $this->accessFictionalIntangibles = new ArrayCollection();
  283. $this->donors = new ArrayCollection();
  284. $this->accessRewards = new ArrayCollection();
  285. $this->organizationResponsabilities = new ArrayCollection();
  286. $this->accessWishes = new ArrayCollection();
  287. $this->workByUsers = new ArrayCollection();
  288. $this->tags = new ArrayCollection();
  289. $this->eventOrganizers = new ArrayCollection();
  290. $this->educationalProjectOrganizers = new ArrayCollection();
  291. $this->emails = new ArrayCollection();
  292. $this->mails = new ArrayCollection();
  293. $this->sms = new ArrayCollection();
  294. }
  295. public function getId(): ?int
  296. {
  297. return $this->id;
  298. }
  299. public function getAdminAccess(): ?bool
  300. {
  301. return $this->adminAccess;
  302. }
  303. public function setAdminAccess(bool $adminAccess): self
  304. {
  305. $this->adminAccess = $adminAccess;
  306. return $this;
  307. }
  308. public function getSuperAdminAccess(): ?bool
  309. {
  310. return $this->superAdminAccess;
  311. }
  312. public function setSuperAdminAccess(bool $superAdminAccess): self
  313. {
  314. $this->superAdminAccess = $superAdminAccess;
  315. return $this;
  316. }
  317. public function getPerson(): ?Person
  318. {
  319. return $this->person;
  320. }
  321. public function setPerson(?Person $person): self
  322. {
  323. $this->person = $person;
  324. return $this;
  325. }
  326. public function getOrganization(): ?Organization
  327. {
  328. return $this->organization;
  329. }
  330. public function setOrganization(?Organization $organization): self
  331. {
  332. $this->organization = $organization;
  333. return $this;
  334. }
  335. public function getActivityYear(): ?int
  336. {
  337. return $this->activityYear;
  338. }
  339. public function setActivityYear(?int $activityYear): self
  340. {
  341. $this->activityYear = $activityYear;
  342. return $this;
  343. }
  344. /**
  345. * @return array<mixed>
  346. */
  347. public function getHistorical(): array
  348. {
  349. return array_key_exists('historical', $this->setting) && $this->setting['historical'] ? $this->setting['historical'] : ['present' => true];
  350. }
  351. /**
  352. * @param array<mixed> $historical
  353. *
  354. * @return $this
  355. */
  356. #[Groups(['my_access:input'])]
  357. public function setHistorical(array $historical): self
  358. {
  359. // Une entrée dateStart mais pas de dateEnd, on retire dateEnd
  360. if (array_key_exists('dateStart', $historical) && !array_key_exists('dateEnd', $historical)) {
  361. unset($historical['dateStart']);
  362. }
  363. // Une entrée dateEnd mais pas de dateStart, on retire dateEnd
  364. elseif (!array_key_exists('dateStart', $historical) && array_key_exists('dateEnd', $historical)) {
  365. unset($historical['dateEnd']);
  366. }
  367. // Les entrées dateStart et dateEnd existent mais ne sont pas toutes les deux renseignées, on retire les deux
  368. if (
  369. array_key_exists('dateStart', $historical)
  370. && array_key_exists('dateEnd', $historical)
  371. && (!$historical['dateStart'] || !$historical['dateEnd'])
  372. ) {
  373. unset($historical['dateStart']);
  374. unset($historical['dateEnd']);
  375. }
  376. // Aucun temps ni période n'est défini, on définit par défaut present à vrai
  377. if (!$historical['past'] && !$historical['present'] && !$historical['future'] && !array_key_exists('dateStart', $historical)) {
  378. $historical['present'] = true;
  379. }
  380. $this->setting['historical'] = $historical;
  381. return $this;
  382. }
  383. /**
  384. * @param mixed[]|null $roles
  385. *
  386. * @return $this
  387. */
  388. public function setRoles(?array $roles): self
  389. {
  390. $this->roles = $roles;
  391. return $this;
  392. }
  393. /**
  394. * @return mixed[]
  395. */
  396. public function getRoles(): array
  397. {
  398. $roles = $this->roles;
  399. return array_unique($roles ?? []);
  400. }
  401. public function isLoginEnabled(): bool
  402. {
  403. return $this->loginEnabled;
  404. }
  405. public function setLoginEnabled(bool $loginEnabled): self
  406. {
  407. $this->loginEnabled = $loginEnabled;
  408. return $this;
  409. }
  410. public function getPersonActivity(): Collection
  411. {
  412. return $this->personActivity;
  413. }
  414. public function addPersonActivity(PersonActivity $personActivity): self
  415. {
  416. if (!$this->personActivity->contains($personActivity)) {
  417. $this->personActivity[] = $personActivity;
  418. $personActivity->setAccess($this);
  419. }
  420. return $this;
  421. }
  422. public function removePersonActivity(PersonActivity $personActivity): self
  423. {
  424. if ($this->personActivity->removeElement($personActivity)) {
  425. // set the owning side to null (unless already changed)
  426. if ($personActivity->getAccess() === $this) {
  427. $personActivity->setAccess(null);
  428. }
  429. }
  430. return $this;
  431. }
  432. public function getOrganizationFunction(): Collection
  433. {
  434. return $this->organizationFunction;
  435. }
  436. public function addOrganizationFunction(OrganizationFunction $organizationFunction): self
  437. {
  438. if (!$this->organizationFunction->contains($organizationFunction)) {
  439. $this->organizationFunction[] = $organizationFunction;
  440. $organizationFunction->setAccess($this);
  441. }
  442. return $this;
  443. }
  444. public function removeOrganizationFunction(OrganizationFunction $organizationFunction): self
  445. {
  446. if ($this->organizationFunction->removeElement($organizationFunction)) {
  447. // set the owning side to null (unless already changed)
  448. if ($organizationFunction->getAccess() === $this) {
  449. $organizationFunction->setAccess(null);
  450. }
  451. }
  452. return $this;
  453. }
  454. public function getOrganizationLicences(): Collection
  455. {
  456. return $this->organizationLicences;
  457. }
  458. public function addOrganizationLicence(OrganizationLicence $organizationLicence): self
  459. {
  460. if (!$this->organizationLicences->contains($organizationLicence)) {
  461. $this->organizationLicences[] = $organizationLicence;
  462. $organizationLicence->setLicensee($this);
  463. }
  464. return $this;
  465. }
  466. public function removeOrganizationLicence(OrganizationLicence $organizationLicence): self
  467. {
  468. if ($this->organizationLicences->removeElement($organizationLicence)) {
  469. // set the owning side to null (unless already changed)
  470. if ($organizationLicence->getLicensee() === $this) {
  471. $organizationLicence->setLicensee(null);
  472. }
  473. }
  474. return $this;
  475. }
  476. public function getPersonalizedLists(): Collection
  477. {
  478. return $this->personalizedLists;
  479. }
  480. public function addPersonalizedList(PersonalizedList $personalizedList): self
  481. {
  482. if (!$this->personalizedLists->contains($personalizedList)) {
  483. $this->personalizedLists[] = $personalizedList;
  484. $personalizedList->setAccess($this);
  485. }
  486. return $this;
  487. }
  488. public function removePersonalizedList(PersonalizedList $personalizedList): self
  489. {
  490. if ($this->personalizedLists->removeElement($personalizedList)) {
  491. // set the owning side to null (unless already changed)
  492. if ($personalizedList->getAccess() === $this) {
  493. $personalizedList->setAccess(null);
  494. }
  495. }
  496. return $this;
  497. }
  498. public function getChildren(): Collection
  499. {
  500. return $this->children;
  501. }
  502. public function addChild(Access $access): self
  503. {
  504. if (!$this->children->contains($access)) {
  505. $this->children[] = $access;
  506. $access->addGuardian($this);
  507. }
  508. return $this;
  509. }
  510. public function removeChild(Access $access): self
  511. {
  512. if ($this->children->removeElement($access)) {
  513. $access->removeGuardian($this);
  514. }
  515. return $this;
  516. }
  517. public function getGuardians(): Collection
  518. {
  519. return $this->guardians;
  520. }
  521. public function addGuardian(Access $access): self
  522. {
  523. if (!$this->guardians->contains($access)) {
  524. $this->guardians[] = $access;
  525. $access->addChild($this);
  526. }
  527. return $this;
  528. }
  529. public function removeGuardian(Access $access): self
  530. {
  531. if ($this->guardians->removeElement($access)) {
  532. $access->removeChild($this);
  533. }
  534. return $this;
  535. }
  536. public function getBillingPayers(): Collection
  537. {
  538. return $this->billingPayers;
  539. }
  540. public function addBillingPayer(AccessPayer $billingPayer): self
  541. {
  542. if (!$this->billingPayers->contains($billingPayer)) {
  543. $this->billingPayers[] = $billingPayer;
  544. $billingPayer->setAccessPayer($this);
  545. }
  546. return $this;
  547. }
  548. public function removeBillingPayer(AccessPayer $billingPayer): self
  549. {
  550. if ($this->billingPayers->removeElement($billingPayer)) {
  551. // set the owning side to null (unless already changed)
  552. if ($billingPayer->getAccessPayer() === $this) {
  553. $billingPayer->setAccessPayer(null);
  554. }
  555. }
  556. return $this;
  557. }
  558. public function getBillingReceivers(): Collection
  559. {
  560. return $this->billingReceivers;
  561. }
  562. public function addBillingReceiver(AccessPayer $billingReceiver): self
  563. {
  564. if (!$this->billingReceivers->contains($billingReceiver)) {
  565. $this->billingReceivers[] = $billingReceiver;
  566. $billingReceiver->setAccessReceiver($this);
  567. }
  568. return $this;
  569. }
  570. public function removeBillingReceiver(AccessPayer $billingPayer): self
  571. {
  572. if ($this->billingReceivers->removeElement($billingPayer)) {
  573. // set the owning side to null (unless already changed)
  574. if ($billingPayer->getAccessReceiver() === $this) {
  575. $billingPayer->setAccessReceiver(null);
  576. }
  577. }
  578. return $this;
  579. }
  580. public function getAccessIntangibles(): Collection
  581. {
  582. return $this->accessIntangibles;
  583. }
  584. public function addAccessIntangible(AccessIntangible $accessIntangibles): self
  585. {
  586. if (!$this->accessIntangibles->contains($accessIntangibles)) {
  587. $this->accessIntangibles[] = $accessIntangibles;
  588. $accessIntangibles->setAccess($this);
  589. }
  590. return $this;
  591. }
  592. public function removeAccessIntangible(AccessIntangible $accessIntangibles): self
  593. {
  594. if ($this->accessIntangibles->removeElement($accessIntangibles)) {
  595. // set the owning side to null (unless already changed)
  596. if ($accessIntangibles->getAccess() === $this) {
  597. $accessIntangibles->setAccess(null);
  598. }
  599. }
  600. return $this;
  601. }
  602. public function getNotifications(): Collection
  603. {
  604. return $this->notifications;
  605. }
  606. public function addNotification(Notification $notification): self
  607. {
  608. if (!$this->notifications->contains($notification)) {
  609. $this->notifications[] = $notification;
  610. $notification->setRecipientAccess($this);
  611. }
  612. return $this;
  613. }
  614. public function removeNotification(Notification $notification): self
  615. {
  616. if ($this->notifications->removeElement($notification)) {
  617. // set the owning side to null (unless already changed)
  618. if ($notification->getRecipientAccess() === $this) {
  619. $notification->setRecipientAccess(null);
  620. }
  621. }
  622. return $this;
  623. }
  624. public function getNotificationUsers(): Collection
  625. {
  626. return $this->notificationUsers;
  627. }
  628. public function addNotificationUser(NotificationUser $notificationUser): self
  629. {
  630. if (!$this->notificationUsers->contains($notificationUser)) {
  631. $this->notificationUsers[] = $notificationUser;
  632. $notificationUser->setAccess($this);
  633. }
  634. return $this;
  635. }
  636. public function removeNotificationUser(NotificationUser $notificationUser): self
  637. {
  638. if ($this->notificationUsers->removeElement($notificationUser)) {
  639. // set the owning side to null (unless already changed)
  640. if ($notificationUser->getAccess() === $this) {
  641. $notificationUser->setAccess(null);
  642. }
  643. }
  644. return $this;
  645. }
  646. public function getPublicationDirector(): ?Parameters
  647. {
  648. return $this->publicationDirector;
  649. }
  650. public function setPublicationDirector(?Parameters $parameters): self
  651. {
  652. $this->publicationDirector = $parameters;
  653. return $this;
  654. }
  655. public function getEducationNotationConfig(): ?EducationNotationConfig
  656. {
  657. return $this->educationNotationConfig;
  658. }
  659. public function setEducationNotationConfig(?EducationNotationConfig $educationNotationConfig): self
  660. {
  661. $this->educationNotationConfig = $educationNotationConfig;
  662. return $this;
  663. }
  664. #[Pure]
  665. public function getUserIdentifier(): string
  666. {
  667. return $this->person->getUserIdentifier();
  668. }
  669. public function getPassword(): ?string
  670. {
  671. return null;
  672. }
  673. public function getSalt(): ?string
  674. {
  675. return null;
  676. }
  677. public function getUsername(): ?string
  678. {
  679. return null;
  680. }
  681. public function eraseCredentials(): void
  682. {
  683. // TODO: Implement eraseCredentials() method.
  684. }
  685. /**
  686. * @return mixed[]|null
  687. */
  688. public function getSetting(): ?array
  689. {
  690. return $this->setting;
  691. }
  692. /**
  693. * @param mixed[]|null $setting
  694. *
  695. * @return $this
  696. */
  697. public function setSetting(?array $setting): self
  698. {
  699. $this->setting = $setting;
  700. return $this;
  701. }
  702. /**
  703. * @return Collection<int, CompanyPerson>
  704. */
  705. public function getCompanyPersonAccesses(): Collection
  706. {
  707. return $this->companyPersonAccesses;
  708. }
  709. public function addCompanyPersonAccess(CompanyPerson $companyPersonAccess): self
  710. {
  711. if (!$this->companyPersonAccesses->contains($companyPersonAccess)) {
  712. $this->companyPersonAccesses[] = $companyPersonAccess;
  713. $companyPersonAccess->setCompany($this);
  714. }
  715. return $this;
  716. }
  717. public function removeCompanyPersonAccess(CompanyPerson $companyPersonAccess): self
  718. {
  719. if ($this->companyPersonAccesses->removeElement($companyPersonAccess)) {
  720. // set the owning side to null (unless already changed)
  721. if ($companyPersonAccess->getCompany() === $this) {
  722. $companyPersonAccess->setCompany(null);
  723. }
  724. }
  725. return $this;
  726. }
  727. /**
  728. * @return Collection<int, CompanyPerson>
  729. */
  730. public function getCompanyPersonCompany(): Collection
  731. {
  732. return $this->companyPersonCompany;
  733. }
  734. public function addCompanyPersonCompany(CompanyPerson $companyPersonCompany): self
  735. {
  736. if (!$this->companyPersonCompany->contains($companyPersonCompany)) {
  737. $this->companyPersonCompany[] = $companyPersonCompany;
  738. $companyPersonCompany->setAccess($this);
  739. }
  740. return $this;
  741. }
  742. public function removeCompanyPersonCompany(CompanyPerson $companyPersonCompany): self
  743. {
  744. if ($this->companyPersonCompany->removeElement($companyPersonCompany)) {
  745. // set the owning side to null (unless already changed)
  746. if ($companyPersonCompany->getAccess() === $this) {
  747. $companyPersonCompany->setAccess(null);
  748. }
  749. }
  750. return $this;
  751. }
  752. /**
  753. * @return Collection<int, EducationStudent>
  754. */
  755. public function getEducationStudent(): Collection
  756. {
  757. return $this->educationStudent;
  758. }
  759. public function addEducationStudent(EducationStudent $educationStudent): self
  760. {
  761. if (!$this->educationStudent->contains($educationStudent)) {
  762. $this->educationStudent[] = $educationStudent;
  763. $educationStudent->setAccess($this);
  764. }
  765. return $this;
  766. }
  767. public function removeEducationStudent(EducationStudent $educationStudent): self
  768. {
  769. if ($this->educationStudent->removeElement($educationStudent)) {
  770. // set the owning side to null (unless already changed)
  771. if ($educationStudent->getAccess() === $this) {
  772. $educationStudent->setAccess(null);
  773. }
  774. }
  775. return $this;
  776. }
  777. /**
  778. * @return Collection<int, EducationStudent>
  779. */
  780. public function getEducationStudentByTeacher(): Collection
  781. {
  782. return $this->educationStudentByTeacher;
  783. }
  784. public function addEducationStudentByTeacher(EducationStudent $educationStudentByTeacher): self
  785. {
  786. if (!$this->educationStudentByTeacher->contains($educationStudentByTeacher)) {
  787. $this->educationStudentByTeacher[] = $educationStudentByTeacher;
  788. $educationStudentByTeacher->addTeacher($this);
  789. }
  790. return $this;
  791. }
  792. public function removeEducationStudentByTeacher(EducationStudent $educationStudentByTeacher): self
  793. {
  794. if ($this->educationStudentByTeacher->removeElement($educationStudentByTeacher)) {
  795. $educationStudentByTeacher->removeTeacher($this);
  796. }
  797. return $this;
  798. }
  799. /**
  800. * @return Collection<int, EducationTeacher>
  801. */
  802. public function getEducationTeachers(): Collection
  803. {
  804. return $this->educationTeachers;
  805. }
  806. public function addEducationTeacher(EducationTeacher $educationTeacher): self
  807. {
  808. if (!$this->educationTeachers->contains($educationTeacher)) {
  809. $this->educationTeachers[] = $educationTeacher;
  810. $educationTeacher->setTeacher($this);
  811. }
  812. return $this;
  813. }
  814. public function removeEducationTeacher(EducationTeacher $educationTeacher): self
  815. {
  816. if ($this->educationTeachers->removeElement($educationTeacher)) {
  817. // set the owning side to null (unless already changed)
  818. if ($educationTeacher->getTeacher() === $this) {
  819. $educationTeacher->setTeacher(null);
  820. }
  821. }
  822. return $this;
  823. }
  824. /**
  825. * @return Collection<int, PersonHoliday>
  826. */
  827. public function getHolidays(): Collection
  828. {
  829. return $this->holidays;
  830. }
  831. public function addHoliday(PersonHoliday $holiday): self
  832. {
  833. if (!$this->holidays->contains($holiday)) {
  834. $this->holidays[] = $holiday;
  835. $holiday->setAccess($this);
  836. }
  837. return $this;
  838. }
  839. public function removeHoliday(PersonHoliday $holiday): self
  840. {
  841. if ($this->holidays->removeElement($holiday)) {
  842. // set the owning side to null (unless already changed)
  843. if ($holiday->getAccess() === $this) {
  844. $holiday->setAccess(null);
  845. }
  846. }
  847. return $this;
  848. }
  849. /**
  850. * @return Collection<int, Course>
  851. */
  852. public function getCourses(): Collection
  853. {
  854. return $this->courses;
  855. }
  856. public function addCourse(Course $course): self
  857. {
  858. if (!$this->courses->contains($course)) {
  859. $this->courses[] = $course;
  860. $course->addStudent($this);
  861. }
  862. return $this;
  863. }
  864. public function removeCourse(Course $course): self
  865. {
  866. if ($this->courses->removeElement($course)) {
  867. $course->removeStudent($this);
  868. }
  869. return $this;
  870. }
  871. /**
  872. * @return Collection<int, Course>
  873. */
  874. public function getPracticalCourses(): Collection
  875. {
  876. return $this->practicalCourses;
  877. }
  878. public function addPracticalCourse(Course $practicalCourse): self
  879. {
  880. if (!$this->practicalCourses->contains($practicalCourse)) {
  881. $this->practicalCourses[] = $practicalCourse;
  882. $practicalCourse->addOrganizer($this);
  883. }
  884. return $this;
  885. }
  886. public function removePracticalCourse(Course $practicalCourse): self
  887. {
  888. if ($this->practicalCourses->removeElement($practicalCourse)) {
  889. $practicalCourse->removeOrganizer($this);
  890. }
  891. return $this;
  892. }
  893. public function getAccessFamily(): ?AccessFamily
  894. {
  895. return $this->accessFamily;
  896. }
  897. public function setAccessFamily(?AccessFamily $accessFamily): self
  898. {
  899. $this->accessFamily = $accessFamily;
  900. return $this;
  901. }
  902. public function isNewAccess(): bool
  903. {
  904. return $this->newAccess;
  905. }
  906. public function setNewAccess(bool $newAccess): void
  907. {
  908. $this->newAccess = $newAccess;
  909. }
  910. public function isIelEnabled(): bool
  911. {
  912. return $this->ielEnabled;
  913. }
  914. public function setIelEnabled(bool $ielEnabled): void
  915. {
  916. $this->ielEnabled = $ielEnabled;
  917. }
  918. /**
  919. * @return Collection<int, EducationalProjectPayer>
  920. */
  921. public function getBillingEducationalProjectPayers(): Collection
  922. {
  923. return $this->billingEducationalProjectPayers;
  924. }
  925. public function addBillingEducationalProjectPayer(EducationalProjectPayer $billingEducationalProjectPayer): self
  926. {
  927. if (!$this->billingEducationalProjectPayers->contains($billingEducationalProjectPayer)) {
  928. $this->billingEducationalProjectPayers[] = $billingEducationalProjectPayer;
  929. $billingEducationalProjectPayer->setEducationalProjectPayer($this);
  930. }
  931. return $this;
  932. }
  933. public function removeBillingEducationalProjectPayer(EducationalProjectPayer $billingEducationalProjectPayer): self
  934. {
  935. if ($this->billingEducationalProjectPayers->removeElement($billingEducationalProjectPayer)) {
  936. // set the owning side to null (unless already changed)
  937. if ($billingEducationalProjectPayer->getEducationalProjectPayer() === $this) {
  938. $billingEducationalProjectPayer->setEducationalProjectPayer(null);
  939. }
  940. }
  941. return $this;
  942. }
  943. /**
  944. * @return Collection<int, Bill>
  945. */
  946. public function getBills(): Collection
  947. {
  948. return $this->bills;
  949. }
  950. public function addBill(Bill $bill): self
  951. {
  952. if (!$this->bills->contains($bill)) {
  953. $this->bills[] = $bill;
  954. $bill->setAccess($this);
  955. }
  956. return $this;
  957. }
  958. public function removeBill(Bill $bill): self
  959. {
  960. if ($this->bills->removeElement($bill)) {
  961. // set the owning side to null (unless already changed)
  962. if ($bill->getAccess() === $this) {
  963. $bill->setAccess(null);
  964. }
  965. }
  966. return $this;
  967. }
  968. /**
  969. * @return Collection<int, BillLine>
  970. */
  971. public function getBillLines(): Collection
  972. {
  973. return $this->billLines;
  974. }
  975. public function addBillLine(BillLine $billLine): self
  976. {
  977. if (!$this->billLines->contains($billLine)) {
  978. $this->billLines[] = $billLine;
  979. $billLine->setAccess($this);
  980. }
  981. return $this;
  982. }
  983. public function removeBillLine(BillLine $billLine): self
  984. {
  985. if ($this->billLines->removeElement($billLine)) {
  986. // set the owning side to null (unless already changed)
  987. if ($billLine->getAccess() === $this) {
  988. $billLine->setAccess(null);
  989. }
  990. }
  991. return $this;
  992. }
  993. /**
  994. * @return Collection<int, BillCredit>
  995. */
  996. public function getBillCredits(): Collection
  997. {
  998. return $this->billCredits;
  999. }
  1000. public function addBillCredit(BillCredit $billCredit): self
  1001. {
  1002. if (!$this->billCredits->contains($billCredit)) {
  1003. $this->billCredits[] = $billCredit;
  1004. $billCredit->setAccess($this);
  1005. }
  1006. return $this;
  1007. }
  1008. public function removeBillCredit(BillCredit $billCredit): self
  1009. {
  1010. if ($this->billCredits->removeElement($billCredit)) {
  1011. // set the owning side to null (unless already changed)
  1012. if ($billCredit->getAccess() === $this) {
  1013. $billCredit->setAccess(null);
  1014. }
  1015. }
  1016. return $this;
  1017. }
  1018. /**
  1019. * @return Collection<int, EducationalProject>
  1020. */
  1021. public function getSilentPartners(): Collection
  1022. {
  1023. return $this->silentPartners;
  1024. }
  1025. public function addSilentPartner(EducationalProject $silentPartner): self
  1026. {
  1027. if (!$this->silentPartners->contains($silentPartner)) {
  1028. $this->silentPartners[] = $silentPartner;
  1029. $silentPartner->setSilentPartner($this);
  1030. }
  1031. return $this;
  1032. }
  1033. public function removeSilentPartner(EducationalProject $silentPartner): self
  1034. {
  1035. if ($this->silentPartners->removeElement($silentPartner)) {
  1036. // set the owning side to null (unless already changed)
  1037. if ($silentPartner->getSilentPartner() === $this) {
  1038. $silentPartner->setSilentPartner(null);
  1039. }
  1040. }
  1041. return $this;
  1042. }
  1043. /**
  1044. * @return Collection<int, EducationalProject>
  1045. */
  1046. public function getOperationalPartners(): Collection
  1047. {
  1048. return $this->operationalPartners;
  1049. }
  1050. public function addOperationalPartner(EducationalProject $operationalPartner): self
  1051. {
  1052. if (!$this->operationalPartners->contains($operationalPartner)) {
  1053. $this->operationalPartners[] = $operationalPartner;
  1054. $operationalPartner->setOperationalPartner($this);
  1055. }
  1056. return $this;
  1057. }
  1058. public function removeOperationalPartner(EducationalProject $operationalPartner): self
  1059. {
  1060. if ($this->operationalPartners->removeElement($operationalPartner)) {
  1061. // set the owning side to null (unless already changed)
  1062. if ($operationalPartner->getOperationalPartner() === $this) {
  1063. $operationalPartner->setOperationalPartner(null);
  1064. }
  1065. }
  1066. return $this;
  1067. }
  1068. /**
  1069. * @return Collection<int, EventUser>
  1070. */
  1071. public function getEventUsers(): Collection
  1072. {
  1073. return $this->eventUsers;
  1074. }
  1075. public function addEventUser(EventUser $eventUser): self
  1076. {
  1077. if (!$this->eventUsers->contains($eventUser)) {
  1078. $this->eventUsers[] = $eventUser;
  1079. $eventUser->setGuest($this);
  1080. }
  1081. return $this;
  1082. }
  1083. public function removeEventUser(EventUser $eventUser): self
  1084. {
  1085. if ($this->eventUsers->removeElement($eventUser)) {
  1086. // set the owning side to null (unless already changed)
  1087. if ($eventUser->getGuest() === $this) {
  1088. $eventUser->setGuest(null);
  1089. }
  1090. }
  1091. return $this;
  1092. }
  1093. /**
  1094. * @return Collection<int, ExamenConvocation>
  1095. */
  1096. public function getExamenConvocations(): Collection
  1097. {
  1098. return $this->examenConvocations;
  1099. }
  1100. public function addExamenConvocation(ExamenConvocation $examenConvocation): self
  1101. {
  1102. if (!$this->examenConvocations->contains($examenConvocation)) {
  1103. $this->examenConvocations[] = $examenConvocation;
  1104. $examenConvocation->setStudent($this);
  1105. }
  1106. return $this;
  1107. }
  1108. public function removeExamenConvocation(ExamenConvocation $examenConvocation): self
  1109. {
  1110. if ($this->examenConvocations->removeElement($examenConvocation)) {
  1111. // set the owning side to null (unless already changed)
  1112. if ($examenConvocation->getStudent() === $this) {
  1113. $examenConvocation->setStudent(null);
  1114. }
  1115. }
  1116. return $this;
  1117. }
  1118. /**
  1119. * @return Collection<int, EquipmentRepair>
  1120. */
  1121. public function getEquipmentRepairProviders(): Collection
  1122. {
  1123. return $this->equipmentRepairProviders;
  1124. }
  1125. public function addEquipmentRepairProvider(EquipmentRepair $equipmentRepairProvider): self
  1126. {
  1127. if (!$this->equipmentRepairProviders->contains($equipmentRepairProvider)) {
  1128. $this->equipmentRepairProviders[] = $equipmentRepairProvider;
  1129. $equipmentRepairProvider->setProvider($this);
  1130. }
  1131. return $this;
  1132. }
  1133. public function removeEquipmentRepairProvider(EquipmentRepair $equipmentRepairProvider): self
  1134. {
  1135. if ($this->equipmentRepairProviders->removeElement($equipmentRepairProvider)) {
  1136. // set the owning side to null (unless already changed)
  1137. if ($equipmentRepairProvider->getProvider() === $this) {
  1138. $equipmentRepairProvider->setProvider(null);
  1139. }
  1140. }
  1141. return $this;
  1142. }
  1143. /**
  1144. * @return Collection<int, Attendance>
  1145. */
  1146. public function getAttendances(): Collection
  1147. {
  1148. return $this->attendances;
  1149. }
  1150. public function addAttendance(Attendance $attendance): self
  1151. {
  1152. if (!$this->attendances->contains($attendance)) {
  1153. $this->attendances[] = $attendance;
  1154. $attendance->setAccess($this);
  1155. }
  1156. return $this;
  1157. }
  1158. public function removeAttendance(Attendance $attendance): self
  1159. {
  1160. if ($this->attendances->removeElement($attendance)) {
  1161. // set the owning side to null (unless already changed)
  1162. if ($attendance->getAccess() === $this) {
  1163. $attendance->setAccess(null);
  1164. }
  1165. }
  1166. return $this;
  1167. }
  1168. /**
  1169. * @return Collection<int, AttendanceBooking>
  1170. */
  1171. public function getAttendanceBookings(): Collection
  1172. {
  1173. return $this->attendanceBookings;
  1174. }
  1175. public function addAttendanceBooking(AttendanceBooking $attendanceBooking): self
  1176. {
  1177. if (!$this->attendanceBookings->contains($attendanceBooking)) {
  1178. $this->attendanceBookings[] = $attendanceBooking;
  1179. $attendanceBooking->setAccess($this);
  1180. }
  1181. return $this;
  1182. }
  1183. public function removeAttendanceBooking(AttendanceBooking $attendanceBooking): self
  1184. {
  1185. if ($this->attendanceBookings->removeElement($attendanceBooking)) {
  1186. // set the owning side to null (unless already changed)
  1187. if ($attendanceBooking->getAccess() === $this) {
  1188. $attendanceBooking->setAccess(null);
  1189. }
  1190. }
  1191. return $this;
  1192. }
  1193. /**
  1194. * @return Collection<int, Attendance>
  1195. */
  1196. public function getAttendanceReplacements(): Collection
  1197. {
  1198. return $this->attendanceReplacements;
  1199. }
  1200. public function addAttendanceReplacement(Attendance $attendanceReplacement): self
  1201. {
  1202. if (!$this->attendanceReplacements->contains($attendanceReplacement)) {
  1203. $this->attendanceReplacements[] = $attendanceReplacement;
  1204. $attendanceReplacement->setReplacement($this);
  1205. }
  1206. return $this;
  1207. }
  1208. public function removeAttendanceReplacement(Attendance $attendanceReplacement): self
  1209. {
  1210. if ($this->attendanceReplacements->removeElement($attendanceReplacement)) {
  1211. // set the owning side to null (unless already changed)
  1212. if ($attendanceReplacement->getReplacement() === $this) {
  1213. $attendanceReplacement->setReplacement(null);
  1214. }
  1215. }
  1216. return $this;
  1217. }
  1218. /**
  1219. * @return Collection<int, RoomRepair>
  1220. */
  1221. public function getRoomRepairProviders(): Collection
  1222. {
  1223. return $this->roomRepairProviders;
  1224. }
  1225. public function addRoomRepairProvider(RoomRepair $roomRepairProvider): self
  1226. {
  1227. if (!$this->roomRepairProviders->contains($roomRepairProvider)) {
  1228. $this->roomRepairProviders[] = $roomRepairProvider;
  1229. $roomRepairProvider->setProvider($this);
  1230. }
  1231. return $this;
  1232. }
  1233. public function removeRoomRepairProvider(RoomRepair $roomRepairProvider): self
  1234. {
  1235. if ($this->roomRepairProviders->removeElement($roomRepairProvider)) {
  1236. // set the owning side to null (unless already changed)
  1237. if ($roomRepairProvider->getProvider() === $this) {
  1238. $roomRepairProvider->setProvider(null);
  1239. }
  1240. }
  1241. return $this;
  1242. }
  1243. /**
  1244. * @return Collection<int, PlaceRepair>
  1245. */
  1246. public function getPlaceRepairProviders(): Collection
  1247. {
  1248. return $this->placeRepairProviders;
  1249. }
  1250. public function addPlaceRepairProvider(PlaceRepair $placeRepairProvider): self
  1251. {
  1252. if (!$this->placeRepairProviders->contains($placeRepairProvider)) {
  1253. $this->placeRepairProviders[] = $placeRepairProvider;
  1254. $placeRepairProvider->setProvider($this);
  1255. }
  1256. return $this;
  1257. }
  1258. public function removePlaceRepairProvider(PlaceRepair $placeRepairProvider): self
  1259. {
  1260. if ($this->placeRepairProviders->removeElement($placeRepairProvider)) {
  1261. // set the owning side to null (unless already changed)
  1262. if ($placeRepairProvider->getProvider() === $this) {
  1263. $placeRepairProvider->setProvider(null);
  1264. }
  1265. }
  1266. return $this;
  1267. }
  1268. /**
  1269. * @return Collection<int, Jury>
  1270. */
  1271. public function getJuryMembers(): Collection
  1272. {
  1273. return $this->juryMembers;
  1274. }
  1275. public function addJuryMember(Jury $juryMember): self
  1276. {
  1277. if (!$this->juryMembers->contains($juryMember)) {
  1278. $this->juryMembers[] = $juryMember;
  1279. $juryMember->addMember($this);
  1280. }
  1281. return $this;
  1282. }
  1283. public function removeJuryMember(Jury $juryMember): self
  1284. {
  1285. if ($this->juryMembers->removeElement($juryMember)) {
  1286. $juryMember->removeMember($this);
  1287. }
  1288. return $this;
  1289. }
  1290. /**
  1291. * @return Collection<int, Organization>
  1292. */
  1293. public function getOrganizationContacts(): Collection
  1294. {
  1295. return $this->organizationContacts;
  1296. }
  1297. public function addOrganizationContact(Organization $organizationContact): self
  1298. {
  1299. if (!$this->organizationContacts->contains($organizationContact)) {
  1300. $this->organizationContacts[] = $organizationContact;
  1301. $organizationContact->setContactPerson($this);
  1302. }
  1303. return $this;
  1304. }
  1305. public function removeOrganizationContact(Organization $organizationContact): self
  1306. {
  1307. if ($this->organizationContacts->removeElement($organizationContact)) {
  1308. // set the owning side to null (unless already changed)
  1309. if ($organizationContact->getContactPerson() === $this) {
  1310. $organizationContact->setContactPerson(null);
  1311. }
  1312. }
  1313. return $this;
  1314. }
  1315. /**
  1316. * @return Collection<int, CommissionMember>
  1317. */
  1318. public function getCommissionMembers(): Collection
  1319. {
  1320. return $this->commissionMembers;
  1321. }
  1322. public function addCommissionMember(CommissionMember $commissionMember): self
  1323. {
  1324. if (!$this->commissionMembers->contains($commissionMember)) {
  1325. $this->commissionMembers[] = $commissionMember;
  1326. $commissionMember->setMember($this);
  1327. }
  1328. return $this;
  1329. }
  1330. public function removeCommissionMember(CommissionMember $commissionMember): self
  1331. {
  1332. if ($this->commissionMembers->removeElement($commissionMember)) {
  1333. // set the owning side to null (unless already changed)
  1334. if ($commissionMember->getMember() === $this) {
  1335. $commissionMember->setMember(null);
  1336. }
  1337. }
  1338. return $this;
  1339. }
  1340. /**
  1341. * @return Collection<int, Equipment>
  1342. */
  1343. public function getEquipmentSuppliers(): Collection
  1344. {
  1345. return $this->equipmentSuppliers;
  1346. }
  1347. public function addEquipmentSupplier(Equipment $equipmentSupplier): self
  1348. {
  1349. if (!$this->equipmentSuppliers->contains($equipmentSupplier)) {
  1350. $this->equipmentSuppliers[] = $equipmentSupplier;
  1351. $equipmentSupplier->setSupplier($this);
  1352. }
  1353. return $this;
  1354. }
  1355. public function removeEquipmentSupplier(Equipment $equipmentSupplier): self
  1356. {
  1357. if ($this->equipmentSuppliers->removeElement($equipmentSupplier)) {
  1358. // set the owning side to null (unless already changed)
  1359. if ($equipmentSupplier->getSupplier() === $this) {
  1360. $equipmentSupplier->setSupplier(null);
  1361. }
  1362. }
  1363. return $this;
  1364. }
  1365. /**
  1366. * @return Collection<int, Equipment>
  1367. */
  1368. public function getEquipmentControlManagers(): Collection
  1369. {
  1370. return $this->equipmentControlManagers;
  1371. }
  1372. public function addEquipmentControlManager(Equipment $equipmentControlManager): self
  1373. {
  1374. if (!$this->equipmentControlManagers->contains($equipmentControlManager)) {
  1375. $this->equipmentControlManagers[] = $equipmentControlManager;
  1376. $equipmentControlManager->setControlManager($this);
  1377. }
  1378. return $this;
  1379. }
  1380. public function removeEquipmentControlManager(Equipment $equipmentControlManager): self
  1381. {
  1382. if ($this->equipmentControlManagers->removeElement($equipmentControlManager)) {
  1383. // set the owning side to null (unless already changed)
  1384. if ($equipmentControlManager->getControlManager() === $this) {
  1385. $equipmentControlManager->setControlManager(null);
  1386. }
  1387. }
  1388. return $this;
  1389. }
  1390. /**
  1391. * @return Collection<int, Equipment>
  1392. */
  1393. public function getEquipmentEditors(): Collection
  1394. {
  1395. return $this->equipmentEditors;
  1396. }
  1397. public function addEquipmentEditor(Equipment $equipmentEditor): self
  1398. {
  1399. if (!$this->equipmentEditors->contains($equipmentEditor)) {
  1400. $this->equipmentEditors[] = $equipmentEditor;
  1401. $equipmentEditor->setEditor($this);
  1402. }
  1403. return $this;
  1404. }
  1405. public function removeEquipmentEditor(Equipment $equipmentEditor): self
  1406. {
  1407. if ($this->equipmentEditors->removeElement($equipmentEditor)) {
  1408. // set the owning side to null (unless already changed)
  1409. if ($equipmentEditor->getEditor() === $this) {
  1410. $equipmentEditor->setEditor(null);
  1411. }
  1412. }
  1413. return $this;
  1414. }
  1415. /**
  1416. * @return Collection<int, EquipmentLoan>
  1417. */
  1418. public function getEquipmentLoans(): Collection
  1419. {
  1420. return $this->equipmentLoans;
  1421. }
  1422. public function addEquipmentLoan(EquipmentLoan $equipmentLoan): self
  1423. {
  1424. if (!$this->equipmentLoans->contains($equipmentLoan)) {
  1425. $this->equipmentLoans[] = $equipmentLoan;
  1426. $equipmentLoan->setBorrower($this);
  1427. }
  1428. return $this;
  1429. }
  1430. public function removeEquipmentLoan(EquipmentLoan $equipmentLoan): self
  1431. {
  1432. if ($this->equipmentLoans->removeElement($equipmentLoan)) {
  1433. // set the owning side to null (unless already changed)
  1434. if ($equipmentLoan->getBorrower() === $this) {
  1435. $equipmentLoan->setBorrower(null);
  1436. }
  1437. }
  1438. return $this;
  1439. }
  1440. /**
  1441. * @return Collection<int, Equipment>
  1442. */
  1443. public function getEquipments(): Collection
  1444. {
  1445. return $this->equipments;
  1446. }
  1447. public function addEquipment(Equipment $equipment): self
  1448. {
  1449. if (!$this->equipments->contains($equipment)) {
  1450. $this->equipments[] = $equipment;
  1451. $equipment->setAccess($this);
  1452. }
  1453. return $this;
  1454. }
  1455. public function removeEquipment(Equipment $equipment): self
  1456. {
  1457. if ($this->equipments->removeElement($equipment)) {
  1458. // set the owning side to null (unless already changed)
  1459. if ($equipment->getAccess() === $this) {
  1460. $equipment->setAccess(null);
  1461. }
  1462. }
  1463. return $this;
  1464. }
  1465. /**
  1466. * @return Collection<int, AccessFictionalIntangible>
  1467. */
  1468. public function getAccessFictionalIntangibles(): Collection
  1469. {
  1470. return $this->accessFictionalIntangibles;
  1471. }
  1472. public function addAccessFictionalIntangible(AccessFictionalIntangible $accessFictionalIntangible): self
  1473. {
  1474. if (!$this->accessFictionalIntangibles->contains($accessFictionalIntangible)) {
  1475. $this->accessFictionalIntangibles[] = $accessFictionalIntangible;
  1476. $accessFictionalIntangible->setAccess($this);
  1477. }
  1478. return $this;
  1479. }
  1480. public function removeAccessFictionalIntangible(AccessFictionalIntangible $accessFictionalIntangible): self
  1481. {
  1482. if ($this->accessFictionalIntangibles->removeElement($accessFictionalIntangible)) {
  1483. // set the owning side to null (unless already changed)
  1484. if ($accessFictionalIntangible->getAccess() === $this) {
  1485. $accessFictionalIntangible->setAccess(null);
  1486. }
  1487. }
  1488. return $this;
  1489. }
  1490. /**
  1491. * @return Collection<int, Donor>
  1492. */
  1493. public function getDonors(): Collection
  1494. {
  1495. return $this->donors;
  1496. }
  1497. public function addDonor(Donor $donor): self
  1498. {
  1499. if (!$this->donors->contains($donor)) {
  1500. $this->donors[] = $donor;
  1501. $donor->setAccess($this);
  1502. }
  1503. return $this;
  1504. }
  1505. public function removeDonor(Donor $donor): self
  1506. {
  1507. if ($this->donors->removeElement($donor)) {
  1508. // set the owning side to null (unless already changed)
  1509. if ($donor->getAccess() === $this) {
  1510. $donor->setAccess(null);
  1511. }
  1512. }
  1513. return $this;
  1514. }
  1515. /**
  1516. * @return Collection<int, AccessReward>
  1517. */
  1518. public function getAccessRewards(): Collection
  1519. {
  1520. return $this->accessRewards;
  1521. }
  1522. public function addAccessReward(AccessReward $accessRewards): self
  1523. {
  1524. if (!$this->accessRewards->contains($accessRewards)) {
  1525. $this->accessRewards[] = $accessRewards;
  1526. $accessRewards->setAccess($this);
  1527. }
  1528. return $this;
  1529. }
  1530. public function removeAccessReward(AccessReward $accessRewards): self
  1531. {
  1532. if ($this->accessRewards->removeElement($accessRewards)) {
  1533. // set the owning side to null (unless already changed)
  1534. if ($accessRewards->getAccess() === $this) {
  1535. $accessRewards->setAccess(null);
  1536. }
  1537. }
  1538. return $this;
  1539. }
  1540. /**
  1541. * @return Collection<int, OrganizationResponsability>
  1542. */
  1543. public function getOrganizationResponsabilities(): Collection
  1544. {
  1545. return $this->organizationResponsabilities;
  1546. }
  1547. public function addOrganizationResponsability(OrganizationResponsability $organizationResponsability): self
  1548. {
  1549. if (!$this->organizationResponsabilities->contains($organizationResponsability)) {
  1550. $this->organizationResponsabilities[] = $organizationResponsability;
  1551. $organizationResponsability->setAccess($this);
  1552. }
  1553. return $this;
  1554. }
  1555. public function removeOrganizationResponsability(OrganizationResponsability $organizationResponsability): self
  1556. {
  1557. if ($this->organizationResponsabilities->removeElement($organizationResponsability)) {
  1558. // set the owning side to null (unless already changed)
  1559. if ($organizationResponsability->getAccess() === $this) {
  1560. $organizationResponsability->setAccess(null);
  1561. }
  1562. }
  1563. return $this;
  1564. }
  1565. /**
  1566. * @return Collection<int, AccessWish>
  1567. */
  1568. public function getAccessWishes(): Collection
  1569. {
  1570. return $this->accessWishes;
  1571. }
  1572. public function addAccessWish(AccessWish $accessWish): self
  1573. {
  1574. if (!$this->accessWishes->contains($accessWish)) {
  1575. $this->accessWishes[] = $accessWish;
  1576. $accessWish->setAccessOriginal($this);
  1577. }
  1578. return $this;
  1579. }
  1580. public function removeAccessWish(AccessWish $accessWish): self
  1581. {
  1582. if ($this->accessWishes->removeElement($accessWish)) {
  1583. // set the owning side to null (unless already changed)
  1584. if ($accessWish->getAccessOriginal() === $this) {
  1585. $accessWish->setAccessOriginal(null);
  1586. }
  1587. }
  1588. return $this;
  1589. }
  1590. /**
  1591. * @return Collection<int, WorkByUser>
  1592. */
  1593. public function getWorkByUsers(): Collection
  1594. {
  1595. return $this->workByUsers;
  1596. }
  1597. public function addWorkByUser(WorkByUser $workByUser): self
  1598. {
  1599. if (!$this->workByUsers->contains($workByUser)) {
  1600. $this->workByUsers[] = $workByUser;
  1601. $workByUser->setStudent($this);
  1602. }
  1603. return $this;
  1604. }
  1605. public function removeWorkByUser(WorkByUser $workByUser): self
  1606. {
  1607. if ($this->workByUsers->removeElement($workByUser)) {
  1608. // set the owning side to null (unless already changed)
  1609. if ($workByUser->getStudent() === $this) {
  1610. $workByUser->setStudent(null);
  1611. }
  1612. }
  1613. return $this;
  1614. }
  1615. /**
  1616. * @return Collection<int, Tagg>
  1617. */
  1618. public function getTags(): Collection
  1619. {
  1620. return $this->tags;
  1621. }
  1622. public function addTag(Tagg $tag): self
  1623. {
  1624. if (!$this->tags->contains($tag)) {
  1625. $this->tags[] = $tag;
  1626. }
  1627. return $this;
  1628. }
  1629. public function removeTag(Tagg $tag): self
  1630. {
  1631. $this->tags->removeElement($tag);
  1632. return $this;
  1633. }
  1634. /**
  1635. * @return Collection<int, Event>
  1636. */
  1637. public function getEventOrganizers(): Collection
  1638. {
  1639. return $this->eventOrganizers;
  1640. }
  1641. public function addEventOrganizer(Event $eventOrganizer): self
  1642. {
  1643. if (!$this->eventOrganizers->contains($eventOrganizer)) {
  1644. $this->eventOrganizers[] = $eventOrganizer;
  1645. $eventOrganizer->addOrganizer($this);
  1646. }
  1647. return $this;
  1648. }
  1649. public function removeEventOrganizer(Event $eventOrganizer): self
  1650. {
  1651. if ($this->eventOrganizers->removeElement($eventOrganizer)) {
  1652. $eventOrganizer->removeOrganizer($this);
  1653. }
  1654. return $this;
  1655. }
  1656. /**
  1657. * @return Collection<int, EducationalProject>
  1658. */
  1659. public function getEducationalProjectOrganizers(): Collection
  1660. {
  1661. return $this->educationalProjectOrganizers;
  1662. }
  1663. public function addEducationalProjectOrganizer(EducationalProject $educationalProjectOrganizer): self
  1664. {
  1665. if (!$this->educationalProjectOrganizers->contains($educationalProjectOrganizer)) {
  1666. $this->educationalProjectOrganizers[] = $educationalProjectOrganizer;
  1667. $educationalProjectOrganizer->addOrganizer($this);
  1668. }
  1669. return $this;
  1670. }
  1671. public function removeEducationalProjectOrganizer(EducationalProject $educationalProjectOrganizer): self
  1672. {
  1673. if ($this->educationalProjectOrganizers->removeElement($educationalProjectOrganizer)) {
  1674. $educationalProjectOrganizer->removeOrganizer($this);
  1675. }
  1676. return $this;
  1677. }
  1678. /**
  1679. * @return Collection<int, Email>
  1680. */
  1681. public function getEmails(): Collection
  1682. {
  1683. return $this->emails;
  1684. }
  1685. public function addEmail(Email $email): self
  1686. {
  1687. if (!$this->emails->contains($email)) {
  1688. $this->emails[] = $email;
  1689. $email->setAuthor($this);
  1690. }
  1691. return $this;
  1692. }
  1693. public function removeEmail(Email $email): self
  1694. {
  1695. if ($this->emails->removeElement($email)) {
  1696. // set the owning side to null (unless already changed)
  1697. if ($email->getAuthor() === $this) {
  1698. $email->setAuthor(null);
  1699. }
  1700. }
  1701. return $this;
  1702. }
  1703. /**
  1704. * @return Collection<int, Mail>
  1705. */
  1706. public function getMails(): Collection
  1707. {
  1708. return $this->mails;
  1709. }
  1710. public function addMail(Mail $mail): self
  1711. {
  1712. if (!$this->mails->contains($mail)) {
  1713. $this->mails[] = $mail;
  1714. $mail->setAuthor($this);
  1715. }
  1716. return $this;
  1717. }
  1718. public function removeMail(Mail $mail): self
  1719. {
  1720. if ($this->mails->removeElement($mail)) {
  1721. // set the owning side to null (unless already changed)
  1722. if ($mail->getAuthor() === $this) {
  1723. $mail->setAuthor(null);
  1724. }
  1725. }
  1726. return $this;
  1727. }
  1728. /**
  1729. * @return Collection<int, Sms>
  1730. */
  1731. public function getSms(): Collection
  1732. {
  1733. return $this->sms;
  1734. }
  1735. public function addSms(Sms $sms): self
  1736. {
  1737. if (!$this->sms->contains($sms)) {
  1738. $this->sms[] = $sms;
  1739. $sms->setAuthor($this);
  1740. }
  1741. return $this;
  1742. }
  1743. public function removeSms(Sms $sms): self
  1744. {
  1745. if ($this->sms->removeElement($sms)) {
  1746. // set the owning side to null (unless already changed)
  1747. if ($sms->getAuthor() === $this) {
  1748. $sms->setAuthor(null);
  1749. }
  1750. }
  1751. return $this;
  1752. }
  1753. public function getAccessBilling(): ?AccessBilling
  1754. {
  1755. return $this->accessBilling;
  1756. }
  1757. public function setAccessBilling(?AccessBilling $accessBilling): self
  1758. {
  1759. // unset the owning side of the relation if necessary
  1760. if ($accessBilling === null && $this->accessBilling !== null) {
  1761. $this->accessBilling->setAccess(null);
  1762. }
  1763. // set the owning side of the relation if necessary
  1764. if ($accessBilling !== null && $accessBilling->getAccess() !== $this) {
  1765. $accessBilling->setAccess($this);
  1766. }
  1767. $this->accessBilling = $accessBilling;
  1768. return $this;
  1769. }
  1770. public function setPreferences(?Preferences $preferences = null): self
  1771. {
  1772. if (!is_null($preferences)) {
  1773. $preferences->setAccess($this);
  1774. }
  1775. $this->preferences = $preferences;
  1776. return $this;
  1777. }
  1778. public function getPreferences(): ?Preferences
  1779. {
  1780. return $this->preferences;
  1781. }
  1782. }