| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989 |
- <?php
- declare (strict_types=1);
- namespace App\Entity\Access;
- use ApiPlatform\Metadata\ApiResource;
- use ApiPlatform\Doctrine\Orm\Filter\BooleanFilter;
- use ApiPlatform\Metadata\ApiFilter;
- use ApiPlatform\Metadata\Get;
- use ApiPlatform\Metadata\Put;
- use App\Entity\AccessWish\AccessWish;
- use App\Entity\Billing\AccessBilling;
- use App\Entity\Billing\AccessFictionalIntangible;
- use App\Entity\Billing\Bill;
- use App\Entity\Billing\BillCredit;
- use App\Entity\Billing\BillLine;
- use App\Entity\Billing\EducationalProjectPayer;
- use App\Entity\Booking\Attendance;
- use App\Entity\Booking\AttendanceBooking;
- use App\Entity\Booking\Course;
- use App\Entity\Booking\EducationalProject;
- use App\Entity\Booking\Event;
- use App\Entity\Booking\EventUser;
- use App\Entity\Booking\ExamenConvocation;
- use App\Entity\Booking\PersonHoliday;
- use App\Entity\Booking\WorkByUser;
- use App\Entity\Core\Tagg;
- use App\Entity\Donor\Donor;
- use App\Entity\Education\EducationNotationConfig;
- use App\Entity\Education\EducationStudent;
- use App\Entity\Education\EducationTeacher;
- use App\Entity\Message\Email;
- use App\Entity\Message\Mail;
- use App\Entity\Message\Sms;
- use App\Entity\Organization\Jury;
- use App\Entity\Organization\Parameters;
- use App\Entity\Person\CommissionMember;
- use App\Entity\Person\CompanyPerson;
- use App\Entity\Person\Medal;
- use App\Entity\Product\Equipment;
- use App\Entity\Product\EquipmentLoan;
- use App\Filter\Person\FullNameFilter;
- use App\Entity\Billing\AccessIntangible;
- use App\Entity\Billing\AccessPayer;
- use App\Entity\Core\Notification;
- use App\Entity\Core\NotificationUser;
- use App\Entity\Organization\Organization;
- use App\Entity\Organization\OrganizationLicence;
- use App\Filter\Utils\InFilter;
- use App\Repository\Access\AccessRepository;
- use App\Entity\Person\Person;
- use App\Entity\Person\PersonActivity;
- use App\Entity\Place\PlaceRepair;
- use App\Entity\Place\RoomRepair;
- use App\Entity\Product\EquipmentRepair;
- //use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
- use Doctrine\Common\Collections\ArrayCollection;
- use Doctrine\Common\Collections\Collection;
- use Doctrine\ORM\Mapping as ORM;
- use JetBrains\PhpStorm\Pure;
- use Symfony\Component\Security\Core\Role\Role;
- use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
- use Symfony\Component\Security\Core\User\UserInterface;
- use Symfony\Component\Serializer\Annotation\Groups;
- /**
- * Fais le lien entre une Person et une Organization
- */
- #[ApiResource] // @see config/api_platform/Access/access.yaml
- //#[Auditable]
- #[ORM\Entity(repositoryClass: AccessRepository::class)]
- #[ApiFilter(filterClass: BooleanFilter::class, properties: ['person.isPhysical'])]
- #[ApiFilter(filterClass: FullNameFilter::class)]
- #[ApiFilter(filterClass: InFilter::class, properties: ['id'])]
- class Access implements UserInterface, PasswordAuthenticatedUserInterface
- {
- #[ORM\Id]
- #[ORM\Column]
- #[ORM\GeneratedValue]
- #[Groups("access_people_ref")]
- private ?int $id = null;
- #[ORM\Column(options: ['default' => false])]
- private bool $adminAccess = false;
- #[ORM\Column(options: ['default' => false])]
- #[Groups(['private'])]
- private bool $superAdminAccess = false;
- #[ORM\Column(nullable: true)]
- #[Groups(['my_access:input'])]
- private ?int $activityYear = null;
- #[ORM\ManyToOne(cascade: ['persist'], inversedBy: 'access')]
- #[ORM\JoinColumn(nullable: false)]
- #[Groups(["access_people_ref", "access_address"])]
- private Person $person;
- #[ORM\ManyToOne(inversedBy: 'accesses')]
- #[ORM\JoinColumn(nullable: false)]
- private Organization $organization;
- /** @var mixed[]|null */
- #[ORM\Column(type: 'json', length: 4294967295, nullable: true)]
- private ?array $roles = [];
- /** @var mixed[]|null */
- #[Groups(['my_access:input'])]
- #[ORM\Column(type: 'json', length: 4294967295, nullable: true)]
- private ?array $setting = [];
- #[ORM\OneToOne(mappedBy: 'access', cascade: ['persist'], orphanRemoval: true)]
- private AccessBilling $accessBilling;
- #[ORM\OneToMany(mappedBy: 'access', targetEntity: PersonActivity::class, cascade: ['persist'], orphanRemoval: true)]
- private Collection $personActivity;
- #[ORM\OneToMany(mappedBy: 'access', targetEntity: OrganizationFunction::class, cascade: ['persist'], orphanRemoval: true)]
- private Collection $organizationFunction;
- #[ORM\OneToMany(mappedBy: 'licensee', targetEntity: OrganizationLicence::class, cascade: ['persist'], orphanRemoval: true)]
- private Collection $organizationLicences;
- #[ORM\OneToMany(mappedBy: 'access', targetEntity: PersonalizedList::class, cascade: ['persist'], orphanRemoval: true)]
- private Collection $personalizedLists;
- #[ORM\OneToMany(mappedBy: 'recipientAccess', targetEntity: Notification::class, orphanRemoval: true)]
- private Collection $notifications;
- #[ORM\OneToMany(mappedBy: 'access', targetEntity: NotificationUser::class, orphanRemoval: true)]
- private Collection $notificationUsers;
- #[ORM\ManyToMany(targetEntity: Access::class, mappedBy: 'children', cascade: ['persist'])]
- private Collection $guardians;
- #[ORM\ManyToMany(targetEntity: Access::class, inversedBy: 'guardians', cascade: ['persist'])]
- #[ORM\JoinTable(name: 'children_guardians')]
- #[ORM\JoinColumn(name: 'guardians_id', referencedColumnName: 'id')]
- #[ORM\InverseJoinColumn(name: 'children_id', referencedColumnName: 'id')]
- private Collection $children;
- #[ORM\OneToMany(mappedBy: 'accessPayer', targetEntity: AccessPayer::class, cascade: ['persist'], orphanRemoval: true)]
- private Collection $billingPayers;
- #[ORM\OneToMany(mappedBy: 'accessReceiver', targetEntity: AccessPayer::class, cascade: ['persist'], orphanRemoval: true)]
- private Collection $billingReceivers;
- #[ORM\OneToMany(mappedBy: 'access', targetEntity: AccessIntangible::class, cascade: ['persist'], orphanRemoval: true)]
- private Collection $accessIntangibles;
- #[ORM\ManyToOne(inversedBy: 'publicationDirectors')]
- #[ORM\JoinColumn(referencedColumnName: 'id', nullable: false)]
- private ?Parameters $publicationDirector;
- #[ORM\ManyToOne(inversedBy: 'teachers')]
- #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
- private ?EducationNotationConfig $educationNotationConfig;
- #[ORM\OneToMany(mappedBy: 'company', targetEntity: CompanyPerson::class, cascade: ['persist'], orphanRemoval: true)]
- private Collection $companyPersonAccesses;
- #[ORM\OneToMany(mappedBy: 'access', targetEntity: CompanyPerson::class, cascade: ['persist'], orphanRemoval: true)]
- private Collection $companyPersonCompany;
- #[ORM\OneToMany(mappedBy: 'access', targetEntity: EducationStudent::class, cascade: ['persist'], orphanRemoval: true)]
- private Collection $educationStudent;
- #[ORM\ManyToMany(targetEntity: EducationStudent::class, mappedBy: 'teachers', cascade: ['persist'], orphanRemoval: true)]
- private Collection $educationStudentByTeacher;
- #[ORM\OneToMany(mappedBy: 'teacher', targetEntity: EducationTeacher::class, orphanRemoval: true)]
- private Collection $educationTeachers;
- #[ORM\OneToMany(mappedBy: 'access', targetEntity: PersonHoliday::class, cascade: ['persist'], orphanRemoval: true)]
- private Collection $holidays;
- #[ORM\ManyToMany(targetEntity: Course::class, mappedBy: 'students', cascade: ['persist'])]
- private Collection $courses;
- #[ORM\ManyToMany(targetEntity: Course::class, mappedBy: 'organizer', cascade: ['persist'])]
- private Collection $practicalCourses;
- #[ORM\ManyToMany(targetEntity: Event::class, mappedBy: 'organizer', cascade: ['persist'])]
- private Collection $eventOrganizers;
- #[ORM\ManyToMany(targetEntity: EducationalProject::class, mappedBy: 'organizer', cascade: ['persist'])]
- private Collection $educationalProjectOrganizers;
- #[ORM\ManyToOne(cascade: ['persist'], inversedBy: 'accesses')]
- #[ORM\JoinColumn(referencedColumnName: 'id', nullable: false, onDelete: "SET NULL")]
- private AccessFamily $accessFamily;
- #[ORM\OneToMany(mappedBy: 'educationalProjectPayer', targetEntity: EducationalProjectPayer::class, cascade: ['persist'], orphanRemoval: true)]
- private Collection $billingEducationalProjectPayers;
- #[ORM\OneToMany(mappedBy: 'access', targetEntity: Bill::class, orphanRemoval: true)]
- private Collection $bills;
- #[ORM\OneToMany(mappedBy: 'access', targetEntity: BillLine::class, orphanRemoval: true)]
- private Collection $billLines;
- #[ORM\OneToMany(mappedBy: 'access', targetEntity: BillCredit::class, orphanRemoval: true)]
- private Collection $billCredits;
- #[ORM\OneToMany(mappedBy: 'silentPartner', targetEntity: EducationalProject::class)]
- private Collection $silentPartners;
- #[ORM\OneToMany(mappedBy: 'operationalPartner', targetEntity: EducationalProject::class)]
- private Collection $operationalPartners;
- #[ORM\OneToMany(mappedBy: 'guest', targetEntity: EventUser::class, orphanRemoval: true)]
- private Collection $eventUsers;
- #[ORM\OneToMany(mappedBy: 'student', targetEntity: ExamenConvocation::class, orphanRemoval: true)]
- private Collection $examenConvocations;
- #[ORM\OneToMany(mappedBy: 'provider', targetEntity: EquipmentRepair::class)]
- private Collection $equipmentRepairProviders;
- #[ORM\OneToMany(mappedBy: 'access', targetEntity: Attendance::class, orphanRemoval: true)]
- private Collection $attendances;
- #[ORM\OneToMany(mappedBy: 'access', targetEntity: AttendanceBooking::class, orphanRemoval: true)]
- private Collection $attendanceBookings;
- #[ORM\OneToMany(mappedBy: 'replacement', targetEntity: Attendance::class)]
- private Collection $attendanceReplacements;
- #[ORM\OneToMany(mappedBy: 'provider', targetEntity: RoomRepair::class)]
- private Collection $roomRepairProviders;
- #[ORM\OneToMany(mappedBy: 'provider', targetEntity: PlaceRepair::class)]
- private Collection $placeRepairProviders;
- #[ORM\OneToMany(mappedBy: 'author', targetEntity: Email::class)]
- private Collection $emails;
- #[ORM\OneToMany(mappedBy: 'author', targetEntity: Mail::class)]
- private Collection $mails;
- #[ORM\OneToMany(mappedBy: 'author', targetEntity: Sms::class)]
- private Collection $sms;
- #[ORM\ManyToMany(targetEntity: Jury::class, mappedBy: 'members', orphanRemoval: true)]
- private Collection $juryMembers;
- #[ORM\OneToMany(mappedBy: 'contactPerson', targetEntity: Organization::class)]
- private Collection $organizationContacts;
- #[ORM\OneToMany(mappedBy: 'member', targetEntity: CommissionMember::class, orphanRemoval: true)]
- private Collection $commissionMembers;
- #[ORM\OneToMany(mappedBy: 'supplier', targetEntity: Equipment::class)]
- private Collection $equipmentSuppliers;
- #[ORM\OneToMany(mappedBy: 'controlManager', targetEntity: Equipment::class)]
- private Collection $equipmentControlManagers;
- #[ORM\OneToMany(mappedBy: 'editor', targetEntity: Equipment::class)]
- private Collection $equipmentEditors;
- #[ORM\OneToMany(mappedBy: 'borrower', targetEntity: EquipmentLoan::class, cascade: ['persist'], orphanRemoval: true)]
- private Collection $equipmentLoans;
- #[ORM\OneToMany(mappedBy: 'access', targetEntity: Equipment::class, cascade: ['persist'], orphanRemoval: true)]
- private Collection $equipments;
- #[ORM\OneToMany(mappedBy: 'access', targetEntity: AccessFictionalIntangible::class, cascade: ['persist'], orphanRemoval: true)]
- private Collection $accessFictionalIntangibles;
- #[ORM\OneToMany(mappedBy: 'access', targetEntity: Donor::class, cascade: ['persist'], orphanRemoval: true)]
- private Collection $donors;
- #[ORM\OneToMany(mappedBy: 'access', targetEntity: Medal::class, cascade: ['persist'], orphanRemoval: true)]
- private Collection $medals;
- #[ORM\OneToMany(mappedBy: 'access', targetEntity: OrganizationResponsability::class, cascade: ['persist'], orphanRemoval: true)]
- private Collection $organizationResponsabilities;
- #[ORM\OneToMany(mappedBy: 'accessOriginal', targetEntity: AccessWish::class, cascade: ['persist', 'remove'], fetch: 'EAGER', orphanRemoval: true)]
- private Collection $accessWishes;
- #[ORM\OneToMany(mappedBy: 'student', targetEntity: WorkByUser::class, cascade: ['persist'], orphanRemoval: true)]
- private Collection $workByUsers;
- #[ORM\ManyToMany(targetEntity: Tagg::class, inversedBy: 'accesses', cascade: ['persist'])]
- #[ORM\JoinTable(name: 'tag_access')]
- #[ORM\JoinColumn(name: 'access_id', referencedColumnName: 'id')]
- #[ORM\InverseJoinColumn(name: 'tag_id', referencedColumnName: 'id')]
- private Collection $tags;
- #[Pure]
- public function __construct()
- {
- $this->personActivity = new ArrayCollection();
- $this->organizationFunction = new ArrayCollection();
- $this->organizationLicences = new ArrayCollection();
- $this->personalizedLists = new ArrayCollection();
- $this->guardians = new ArrayCollection();
- $this->children = new ArrayCollection();
- $this->billingPayers = new ArrayCollection();
- $this->billingReceivers = new ArrayCollection();
- $this->accessIntangibles = new ArrayCollection();
- $this->notifications = new ArrayCollection();
- $this->notificationUsers = new ArrayCollection();
- $this->companyPersonAccesses = new ArrayCollection();
- $this->companyPersonCompany = new ArrayCollection();
- $this->educationStudent = new ArrayCollection();
- $this->educationStudentByTeacher = new ArrayCollection();
- $this->educationTeachers = new ArrayCollection();
- $this->holidays = new ArrayCollection();
- $this->courses = new ArrayCollection();
- $this->practicalCourses = new ArrayCollection();
- $this->billingEducationalProjectPayers = new ArrayCollection();
- $this->bills = new ArrayCollection();
- $this->billLines = new ArrayCollection();
- $this->billCredits = new ArrayCollection();
- $this->silentPartners = new ArrayCollection();
- $this->operationalPartners = new ArrayCollection();
- $this->eventUsers = new ArrayCollection();
- $this->examenConvocations = new ArrayCollection();
- $this->equipmentRepairProviders = new ArrayCollection();
- $this->attendances = new ArrayCollection();
- $this->attendanceBookings = new ArrayCollection();
- $this->attendanceReplacements = new ArrayCollection();
- $this->roomRepairProviders = new ArrayCollection();
- $this->placeRepairProviders = new ArrayCollection();
- $this->juryMembers = new ArrayCollection();
- $this->organizationContacts = new ArrayCollection();
- $this->commissionMembers = new ArrayCollection();
- $this->equipmentSuppliers = new ArrayCollection();
- $this->equipmentControlManagers = new ArrayCollection();
- $this->equipmentEditors = new ArrayCollection();
- $this->equipmentLoans = new ArrayCollection();
- $this->equipments = new ArrayCollection();
- $this->accessFictionalIntangibles = new ArrayCollection();
- $this->donors = new ArrayCollection();
- $this->medals = new ArrayCollection();
- $this->organizationResponsabilities = new ArrayCollection();
- $this->accessWishes = new ArrayCollection();
- $this->workByUsers = new ArrayCollection();
- $this->tags = new ArrayCollection();
- $this->eventOrganizers = new ArrayCollection();
- $this->educationalProjectOrganizers = new ArrayCollection();
- $this->emails = new ArrayCollection();
- $this->mails = new ArrayCollection();
- $this->sms = new ArrayCollection();
- }
- public function getId(): ?int
- {
- return $this->id;
- }
- public function getAdminAccess(): ?bool
- {
- return $this->adminAccess;
- }
- public function setAdminAccess(bool $adminAccess): self
- {
- $this->adminAccess = $adminAccess;
- return $this;
- }
- public function getSuperAdminAccess(): ?bool
- {
- return $this->superAdminAccess;
- }
- public function setSuperAdminAccess(bool $superAdminAccess): self
- {
- $this->superAdminAccess = $superAdminAccess;
- return $this;
- }
- public function getPerson(): ?Person
- {
- return $this->person;
- }
- public function setPerson(?Person $person): self
- {
- $this->person = $person;
- return $this;
- }
- public function getOrganization(): ?Organization
- {
- return $this->organization;
- }
- public function setOrganization(?Organization $organization): self
- {
- $this->organization = $organization;
- return $this;
- }
- public function getActivityYear(): ?int
- {
- return $this->activityYear;
- }
- public function setActivityYear(?int $activityYear): self
- {
- $this->activityYear = $activityYear;
- return $this;
- }
- /**
- * @return array<mixed>
- */
- public function getHistorical(): array
- {
- return array_key_exists('historical', $this->setting) && $this->setting['historical'] ? $this->setting['historical'] : ['present' => true];
- }
- /**
- * @param array<mixed> $historical
- * @return $this
- */
- #[Groups(['my_access:input'])]
- public function setHistorical(array $historical): self
- {
- // Une entrée dateStart mais pas de dateEnd, on retire dateEnd
- if (array_key_exists('dateStart', $historical) && !array_key_exists('dateEnd', $historical)) {
- unset($historical['dateStart']);
- }
- // Une entrée dateEnd mais pas de dateStart, on retire dateEnd
- else if (!array_key_exists('dateStart', $historical) && array_key_exists('dateEnd', $historical)) {
- unset($historical['dateEnd']);
- }
- // Les entrées dateStart et dateEnd existent mais ne sont pas toutes les deux renseignées, on retire les deux
- if (
- array_key_exists('dateStart', $historical) &&
- array_key_exists('dateEnd', $historical) &&
- (!$historical['dateStart'] || !$historical['dateEnd'])
- ) {
- unset($historical['dateStart']);
- unset($historical['dateEnd']);
- }
- // Aucun temps ni période n'est défini, on définit par défaut present à vrai
- if (!$historical['past'] && !$historical['present'] && !$historical['future'] && !array_key_exists('dateStart', $historical) ) {
- $historical['present'] = true;
- }
- $this->setting['historical'] = $historical;
- return $this;
- }
- /**
- * @param mixed[]|null $roles
- * @return $this
- */
- public function setRoles(?array $roles): self
- {
- $this->roles = $roles;
- return $this;
- }
- /**
- * @return mixed[]
- */
- public function getRoles(): array
- {
- $roles = $this->roles;
- return array_unique($roles ?? []);
- }
- public function getPersonActivity(): Collection
- {
- return $this->personActivity;
- }
- public function addPersonActivity(PersonActivity $personActivity): self
- {
- if (!$this->personActivity->contains($personActivity)) {
- $this->personActivity[] = $personActivity;
- $personActivity->setAccess($this);
- }
- return $this;
- }
- public function removePersonActivity(PersonActivity $personActivity): self
- {
- if ($this->personActivity->removeElement($personActivity)) {
- // set the owning side to null (unless already changed)
- if ($personActivity->getAccess() === $this) {
- $personActivity->setAccess(null);
- }
- }
- return $this;
- }
- public function getOrganizationFunction(): Collection
- {
- return $this->organizationFunction;
- }
- public function addOrganizationFunction(OrganizationFunction $organizationFunction): self
- {
- if (!$this->organizationFunction->contains($organizationFunction)) {
- $this->organizationFunction[] = $organizationFunction;
- $organizationFunction->setAccess($this);
- }
- return $this;
- }
- public function removeOrganizationFunction(OrganizationFunction $organizationFunction): self
- {
- if ($this->organizationFunction->removeElement($organizationFunction)) {
- // set the owning side to null (unless already changed)
- if ($organizationFunction->getAccess() === $this) {
- $organizationFunction->setAccess(null);
- }
- }
- return $this;
- }
- public function getOrganizationLicences(): Collection
- {
- return $this->organizationLicences;
- }
- public function addOrganizationLicence(OrganizationLicence $organizationLicence): self
- {
- if (!$this->organizationLicences->contains($organizationLicence)) {
- $this->organizationLicences[] = $organizationLicence;
- $organizationLicence->setLicensee($this);
- }
- return $this;
- }
- public function removeOrganizationLicence(OrganizationLicence $organizationLicence): self
- {
- if ($this->organizationLicences->removeElement($organizationLicence)) {
- // set the owning side to null (unless already changed)
- if ($organizationLicence->getLicensee() === $this) {
- $organizationLicence->setLicensee(null);
- }
- }
- return $this;
- }
- public function getPersonalizedLists(): Collection
- {
- return $this->personalizedLists;
- }
- public function addPersonalizedList(PersonalizedList $personalizedList): self
- {
- if (!$this->personalizedLists->contains($personalizedList)) {
- $this->personalizedLists[] = $personalizedList;
- $personalizedList->setAccess($this);
- }
- return $this;
- }
- public function removePersonalizedList(PersonalizedList $personalizedList): self
- {
- if ($this->personalizedLists->removeElement($personalizedList)) {
- // set the owning side to null (unless already changed)
- if ($personalizedList->getAccess() === $this) {
- $personalizedList->setAccess(null);
- }
- }
- return $this;
- }
- public function getChildren(): Collection
- {
- return $this->children;
- }
- public function addChild(Access $access): self
- {
- if (!$this->children->contains($access)) {
- $this->children[] = $access;
- $access->addGuardian($this);
- }
- return $this;
- }
- public function removeChild(Access $access): self
- {
- if ($this->children->removeElement($access)) {
- $access->removeGuardian($this);
- }
- return $this;
- }
- public function getGuardians(): Collection
- {
- return $this->guardians;
- }
- public function addGuardian(Access $access): self
- {
- if (!$this->guardians->contains($access)) {
- $this->guardians[] = $access;
- $access->addChild($this);
- }
- return $this;
- }
- public function removeGuardian(Access $access): self
- {
- if ($this->guardians->removeElement($access)) {
- $access->removeChild($this);
- }
- return $this;
- }
- public function getBillingPayers(): Collection
- {
- return $this->billingPayers;
- }
- public function addBillingPayer(AccessPayer $billingPayer): self
- {
- if (!$this->billingPayers->contains($billingPayer)) {
- $this->billingPayers[] = $billingPayer;
- $billingPayer->setAccessPayer($this);
- }
- return $this;
- }
- public function removeBillingPayer(AccessPayer $billingPayer): self
- {
- if ($this->billingPayers->removeElement($billingPayer)) {
- // set the owning side to null (unless already changed)
- if ($billingPayer->getAccessPayer() === $this) {
- $billingPayer->setAccessPayer(null);
- }
- }
- return $this;
- }
- public function getBillingReceivers(): Collection
- {
- return $this->billingReceivers;
- }
- public function addBillingReceiver(AccessPayer $billingReceiver): self
- {
- if (!$this->billingReceivers->contains($billingReceiver)) {
- $this->billingReceivers[] = $billingReceiver;
- $billingReceiver->setAccessReceiver($this);
- }
- return $this;
- }
- public function removeBillingReceiver(AccessPayer $billingPayer): self
- {
- if ($this->billingReceivers->removeElement($billingPayer)) {
- // set the owning side to null (unless already changed)
- if ($billingPayer->getAccessReceiver() === $this) {
- $billingPayer->setAccessReceiver(null);
- }
- }
- return $this;
- }
- public function getAccessIntangibles(): Collection
- {
- return $this->accessIntangibles;
- }
- public function addAccessIntangible(AccessIntangible $accessIntangibles): self
- {
- if (!$this->accessIntangibles->contains($accessIntangibles)) {
- $this->accessIntangibles[] = $accessIntangibles;
- $accessIntangibles->setAccess($this);
- }
- return $this;
- }
- public function removeAccessIntangible(AccessIntangible $accessIntangibles): self
- {
- if ($this->accessIntangibles->removeElement($accessIntangibles)) {
- // set the owning side to null (unless already changed)
- if ($accessIntangibles->getAccess() === $this) {
- $accessIntangibles->setAccess(null);
- }
- }
- return $this;
- }
- public function getNotifications(): Collection
- {
- return $this->notifications;
- }
- public function addNotification(Notification $notification): self
- {
- if (!$this->notifications->contains($notification)) {
- $this->notifications[] = $notification;
- $notification->setRecipientAccess($this);
- }
- return $this;
- }
- public function removeNotification(Notification $notification): self
- {
- if ($this->notifications->removeElement($notification)) {
- // set the owning side to null (unless already changed)
- if ($notification->getRecipientAccess() === $this) {
- $notification->setRecipientAccess(null);
- }
- }
- return $this;
- }
- public function getNotificationUsers(): Collection
- {
- return $this->notificationUsers;
- }
- public function addNotificationUser(NotificationUser $notificationUser): self
- {
- if (!$this->notificationUsers->contains($notificationUser)) {
- $this->notificationUsers[] = $notificationUser;
- $notificationUser->setAccess($this);
- }
- return $this;
- }
- public function removeNotificationUser(NotificationUser $notificationUser): self
- {
- if ($this->notificationUsers->removeElement($notificationUser)) {
- // set the owning side to null (unless already changed)
- if ($notificationUser->getAccess() === $this) {
- $notificationUser->setAccess(null);
- }
- }
- return $this;
- }
- public function getPublicationDirector(): ?Parameters
- {
- return $this->publicationDirector;
- }
- public function setPublicationDirector(?Parameters $parameters): self
- {
- $this->publicationDirector = $parameters;
- return $this;
- }
- public function getEducationNotationConfig(): ?EducationNotationConfig
- {
- return $this->educationNotationConfig;
- }
- public function setEducationNotationConfig(?EducationNotationConfig $educationNotationConfig): self
- {
- $this->educationNotationConfig = $educationNotationConfig;
- return $this;
- }
- #[Pure]
- public function getUserIdentifier(): string
- {
- return $this->person->getUserIdentifier();
- }
- public function getPassword(): ?string
- {
- return null;
- }
- public function getSalt(): ?string
- {
- return null;
- }
- public function getUsername(): ?string
- {
- return null;
- }
- public function eraseCredentials(): void
- {
- // TODO: Implement eraseCredentials() method.
- }
- /**
- * @return mixed[]|null
- */
- public function getSetting(): ?array
- {
- return $this->setting;
- }
- /**
- * @param mixed[]|null $setting
- * @return $this
- */
- public function setSetting(?array $setting): self
- {
- $this->setting = $setting;
- return $this;
- }
- /**
- * @return Collection<int, CompanyPerson>
- */
- public function getCompanyPersonAccesses(): Collection
- {
- return $this->companyPersonAccesses;
- }
- public function addCompanyPersonAccess(CompanyPerson $companyPersonAccess): self
- {
- if (!$this->companyPersonAccesses->contains($companyPersonAccess)) {
- $this->companyPersonAccesses[] = $companyPersonAccess;
- $companyPersonAccess->setCompany($this);
- }
- return $this;
- }
- public function removeCompanyPersonAccess(CompanyPerson $companyPersonAccess): self
- {
- if ($this->companyPersonAccesses->removeElement($companyPersonAccess)) {
- // set the owning side to null (unless already changed)
- if ($companyPersonAccess->getCompany() === $this) {
- $companyPersonAccess->setCompany(null);
- }
- }
- return $this;
- }
- /**
- * @return Collection<int, CompanyPerson>
- */
- public function getCompanyPersonCompany(): Collection
- {
- return $this->companyPersonCompany;
- }
- public function addCompanyPersonCompany(CompanyPerson $companyPersonCompany): self
- {
- if (!$this->companyPersonCompany->contains($companyPersonCompany)) {
- $this->companyPersonCompany[] = $companyPersonCompany;
- $companyPersonCompany->setAccess($this);
- }
- return $this;
- }
- public function removeCompanyPersonCompany(CompanyPerson $companyPersonCompany): self
- {
- if ($this->companyPersonCompany->removeElement($companyPersonCompany)) {
- // set the owning side to null (unless already changed)
- if ($companyPersonCompany->getAccess() === $this) {
- $companyPersonCompany->setAccess(null);
- }
- }
- return $this;
- }
- /**
- * @return Collection<int, EducationStudent>
- */
- public function getEducationStudent(): Collection
- {
- return $this->educationStudent;
- }
- public function addEducationStudent(EducationStudent $educationStudent): self
- {
- if (!$this->educationStudent->contains($educationStudent)) {
- $this->educationStudent[] = $educationStudent;
- $educationStudent->setAccess($this);
- }
- return $this;
- }
- public function removeEducationStudent(EducationStudent $educationStudent): self
- {
- if ($this->educationStudent->removeElement($educationStudent)) {
- // set the owning side to null (unless already changed)
- if ($educationStudent->getAccess() === $this) {
- $educationStudent->setAccess(null);
- }
- }
- return $this;
- }
- /**
- * @return Collection<int, EducationStudent>
- */
- public function getEducationStudentByTeacher(): Collection
- {
- return $this->educationStudentByTeacher;
- }
- public function addEducationStudentByTeacher(EducationStudent $educationStudentByTeacher): self
- {
- if (!$this->educationStudentByTeacher->contains($educationStudentByTeacher)) {
- $this->educationStudentByTeacher[] = $educationStudentByTeacher;
- $educationStudentByTeacher->addTeacher($this);
- }
- return $this;
- }
- public function removeEducationStudentByTeacher(EducationStudent $educationStudentByTeacher): self
- {
- if ($this->educationStudentByTeacher->removeElement($educationStudentByTeacher)) {
- $educationStudentByTeacher->removeTeacher($this);
- }
- return $this;
- }
- /**
- * @return Collection<int, EducationTeacher>
- */
- public function getEducationTeachers(): Collection
- {
- return $this->educationTeachers;
- }
- public function addEducationTeacher(EducationTeacher $educationTeacher): self
- {
- if (!$this->educationTeachers->contains($educationTeacher)) {
- $this->educationTeachers[] = $educationTeacher;
- $educationTeacher->setTeacher($this);
- }
- return $this;
- }
- public function removeEducationTeacher(EducationTeacher $educationTeacher): self
- {
- if ($this->educationTeachers->removeElement($educationTeacher)) {
- // set the owning side to null (unless already changed)
- if ($educationTeacher->getTeacher() === $this) {
- $educationTeacher->setTeacher(null);
- }
- }
- return $this;
- }
- /**
- * @return Collection<int, PersonHoliday>
- */
- public function getHolidays(): Collection
- {
- return $this->holidays;
- }
- public function addHoliday(PersonHoliday $holiday): self
- {
- if (!$this->holidays->contains($holiday)) {
- $this->holidays[] = $holiday;
- $holiday->setAccess($this);
- }
- return $this;
- }
- public function removeHoliday(PersonHoliday $holiday): self
- {
- if ($this->holidays->removeElement($holiday)) {
- // set the owning side to null (unless already changed)
- if ($holiday->getAccess() === $this) {
- $holiday->setAccess(null);
- }
- }
- return $this;
- }
- /**
- * @return Collection<int, Course>
- */
- public function getCourses(): Collection
- {
- return $this->courses;
- }
- public function addCourse(Course $course): self
- {
- if (!$this->courses->contains($course)) {
- $this->courses[] = $course;
- $course->addStudent($this);
- }
- return $this;
- }
- public function removeCourse(Course $course): self
- {
- if ($this->courses->removeElement($course)) {
- $course->removeStudent($this);
- }
- return $this;
- }
- /**
- * @return Collection<int, Course>
- */
- public function getPracticalCourses(): Collection
- {
- return $this->practicalCourses;
- }
- public function addPracticalCourse(Course $practicalCourse): self
- {
- if (!$this->practicalCourses->contains($practicalCourse)) {
- $this->practicalCourses[] = $practicalCourse;
- $practicalCourse->addOrganizer($this);
- }
- return $this;
- }
- public function removePracticalCourse(Course $practicalCourse): self
- {
- if ($this->practicalCourses->removeElement($practicalCourse)) {
- $practicalCourse->removeOrganizer($this);
- }
- return $this;
- }
- public function getAccessFamily(): ?AccessFamily
- {
- return $this->accessFamily;
- }
- public function setAccessFamily(?AccessFamily $accessFamily): self
- {
- $this->accessFamily = $accessFamily;
- return $this;
- }
- /**
- * @return Collection<int, EducationalProjectPayer>
- */
- public function getBillingEducationalProjectPayers(): Collection
- {
- return $this->billingEducationalProjectPayers;
- }
- public function addBillingEducationalProjectPayer(EducationalProjectPayer $billingEducationalProjectPayer): self
- {
- if (!$this->billingEducationalProjectPayers->contains($billingEducationalProjectPayer)) {
- $this->billingEducationalProjectPayers[] = $billingEducationalProjectPayer;
- $billingEducationalProjectPayer->setEducationalProjectPayer($this);
- }
- return $this;
- }
- public function removeBillingEducationalProjectPayer(EducationalProjectPayer $billingEducationalProjectPayer): self
- {
- if ($this->billingEducationalProjectPayers->removeElement($billingEducationalProjectPayer)) {
- // set the owning side to null (unless already changed)
- if ($billingEducationalProjectPayer->getEducationalProjectPayer() === $this) {
- $billingEducationalProjectPayer->setEducationalProjectPayer(null);
- }
- }
- return $this;
- }
- /**
- * @return Collection<int, Bill>
- */
- public function getBills(): Collection
- {
- return $this->bills;
- }
- public function addBill(Bill $bill): self
- {
- if (!$this->bills->contains($bill)) {
- $this->bills[] = $bill;
- $bill->setAccess($this);
- }
- return $this;
- }
- public function removeBill(Bill $bill): self
- {
- if ($this->bills->removeElement($bill)) {
- // set the owning side to null (unless already changed)
- if ($bill->getAccess() === $this) {
- $bill->setAccess(null);
- }
- }
- return $this;
- }
- /**
- * @return Collection<int, BillLine>
- */
- public function getBillLines(): Collection
- {
- return $this->billLines;
- }
- public function addBillLine(BillLine $billLine): self
- {
- if (!$this->billLines->contains($billLine)) {
- $this->billLines[] = $billLine;
- $billLine->setAccess($this);
- }
- return $this;
- }
- public function removeBillLine(BillLine $billLine): self
- {
- if ($this->billLines->removeElement($billLine)) {
- // set the owning side to null (unless already changed)
- if ($billLine->getAccess() === $this) {
- $billLine->setAccess(null);
- }
- }
- return $this;
- }
- /**
- * @return Collection<int, BillCredit>
- */
- public function getBillCredits(): Collection
- {
- return $this->billCredits;
- }
- public function addBillCredit(BillCredit $billCredit): self
- {
- if (!$this->billCredits->contains($billCredit)) {
- $this->billCredits[] = $billCredit;
- $billCredit->setAccess($this);
- }
- return $this;
- }
- public function removeBillCredit(BillCredit $billCredit): self
- {
- if ($this->billCredits->removeElement($billCredit)) {
- // set the owning side to null (unless already changed)
- if ($billCredit->getAccess() === $this) {
- $billCredit->setAccess(null);
- }
- }
- return $this;
- }
- /**
- * @return Collection<int, EducationalProject>
- */
- public function getSilentPartners(): Collection
- {
- return $this->silentPartners;
- }
- public function addSilentPartner(EducationalProject $silentPartner): self
- {
- if (!$this->silentPartners->contains($silentPartner)) {
- $this->silentPartners[] = $silentPartner;
- $silentPartner->setSilentPartner($this);
- }
- return $this;
- }
- public function removeSilentPartner(EducationalProject $silentPartner): self
- {
- if ($this->silentPartners->removeElement($silentPartner)) {
- // set the owning side to null (unless already changed)
- if ($silentPartner->getSilentPartner() === $this) {
- $silentPartner->setSilentPartner(null);
- }
- }
- return $this;
- }
- /**
- * @return Collection<int, EducationalProject>
- */
- public function getOperationalPartners(): Collection
- {
- return $this->operationalPartners;
- }
- public function addOperationalPartner(EducationalProject $operationalPartner): self
- {
- if (!$this->operationalPartners->contains($operationalPartner)) {
- $this->operationalPartners[] = $operationalPartner;
- $operationalPartner->setOperationalPartner($this);
- }
- return $this;
- }
- public function removeOperationalPartner(EducationalProject $operationalPartner): self
- {
- if ($this->operationalPartners->removeElement($operationalPartner)) {
- // set the owning side to null (unless already changed)
- if ($operationalPartner->getOperationalPartner() === $this) {
- $operationalPartner->setOperationalPartner(null);
- }
- }
- return $this;
- }
- /**
- * @return Collection<int, EventUser>
- */
- public function getEventUsers(): Collection
- {
- return $this->eventUsers;
- }
- public function addEventUser(EventUser $eventUser): self
- {
- if (!$this->eventUsers->contains($eventUser)) {
- $this->eventUsers[] = $eventUser;
- $eventUser->setGuest($this);
- }
- return $this;
- }
- public function removeEventUser(EventUser $eventUser): self
- {
- if ($this->eventUsers->removeElement($eventUser)) {
- // set the owning side to null (unless already changed)
- if ($eventUser->getGuest() === $this) {
- $eventUser->setGuest(null);
- }
- }
- return $this;
- }
- /**
- * @return Collection<int, ExamenConvocation>
- */
- public function getExamenConvocations(): Collection
- {
- return $this->examenConvocations;
- }
- public function addExamenConvocation(ExamenConvocation $examenConvocation): self
- {
- if (!$this->examenConvocations->contains($examenConvocation)) {
- $this->examenConvocations[] = $examenConvocation;
- $examenConvocation->setStudent($this);
- }
- return $this;
- }
- public function removeExamenConvocation(ExamenConvocation $examenConvocation): self
- {
- if ($this->examenConvocations->removeElement($examenConvocation)) {
- // set the owning side to null (unless already changed)
- if ($examenConvocation->getStudent() === $this) {
- $examenConvocation->setStudent(null);
- }
- }
- return $this;
- }
- /**
- * @return Collection<int, EquipmentRepair>
- */
- public function getEquipmentRepairProviders(): Collection
- {
- return $this->equipmentRepairProviders;
- }
- public function addEquipmentRepairProvider(EquipmentRepair $equipmentRepairProvider): self
- {
- if (!$this->equipmentRepairProviders->contains($equipmentRepairProvider)) {
- $this->equipmentRepairProviders[] = $equipmentRepairProvider;
- $equipmentRepairProvider->setProvider($this);
- }
- return $this;
- }
- public function removeEquipmentRepairProvider(EquipmentRepair $equipmentRepairProvider): self
- {
- if ($this->equipmentRepairProviders->removeElement($equipmentRepairProvider)) {
- // set the owning side to null (unless already changed)
- if ($equipmentRepairProvider->getProvider() === $this) {
- $equipmentRepairProvider->setProvider(null);
- }
- }
- return $this;
- }
- /**
- * @return Collection<int, Attendance>
- */
- public function getAttendances(): Collection
- {
- return $this->attendances;
- }
- public function addAttendance(Attendance $attendance): self
- {
- if (!$this->attendances->contains($attendance)) {
- $this->attendances[] = $attendance;
- $attendance->setAccess($this);
- }
- return $this;
- }
- public function removeAttendance(Attendance $attendance): self
- {
- if ($this->attendances->removeElement($attendance)) {
- // set the owning side to null (unless already changed)
- if ($attendance->getAccess() === $this) {
- $attendance->setAccess(null);
- }
- }
- return $this;
- }
- /**
- * @return Collection<int, AttendanceBooking>
- */
- public function getAttendanceBookings(): Collection
- {
- return $this->attendanceBookings;
- }
- public function addAttendanceBooking(AttendanceBooking $attendanceBooking): self
- {
- if (!$this->attendanceBookings->contains($attendanceBooking)) {
- $this->attendanceBookings[] = $attendanceBooking;
- $attendanceBooking->setAccess($this);
- }
- return $this;
- }
- public function removeAttendanceBooking(AttendanceBooking $attendanceBooking): self
- {
- if ($this->attendanceBookings->removeElement($attendanceBooking)) {
- // set the owning side to null (unless already changed)
- if ($attendanceBooking->getAccess() === $this) {
- $attendanceBooking->setAccess(null);
- }
- }
- return $this;
- }
- /**
- * @return Collection<int, Attendance>
- */
- public function getAttendanceReplacements(): Collection
- {
- return $this->attendanceReplacements;
- }
- public function addAttendanceReplacement(Attendance $attendanceReplacement): self
- {
- if (!$this->attendanceReplacements->contains($attendanceReplacement)) {
- $this->attendanceReplacements[] = $attendanceReplacement;
- $attendanceReplacement->setReplacement($this);
- }
- return $this;
- }
- public function removeAttendanceReplacement(Attendance $attendanceReplacement): self
- {
- if ($this->attendanceReplacements->removeElement($attendanceReplacement)) {
- // set the owning side to null (unless already changed)
- if ($attendanceReplacement->getReplacement() === $this) {
- $attendanceReplacement->setReplacement(null);
- }
- }
- return $this;
- }
- /**
- * @return Collection<int, RoomRepair>
- */
- public function getRoomRepairProviders(): Collection
- {
- return $this->roomRepairProviders;
- }
- public function addRoomRepairProvider(RoomRepair $roomRepairProvider): self
- {
- if (!$this->roomRepairProviders->contains($roomRepairProvider)) {
- $this->roomRepairProviders[] = $roomRepairProvider;
- $roomRepairProvider->setProvider($this);
- }
- return $this;
- }
- public function removeRoomRepairProvider(RoomRepair $roomRepairProvider): self
- {
- if ($this->roomRepairProviders->removeElement($roomRepairProvider)) {
- // set the owning side to null (unless already changed)
- if ($roomRepairProvider->getProvider() === $this) {
- $roomRepairProvider->setProvider(null);
- }
- }
- return $this;
- }
- /**
- * @return Collection<int, PlaceRepair>
- */
- public function getPlaceRepairProviders(): Collection
- {
- return $this->placeRepairProviders;
- }
- public function addPlaceRepairProvider(PlaceRepair $placeRepairProvider): self
- {
- if (!$this->placeRepairProviders->contains($placeRepairProvider)) {
- $this->placeRepairProviders[] = $placeRepairProvider;
- $placeRepairProvider->setProvider($this);
- }
- return $this;
- }
- public function removePlaceRepairProvider(PlaceRepair $placeRepairProvider): self
- {
- if ($this->placeRepairProviders->removeElement($placeRepairProvider)) {
- // set the owning side to null (unless already changed)
- if ($placeRepairProvider->getProvider() === $this) {
- $placeRepairProvider->setProvider(null);
- }
- }
- return $this;
- }
- /**
- * @return Collection<int, Jury>
- */
- public function getJuryMembers(): Collection
- {
- return $this->juryMembers;
- }
- public function addJuryMember(Jury $juryMember): self
- {
- if (!$this->juryMembers->contains($juryMember)) {
- $this->juryMembers[] = $juryMember;
- $juryMember->addMember($this);
- }
- return $this;
- }
- public function removeJuryMember(Jury $juryMember): self
- {
- if ($this->juryMembers->removeElement($juryMember)) {
- $juryMember->removeMember($this);
- }
- return $this;
- }
- /**
- * @return Collection<int, Organization>
- */
- public function getOrganizationContacts(): Collection
- {
- return $this->organizationContacts;
- }
- public function addOrganizationContact(Organization $organizationContact): self
- {
- if (!$this->organizationContacts->contains($organizationContact)) {
- $this->organizationContacts[] = $organizationContact;
- $organizationContact->setContactPerson($this);
- }
- return $this;
- }
- public function removeOrganizationContact(Organization $organizationContact): self
- {
- if ($this->organizationContacts->removeElement($organizationContact)) {
- // set the owning side to null (unless already changed)
- if ($organizationContact->getContactPerson() === $this) {
- $organizationContact->setContactPerson(null);
- }
- }
- return $this;
- }
- /**
- * @return Collection<int, CommissionMember>
- */
- public function getCommissionMembers(): Collection
- {
- return $this->commissionMembers;
- }
- public function addCommissionMember(CommissionMember $commissionMember): self
- {
- if (!$this->commissionMembers->contains($commissionMember)) {
- $this->commissionMembers[] = $commissionMember;
- $commissionMember->setMember($this);
- }
- return $this;
- }
- public function removeCommissionMember(CommissionMember $commissionMember): self
- {
- if ($this->commissionMembers->removeElement($commissionMember)) {
- // set the owning side to null (unless already changed)
- if ($commissionMember->getMember() === $this) {
- $commissionMember->setMember(null);
- }
- }
- return $this;
- }
- /**
- * @return Collection<int, Equipment>
- */
- public function getEquipmentSuppliers(): Collection
- {
- return $this->equipmentSuppliers;
- }
- public function addEquipmentSupplier(Equipment $equipmentSupplier): self
- {
- if (!$this->equipmentSuppliers->contains($equipmentSupplier)) {
- $this->equipmentSuppliers[] = $equipmentSupplier;
- $equipmentSupplier->setSupplier($this);
- }
- return $this;
- }
- public function removeEquipmentSupplier(Equipment $equipmentSupplier): self
- {
- if ($this->equipmentSuppliers->removeElement($equipmentSupplier)) {
- // set the owning side to null (unless already changed)
- if ($equipmentSupplier->getSupplier() === $this) {
- $equipmentSupplier->setSupplier(null);
- }
- }
- return $this;
- }
- /**
- * @return Collection<int, Equipment>
- */
- public function getEquipmentControlManagers(): Collection
- {
- return $this->equipmentControlManagers;
- }
- public function addEquipmentControlManager(Equipment $equipmentControlManager): self
- {
- if (!$this->equipmentControlManagers->contains($equipmentControlManager)) {
- $this->equipmentControlManagers[] = $equipmentControlManager;
- $equipmentControlManager->setControlManager($this);
- }
- return $this;
- }
- public function removeEquipmentControlManager(Equipment $equipmentControlManager): self
- {
- if ($this->equipmentControlManagers->removeElement($equipmentControlManager)) {
- // set the owning side to null (unless already changed)
- if ($equipmentControlManager->getControlManager() === $this) {
- $equipmentControlManager->setControlManager(null);
- }
- }
- return $this;
- }
- /**
- * @return Collection<int, Equipment>
- */
- public function getEquipmentEditors(): Collection
- {
- return $this->equipmentEditors;
- }
- public function addEquipmentEditor(Equipment $equipmentEditor): self
- {
- if (!$this->equipmentEditors->contains($equipmentEditor)) {
- $this->equipmentEditors[] = $equipmentEditor;
- $equipmentEditor->setEditor($this);
- }
- return $this;
- }
- public function removeEquipmentEditor(Equipment $equipmentEditor): self
- {
- if ($this->equipmentEditors->removeElement($equipmentEditor)) {
- // set the owning side to null (unless already changed)
- if ($equipmentEditor->getEditor() === $this) {
- $equipmentEditor->setEditor(null);
- }
- }
- return $this;
- }
- /**
- * @return Collection<int, EquipmentLoan>
- */
- public function getEquipmentLoans(): Collection
- {
- return $this->equipmentLoans;
- }
- public function addEquipmentLoan(EquipmentLoan $equipmentLoan): self
- {
- if (!$this->equipmentLoans->contains($equipmentLoan)) {
- $this->equipmentLoans[] = $equipmentLoan;
- $equipmentLoan->setBorrower($this);
- }
- return $this;
- }
- public function removeEquipmentLoan(EquipmentLoan $equipmentLoan): self
- {
- if ($this->equipmentLoans->removeElement($equipmentLoan)) {
- // set the owning side to null (unless already changed)
- if ($equipmentLoan->getBorrower() === $this) {
- $equipmentLoan->setBorrower(null);
- }
- }
- return $this;
- }
- /**
- * @return Collection<int, Equipment>
- */
- public function getEquipments(): Collection
- {
- return $this->equipments;
- }
- public function addEquipment(Equipment $equipment): self
- {
- if (!$this->equipments->contains($equipment)) {
- $this->equipments[] = $equipment;
- $equipment->setAccess($this);
- }
- return $this;
- }
- public function removeEquipment(Equipment $equipment): self
- {
- if ($this->equipments->removeElement($equipment)) {
- // set the owning side to null (unless already changed)
- if ($equipment->getAccess() === $this) {
- $equipment->setAccess(null);
- }
- }
- return $this;
- }
- /**
- * @return Collection<int, AccessFictionalIntangible>
- */
- public function getAccessFictionalIntangibles(): Collection
- {
- return $this->accessFictionalIntangibles;
- }
- public function addAccessFictionalIntangible(AccessFictionalIntangible $accessFictionalIntangible): self
- {
- if (!$this->accessFictionalIntangibles->contains($accessFictionalIntangible)) {
- $this->accessFictionalIntangibles[] = $accessFictionalIntangible;
- $accessFictionalIntangible->setAccess($this);
- }
- return $this;
- }
- public function removeAccessFictionalIntangible(AccessFictionalIntangible $accessFictionalIntangible): self
- {
- if ($this->accessFictionalIntangibles->removeElement($accessFictionalIntangible)) {
- // set the owning side to null (unless already changed)
- if ($accessFictionalIntangible->getAccess() === $this) {
- $accessFictionalIntangible->setAccess(null);
- }
- }
- return $this;
- }
- /**
- * @return Collection<int, Donor>
- */
- public function getDonors(): Collection
- {
- return $this->donors;
- }
- public function addDonor(Donor $donor): self
- {
- if (!$this->donors->contains($donor)) {
- $this->donors[] = $donor;
- $donor->setAccess($this);
- }
- return $this;
- }
- public function removeDonor(Donor $donor): self
- {
- if ($this->donors->removeElement($donor)) {
- // set the owning side to null (unless already changed)
- if ($donor->getAccess() === $this) {
- $donor->setAccess(null);
- }
- }
- return $this;
- }
- /**
- * @return Collection<int, Medal>
- */
- public function getMedals(): Collection
- {
- return $this->medals;
- }
- public function addMedal(Medal $medal): self
- {
- if (!$this->medals->contains($medal)) {
- $this->medals[] = $medal;
- $medal->setAccess($this);
- }
- return $this;
- }
- public function removeMedal(Medal $medal): self
- {
- if ($this->medals->removeElement($medal)) {
- // set the owning side to null (unless already changed)
- if ($medal->getAccess() === $this) {
- $medal->setAccess(null);
- }
- }
- return $this;
- }
- /**
- * @return Collection<int, OrganizationResponsability>
- */
- public function getOrganizationResponsabilities(): Collection
- {
- return $this->organizationResponsabilities;
- }
- public function addOrganizationResponsability(OrganizationResponsability $organizationResponsability): self
- {
- if (!$this->organizationResponsabilities->contains($organizationResponsability)) {
- $this->organizationResponsabilities[] = $organizationResponsability;
- $organizationResponsability->setAccess($this);
- }
- return $this;
- }
- public function removeOrganizationResponsability(OrganizationResponsability $organizationResponsability): self
- {
- if ($this->organizationResponsabilities->removeElement($organizationResponsability)) {
- // set the owning side to null (unless already changed)
- if ($organizationResponsability->getAccess() === $this) {
- $organizationResponsability->setAccess(null);
- }
- }
- return $this;
- }
- /**
- * @return Collection<int, AccessWish>
- */
- public function getAccessWishes(): Collection
- {
- return $this->accessWishes;
- }
- public function addAccessWish(AccessWish $accessWish): self
- {
- if (!$this->accessWishes->contains($accessWish)) {
- $this->accessWishes[] = $accessWish;
- $accessWish->setAccessOriginal($this);
- }
- return $this;
- }
- public function removeAccessWish(AccessWish $accessWish): self
- {
- if ($this->accessWishes->removeElement($accessWish)) {
- // set the owning side to null (unless already changed)
- if ($accessWish->getAccessOriginal() === $this) {
- $accessWish->setAccessOriginal(null);
- }
- }
- return $this;
- }
- /**
- * @return Collection<int, WorkByUser>
- */
- public function getWorkByUsers(): Collection
- {
- return $this->workByUsers;
- }
- public function addWorkByUser(WorkByUser $workByUser): self
- {
- if (!$this->workByUsers->contains($workByUser)) {
- $this->workByUsers[] = $workByUser;
- $workByUser->setStudent($this);
- }
- return $this;
- }
- public function removeWorkByUser(WorkByUser $workByUser): self
- {
- if ($this->workByUsers->removeElement($workByUser)) {
- // set the owning side to null (unless already changed)
- if ($workByUser->getStudent() === $this) {
- $workByUser->setStudent(null);
- }
- }
- return $this;
- }
- /**
- * @return Collection<int, Tagg>
- */
- public function getTags(): Collection
- {
- return $this->tags;
- }
- public function addTag(Tagg $tag): self
- {
- if (!$this->tags->contains($tag)) {
- $this->tags[] = $tag;
- }
- return $this;
- }
- public function removeTag(Tagg $tag): self
- {
- $this->tags->removeElement($tag);
- return $this;
- }
- /**
- * @return Collection<int, Event>
- */
- public function getEventOrganizers(): Collection
- {
- return $this->eventOrganizers;
- }
- public function addEventOrganizer(Event $eventOrganizer): self
- {
- if (!$this->eventOrganizers->contains($eventOrganizer)) {
- $this->eventOrganizers[] = $eventOrganizer;
- $eventOrganizer->addOrganizer($this);
- }
- return $this;
- }
- public function removeEventOrganizer(Event $eventOrganizer): self
- {
- if ($this->eventOrganizers->removeElement($eventOrganizer)) {
- $eventOrganizer->removeOrganizer($this);
- }
- return $this;
- }
- /**
- * @return Collection<int, EducationalProject>
- */
- public function getEducationalProjectOrganizers(): Collection
- {
- return $this->educationalProjectOrganizers;
- }
- public function addEducationalProjectOrganizer(EducationalProject $educationalProjectOrganizer): self
- {
- if (!$this->educationalProjectOrganizers->contains($educationalProjectOrganizer)) {
- $this->educationalProjectOrganizers[] = $educationalProjectOrganizer;
- $educationalProjectOrganizer->addOrganizer($this);
- }
- return $this;
- }
- public function removeEducationalProjectOrganizer(EducationalProject $educationalProjectOrganizer): self
- {
- if ($this->educationalProjectOrganizers->removeElement($educationalProjectOrganizer)) {
- $educationalProjectOrganizer->removeOrganizer($this);
- }
- return $this;
- }
- /**
- * @return Collection<int, Email>
- */
- public function getEmails(): Collection
- {
- return $this->emails;
- }
- public function addEmail(Email $email): self
- {
- if (!$this->emails->contains($email)) {
- $this->emails[] = $email;
- $email->setAuthor($this);
- }
- return $this;
- }
- public function removeEmail(Email $email): self
- {
- if ($this->emails->removeElement($email)) {
- // set the owning side to null (unless already changed)
- if ($email->getAuthor() === $this) {
- $email->setAuthor(null);
- }
- }
- return $this;
- }
- /**
- * @return Collection<int, Mail>
- */
- public function getMails(): Collection
- {
- return $this->mails;
- }
- public function addMail(Mail $mail): self
- {
- if (!$this->mails->contains($mail)) {
- $this->mails[] = $mail;
- $mail->setAuthor($this);
- }
- return $this;
- }
- public function removeMail(Mail $mail): self
- {
- if ($this->mails->removeElement($mail)) {
- // set the owning side to null (unless already changed)
- if ($mail->getAuthor() === $this) {
- $mail->setAuthor(null);
- }
- }
- return $this;
- }
- /**
- * @return Collection<int, Sms>
- */
- public function getSms(): Collection
- {
- return $this->sms;
- }
- public function addSms(Sms $sms): self
- {
- if (!$this->sms->contains($sms)) {
- $this->sms[] = $sms;
- $sms->setAuthor($this);
- }
- return $this;
- }
- public function removeSms(Sms $sms): self
- {
- if ($this->sms->removeElement($sms)) {
- // set the owning side to null (unless already changed)
- if ($sms->getAuthor() === $this) {
- $sms->setAuthor(null);
- }
- }
- return $this;
- }
- public function getAccessBilling(): ?AccessBilling
- {
- return $this->accessBilling;
- }
- public function setAccessBilling(?AccessBilling $accessBilling): self
- {
- // unset the owning side of the relation if necessary
- if ($accessBilling === null && $this->accessBilling !== null) {
- $this->accessBilling->setAccess(null);
- }
- // set the owning side of the relation if necessary
- if ($accessBilling !== null && $accessBilling->getAccess() !== $this) {
- $accessBilling->setAccess($this);
- }
- $this->accessBilling = $accessBilling;
- return $this;
- }
- }
|