Access.php 71 KB

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