Access.php 64 KB

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