Access.php 100 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117
  1. <?php
  2. namespace AppBundle\Entity\AccessAndFunction;
  3. use AppBundle\Annotation\DefaultField;
  4. use AppBundle\Entity\AccessWish\AccessWish;
  5. use AppBundle\Entity\Billing\AccessBilling;
  6. use AppBundle\Entity\Billing\AccessIntangible;
  7. use AppBundle\Entity\Billing\AccessPayer;
  8. use AppBundle\Entity\Billing\BillCredit;
  9. use AppBundle\Entity\Booking\AbstractBooking;
  10. use AppBundle\Entity\Booking\CalendarSynchro;
  11. use AppBundle\Entity\Booking\Course;
  12. use AppBundle\Entity\Booking\WorkByUser;
  13. use AppBundle\Entity\Education\EducationNotationConfig;
  14. use AppBundle\Entity\Education\EducationStudent;
  15. use AppBundle\Entity\Organization\Parameters;
  16. use AppBundle\Entity\Person\CompanyPerson;
  17. use AppBundle\Entity\Person\Medal;
  18. use AppBundle\Entity\Person\PersonActivity;
  19. use AppBundle\Entity\Person\PersonBilling;
  20. use AppBundle\Entity\Person\ProfessionalInformation;
  21. use AppBundle\Entity\Product\EquipmentLoan;
  22. use AppBundle\Entity\Product\Loan;
  23. use Doctrine\Common\Collections\ArrayCollection;
  24. use Doctrine\ORM\Mapping as ORM;
  25. use DoctrineExtensions\Query\Mysql\Date;
  26. use Dunglas\ApiBundle\Annotation\Iri;
  27. use Symfony\Component\Serializer\Annotation\Groups;
  28. use Symfony\Component\Validator\Constraints as Assert;
  29. use AppBundle\Entity\Traits\TimestampableEntity;
  30. use AppBundle\Entity\Traits\CreatorUpdaterEntity;
  31. use AppBundle\Entity\Organization\Organization;
  32. use AppBundle\Entity\Person\Person;
  33. use AppBundle\Validator\Constraints\Delete as OpentalentDelete;
  34. use AppBundle\Entity\Booking\PersonHoliday;
  35. use AppBundle\Entity\Core\ContactInterface;
  36. use AppBundle\Validator\Constraints\Education as OpentalentEducationAssert;
  37. /**
  38. * Fais le lien entre une Person et une Organization
  39. *
  40. *
  41. * @Iri("http://schema.org/Access")
  42. * @OpentalentDelete\EntityDelete()
  43. */
  44. #[ORM\Entity(repositoryClass: 'AppBundle\Entity\AccessAndFunction\Repository\AccessRepository')]
  45. #[ORM\Table(name: 'Access')]
  46. #[ORM\UniqueConstraint(name: 'person_organization_idx', columns: ['person_id', 'organization_id'])]
  47. class Access implements ContactInterface
  48. {
  49. use TimestampableEntity;
  50. use CreatorUpdaterEntity;
  51. /**
  52. * @var int
  53. */
  54. #[ORM\Column(type: 'integer')]
  55. #[ORM\Id]
  56. #[ORM\GeneratedValue(strategy: 'AUTO')]
  57. #[Groups(['access', 'email_detail', 'access_details', 'access_mass', 'student_list', 'billaccounting_list', 'bill_list', 'billaccounting_list_billlines', 'equipment_list', 'equipmentrent_list', 'equipmentloan_list', 'equipmentcontrol_list', 'equipmentrepair_list', 'equipmentaccounting_list', 'equipmentmediatheque_list', 'equipmentcostume_list', 'message_list', 'messagesend_list', 'educationstudent_notation', 'template_list', 'othercontact_list', 'placerepair_list', 'commission_list_commissionmembers', 'attendancebooking_list', 'donor_list', 'examenconvocation_list', 'medal_list', 'viewaudit_list', 'my_student_list', 'planning_list', 'report_card_guardians', 'report_card_educationstudent', 'access_details_companypersoncompany', 'student_registration', 'student_registration_accessfamily', 'access_details_organization', 'presence_attendance', 'presence_attendance_jury', 'access_informations_edit', 'access_informations_edit_accessfamily', 'equipment_details', 'accesses_list', 'student_list_courses', 'adherent_list_guardians', 'own_access', 'own_student_access', 'event_details', 'board_list', 'attendance_list', 'course_details', 'educationalproject_details', 'networkmanagers_list', 'educationstudent_reference', 'educationteacher_reference', 'network_list', 'adherent_contact', 'equipmentmediatheque_list', 'organization_create', 'planning_detail', 'payer_list', 'billcredit_list', 'booking_event', 'invitations_list', 'accessbilling_edit', 'equipment_list_equipmentloan', 'equipmentmediatheque_list_equipmentloan', 'equipmentmediatheque_list', 'equipmentcostume_list_equipmentloan', 'sepa_debit_mandate', 'cotisation_responsibles_accesses', 'fusion_accesses', 'bill_list_billlines', 'equipment_availability_form', 'education_input_list', 'my_bills_show', 'online_registration_access_details', 'online_registration_access_family', 'education_student_next_year', 'access_files', 'education_student_wish_list_accesswish', 'education_student_wish_list_accesswishreregistrations', 'billpayment_list_bill', 'accesses_no_reregistred_list', 'accessholidays_list', 'education_student_next_year', 'equipmentloan_list', 'equipmentrent_list', 'examenconvocation_list', 'access_intangible_list', 'advancepayment_list', 'education_student_next_year_edit', 'build_bills', 'access_intangible_list', 'advancepayment_list', 'online_registration_validation'])]
  58. private $id;
  59. /**
  60. * @var Person
  61. *
  62. *
  63. */
  64. #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Person\Person', inversedBy: 'access', cascade: ['persist'])]
  65. #[Assert\NotNull]
  66. #[Groups(['access', 'worksbyusers_db_work', 'access_details', 'access_mass', 'access_reference', 'access_details_person', 'student_list_guardians', 'access_details_accessfamily', 'access_details_guardians', 'access_details_children', 'access_details_companyperson', 'access_details_accessfamily', 'student_list', 'guardians_list', 'all_accesses_list', 'guardians_list_children', 'teachers_list', 'adherent_list', 'personnels_list', 'morals_list', 'morals_list_companypersonaccesses', 'ca_list', 'accesses_list', 'rule', 'billaccounting_list_access', 'bill_list_access', 'access_details_billingpayers', 'billaccounting_list_billlines', 'equipment_list_supplier', 'equipment_list_access', 'equipmentrent_list_borrower', 'equipmentloan_list_borrower', 'equipmentcontrol_list_accompanist', 'equipmentcontrol_list_equipment', 'equipmentrepair_list_provider', 'equipmentaccounting_list_supplier', 'equipmentmediatheque_list_supplier', 'equipmentcostume_list_access', 'message_list_author', 'messagesend_list_author', 'template_list_author', 'othercontact_list', 'placerepair_list_provider', 'commission_list_commissionmembers', 'attendancebooking_list_access', 'donor_list_access', 'examenconvocation_list_student', 'medal_list_access', 'viewaudit_list_createdby', 'viewaudit_list_updatedby', 'my_student_list_access', 'report_card', 'report_card_guardians', 'report_card_educationstudent', 'access_details_educationstudent', 'access_details_companypersonaccesses', 'access_details_companypersoncompany', 'student_registration', 'student_registration_guardians', 'student_registration_accessfamily', 'presence_attendance_convocation', 'presence_attendance_students', 'presence_attendance_eventuser', 'access_details_organization', 'access_informations_edit', 'equipment_details_editor', 'equipmentmediatheque_list_editor', 'equipment_details_supplier', 'equipment_details_managercontrol', 'equipment_details_equipmentrepair', 'equipment_details_equipmentloanfiltered', 'accesses_list_guardians', 'student_list_courses', 'adherent_list_guardians', 'access_duplicate_control_list', 'own_access', 'own_student_access', 'event_details_organizer', 'accesscmfnetwork', 'board_list', 'attendance_list_access', 'attendance_list_replacement', 'event_details_eventuserfiltered', 'event_details_eventuser', 'examen_details_convocation', 'examen_details_jury', 'course_details_organizer', 'course_details_students', 'educationalproject_details_silentpartner', 'educationalproject_details_operationalpartner', 'educationalproject_details_financiers', 'educationalproject_details_billingreceivers', 'educationalproject_details_organizer', 'licence_cmf', 'networkmanagers_list', 'my_access_put', 'educationstudent_reference_access', 'educationstudent_reference_teachers', 'educationteacher_reference_teacher', 'network_list_adminaccess', 'adherent_contact', 'adherent_contact_guardians', 'access_mail', 'access_details_accessfamily', 'student_list_educationstudent', 'access_mail_guardians', 'othercontact_list_companypersoncompany', 'accesses_rules', 'billpayment_list_bill', 'educationnotation_list_educationstudent', 'organization_create_access', 'planning_detail_organizer', 'planning_detail_students', 'planning_detail_attendancebooking', 'planning_detail_convocation', 'planning_detail_jury', 'organization_details_organizationlicences', 'payer_list', 'payer_list_billingpayers', 'billcredit_list_access', 'invitations_list_guest', 'equipment_list_equipmentloan', 'equipmentmediatheque_list_equipmentloan', 'equipmentmediatheque_list_access', 'equipmentcostume_list_equipmentloan', 'sepa_debit_mandate', 'cotisation_responsibles_accesses', 'fusion_accesses', 'equipment_availability_form_borrower', 'course_details_attendancebooking', 'examen_details_attendancebooking', 'educationalproject_details_attendancebooking', 'event_details_attendancebooking', 'accessbilling_edit', 'equipment_availability_form_borrower', 'education_input_list_access', 'education_input_list_teachers', 'view_from_manager_create', 'accessbilling_edit', 'examen_details_attendancebooking', 'view_from_manager_create', 'bill_list_billlines', 'attendancebooking_list_course', 'education_student_next_year_access', 'education_student_next_year_teachers', 'education_student_next_year_educationstudentlastyear', 'online_registration_access_details', 'access_files', 'access_intangible_list_access', 'accesses_no_reregistred_list', 'billpayment_list_bill', 'educationstudent_notation_access', 'accesses_no_reregistred_list_educationstudent', 'accesses_no_reregistred_list_guardians', 'accessholidays_list_access', 'email_detail_author', 'cmf_network_persons', 'advancepayment_list_access', 'build_bills_access', 'build_bills_billlines', 'cmf_network_persons', 'advancepayment_list_access', 'billpayment_list_accessbillingaccountbalancereimbursement'])]
  67. #[Assert\Valid]
  68. private $person;
  69. /**
  70. * @var Organization
  71. *
  72. * @DefaultField
  73. */
  74. #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Organization\Organization', inversedBy: 'access')]
  75. #[ORM\JoinColumn(nullable: false)]
  76. #[Assert\NotNull]
  77. #[Groups(['access', 'access_details', 'adherent_list', 'all_accesses_list', 'networkmanagers_list', 'accesses_rules', 'cotisation_responsibles_accesses'])]
  78. private $organization;
  79. /**
  80. * @var bool
  81. */
  82. #[ORM\Column(type: 'boolean', options: ['default' => false])]
  83. #[Assert\Type(type: 'boolean')]
  84. #[Assert\NotNull]
  85. #[Groups(['organization_create_access'])]
  86. private $adminAccess = false;
  87. /**
  88. * @var bool
  89. */
  90. #[ORM\Column(type: 'boolean', options: ['default' => false])]
  91. #[Assert\Type(type: 'boolean')]
  92. #[Assert\NotNull]
  93. private $superAdminAccess = false;
  94. /**
  95. * @var array
  96. */
  97. #[ORM\Column(type: 'json_array', length: 4294967295, nullable: true)]
  98. #[Groups(['access'])]
  99. private $roles;
  100. /**
  101. * @var array
  102. */
  103. #[ORM\Column(type: 'boolean', options: ['default' => false])]
  104. #[Assert\Type(type: 'boolean')]
  105. #[Groups(['access'])]
  106. private $personalizedRoles = false;
  107. #[Assert\Valid]
  108. #[ORM\ManyToMany(targetEntity: 'Access', mappedBy: 'children', cascade: ['persist'])]
  109. #[Groups(['access', 'guardian', 'access_details', 'student_list', 'report_card', 'student_registration', 'access_informations_edit', 'accesses_list', 'adherent_list', 'adherent_contact', 'access_mail', 'online_registration_access_details', 'accesses_no_reregistred_list'])]
  110. private $guardians;
  111. #[ORM\ManyToMany(targetEntity: 'Access', inversedBy: 'guardians', cascade: ['persist'])]
  112. #[ORM\JoinTable(name: 'children_guardians', joinColumns: [], inverseJoinColumns: [])]
  113. #[ORM\JoinColumn(name: 'guardians_id', referencedColumnName: 'id')]
  114. #[ORM\JoinColumn(name: 'children_id', referencedColumnName: 'id')]
  115. #[Groups(['access', 'access_details', 'guardians_list', 'access_informations_edit'])]
  116. private $children;
  117. /**
  118. * @var ArrayCollection<CompanyPerson>
  119. */
  120. #[Assert\Valid]
  121. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Person\CompanyPerson', cascade: ['persist'], mappedBy: 'company', orphanRemoval: true)]
  122. #[Groups(['access_companypersonaccess', 'access_details', 'morals_list'])]
  123. private $companyPersonAccesses;
  124. /**
  125. * @var ArrayCollection<CompanyPerson>
  126. */
  127. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Person\CompanyPerson', cascade: ['persist'], mappedBy: 'access', orphanRemoval: true)]
  128. #[Groups(['access_personcompany', 'othercontact_list', 'othercontact_list_companypersoncompany', 'access_details'])]
  129. private $companyPersonCompany;
  130. /**
  131. * @var ArrayCollection<EducationStudent>
  132. *
  133. */
  134. #[Assert\Valid]
  135. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Education\EducationStudent', mappedBy: 'access', orphanRemoval: true, cascade: ['persist'])]
  136. #[Groups(['access_educationstudent', 'access_details', 'student_list', 'report_card', 'student_registration', 'examenconvocation_list_student', 'online_registration_access_details', 'accesses_no_reregistred_list'])]
  137. private $educationStudent;
  138. /**
  139. * @var ArrayCollection<EducationStudent>
  140. */
  141. #[Assert\Valid]
  142. #[ORM\ManyToMany(targetEntity: 'AppBundle\Entity\Education\EducationStudent', mappedBy: 'teachers', orphanRemoval: true, cascade: ['persist'])]
  143. private $educationStudentByTeacher;
  144. /**
  145. * @var ArrayCollection<EducationTeacher>
  146. */
  147. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Education\EducationTeacher', mappedBy: 'teacher', orphanRemoval: true)]
  148. #[Groups(['access_educationteacher'])]
  149. private $educationTeachers;
  150. /**
  151. * @var ArrayCollection<OrganizationFunction>
  152. */
  153. #[Assert\Valid]
  154. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\AccessAndFunction\OrganizationFunction', mappedBy: 'access', orphanRemoval: true, cascade: ['persist'])]
  155. #[Groups(['access_organizationfunction', 'access_details', 'adherent_list', 'personnels_list', 'ca_list', 'accesses_list', 'othercontact_list', 'student_registration', 'student_registration_guardians', 'student_registration_accessfamily', 'board_list', 'licence_cmf', 'access_informations_edit', 'adherent_contact', 'cotisation_responsibles_accesses', 'view_from_manager_create', 'networkmanagers_list', 'online_registration_access_details', 'accesscmfnetwork'])]
  156. private $organizationFunction;
  157. /**
  158. * @var ArrayCollection<PersonActivity>
  159. */
  160. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Person\PersonActivity', mappedBy: 'access', orphanRemoval: true, cascade: ['persist'])]
  161. #[Groups(['access_personactivity', 'access_details', 'student_list', 'adherent_list', 'accesses_list', 'othercontact_list', 'ca_list', 'board_list', 'licence_cmf', 'adherent_contact', 'invitations_list_guest'])]
  162. private $personActivity;
  163. /**
  164. * @var ArrayCollection<PersonActivity>
  165. */
  166. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Person\PersonActivity', mappedBy: 'access', orphanRemoval: true, cascade: ['persist'], fetch: 'EXTRA_LAZY')]
  167. #[Groups(['rule', 'presence_attendance_eventuser', 'accesses_rules'])]
  168. private $personActivityActive;
  169. /**
  170. * @var ArrayCollection<PersonHoliday>
  171. */
  172. #[Assert\Valid]
  173. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Booking\PersonHoliday', mappedBy: 'access', cascade: ['persist'], orphanRemoval: true)]
  174. #[Groups(['access_personholiday'])]
  175. private $holidays;
  176. /**
  177. * @var Course
  178. */
  179. #[Assert\Valid]
  180. #[ORM\ManyToMany(targetEntity: 'AppBundle\Entity\Booking\Course', mappedBy: 'students', cascade: ['persist'])]
  181. #[Groups(['access_course', 'access_details', 'student_list', 'edu_stu_courses', 'student_registration', 'education_input_list_access'])]
  182. private $courses;
  183. #[ORM\ManyToMany(targetEntity: 'AppBundle\Entity\Booking\Course', mappedBy: 'students', fetch: 'EXTRA_LAZY')]
  184. #[Groups(['student_list'])]
  185. private $coursesFiltered;
  186. #[ORM\ManyToMany(targetEntity: 'AppBundle\Entity\Booking\Course', mappedBy: 'students', fetch: 'EXTRA_LAZY')]
  187. #[Groups(['education_student_next_year_access'])]
  188. private $coursesNextYear;
  189. /**
  190. * @var Course
  191. */
  192. #[Assert\Valid]
  193. #[ORM\ManyToMany(targetEntity: 'AppBundle\Entity\Booking\Course', mappedBy: 'organizer', cascade: ['persist'])]
  194. #[Groups(['access_practicalcourses', 'access_details', 'accesses_courseteacher_show'])]
  195. private $practicalCourses;
  196. /**
  197. * @var AbstractBooking
  198. */
  199. #[Assert\Valid]
  200. #[ORM\ManyToMany(targetEntity: 'AppBundle\Entity\Booking\AbstractBooking', mappedBy: 'organizer', cascade: ['persist'])]
  201. private $bookingOrganizers;
  202. /**
  203. * @var AccessBilling
  204. */
  205. #[Assert\Valid]
  206. #[ORM\OneToOne(targetEntity: 'AppBundle\Entity\Billing\AccessBilling', mappedBy: 'access', cascade: ['persist'], orphanRemoval: true, fetch: 'EAGER')]
  207. #[Groups(['access', 'access_mass', 'access_details', 'student_registration', 'student_registration_guardians', 'accesses_list', 'student_list', 'guardians_list', 'adherent_list', 'bill_list_access', 'payer_list', 'accessbilling_edit', 'sepa_debit_mandate', 'fusion_accesses', 'online_registration_access_details', 'build_bills_billlines', 'build_bills_access', 'online_registration_access_details', 'account_balance_reimbursements'])]
  208. private $accessBilling;
  209. /**
  210. * @var ArrayCollection<AccessIntangible>
  211. */
  212. #[Assert\Valid]
  213. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Billing\AccessIntangible', mappedBy: 'access', cascade: ['persist'], orphanRemoval: true)]
  214. #[Groups(['access_accessintangible', 'access_details', 'student_registration', 'accessbilling_edit'])]
  215. private $accessIntangibles;
  216. /**
  217. * @var AccessFamily
  218. */
  219. #[Assert\Valid]
  220. #[ORM\ManyToOne(targetEntity: 'AccessFamily', inversedBy: 'accesses', cascade: ['persist'])]
  221. #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
  222. #[Groups(['access', 'access_details', 'student_registration', 'access_informations_edit', 'online_registration_access_family'])]
  223. private $accessFamily;
  224. #[Groups(['access_familymembers', 'access_informations_edit'])]
  225. private $familyMembers;
  226. /**
  227. * @var ArrayCollection<AccessPayer>
  228. */
  229. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Billing\AccessPayer', mappedBy: 'accessPayer', cascade: ['persist'], orphanRemoval: true)]
  230. #[Groups(['access_accesspayer', 'access_details', 'payer_list', 'accessbilling_edit'])]
  231. private $billingPayers;
  232. /**
  233. * @var ArrayCollection<AccessPayer>
  234. */
  235. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Billing\AccessPayer', mappedBy: 'accessReceiver', cascade: ['persist'], orphanRemoval: true)]
  236. #[Groups(['access_accessreceiver', 'access_details', 'student_registration', 'payer_list', 'accessbilling_edit', 'access_intangible_list_access'])]
  237. private $billingReceivers;
  238. /**
  239. * @var ArrayCollection<EducationalProject>
  240. */
  241. #[Assert\Valid]
  242. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Billing\EducationalProjectPayer', mappedBy: 'educationalProjectPayer', cascade: ['persist'], orphanRemoval: true)]
  243. #[Groups(['access_educationalprojectpayer', 'accessbilling_edit'])]
  244. private $billingEducationalProjectPayers;
  245. /**
  246. * @var ArrayCollection<Bill>
  247. */
  248. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Billing\Bill', mappedBy: 'access', orphanRemoval: true)]
  249. #[Groups(['access_bill', 'my_bills_show'])]
  250. private $bills;
  251. /**
  252. * @var ArrayCollection<BillLine>
  253. */
  254. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Billing\BillLine', mappedBy: 'access', orphanRemoval: true)]
  255. #[Groups(['access_billline'])]
  256. private $billLines;
  257. /**
  258. * @var ArrayCollection<BillCredit>
  259. */
  260. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Billing\BillCredit', mappedBy: 'access', orphanRemoval: true)]
  261. #[Groups(['access_billcredit'])]
  262. private $billCredits;
  263. /**
  264. * @var ArrayCollection<EducationalProject>
  265. */
  266. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Booking\EducationalProject', mappedBy: 'silentPartner')]
  267. #[Groups(['access_educationalproject'])]
  268. private $silentPartners;
  269. /**
  270. * @var ArrayCollection<EducationalProject>
  271. */
  272. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Booking\EducationalProject', mappedBy: 'operationalPartner')]
  273. #[Groups(['access_educationalproject'])]
  274. private $operationalPartners;
  275. /**
  276. * @var ArrayCollection<EventUser>
  277. */
  278. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Booking\EventUser', mappedBy: 'guest', orphanRemoval: true)]
  279. #[Groups(['access_eventuser'])]
  280. private $eventUsers;
  281. /**
  282. * @var ArrayCollection<ExamenConvocation>
  283. */
  284. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Booking\ExamenConvocation', mappedBy: 'student', orphanRemoval: true)]
  285. #[Groups(['access_eventuser', 'report_card'])]
  286. private $examenConvocations;
  287. /**
  288. * @var ArrayCollection<EquipmentRepair>
  289. */
  290. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Product\EquipmentRepair', mappedBy: 'provider')]
  291. #[Groups(['access_repair'])]
  292. private $equipmentRepairProviders;
  293. /**
  294. * @var ArrayCollection<Attendance>
  295. */
  296. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Booking\Attendance', mappedBy: 'access', orphanRemoval: true)]
  297. #[Groups(['access_attendance'])]
  298. private $attendances;
  299. /**
  300. * @var ArrayCollection<AttendanceBooking>
  301. */
  302. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Booking\AttendanceBooking', mappedBy: 'access', orphanRemoval: true)]
  303. #[Groups(['access_attendancebooking', 'report_card', 'access_attendance_detail'])]
  304. private $attendanceBookings;
  305. /**
  306. * @var ArrayCollection<AttendanceBooking>
  307. */
  308. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Booking\AttendanceBooking', mappedBy: 'access', orphanRemoval: true, fetch: 'EXTRA_LAZY')]
  309. #[ORM\OrderBy(['id' => 'DESC'])]
  310. #[Groups(['access_attendancebooking', 'access_details'])]
  311. private $attendanceBookingsFiltered;
  312. /**
  313. * @var ArrayCollection<Attendance>
  314. */
  315. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Booking\Attendance', mappedBy: 'replacement', orphanRemoval: true)]
  316. #[Groups(['access_attendance'])]
  317. private $attendanceReplacements;
  318. /**
  319. * @var ArrayCollection<EquipmentRepair>
  320. */
  321. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Place\RoomRepair', mappedBy: 'provider')]
  322. #[Groups(['access_repair'])]
  323. private $roomRepairProviders;
  324. /**
  325. * @var ArrayCollection<EquipmentRepair>
  326. */
  327. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Place\PlaceRepair', mappedBy: 'provider')]
  328. #[Groups(['access_repair'])]
  329. private $placeRepairProviders;
  330. /**
  331. * @var ArrayCollection<Document>
  332. */
  333. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Core\Document', mappedBy: 'author')]
  334. #[Groups(['access_document'])]
  335. private $documentAuthors;
  336. /**
  337. * @var ArrayCollection<Notification>
  338. */
  339. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Core\Notification', mappedBy: 'recipientAccess', orphanRemoval: true)]
  340. #[Groups(['access_notification'])]
  341. private $notifications;
  342. /**
  343. * @var ArrayCollection<NotificationUser>
  344. */
  345. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Core\NotificationUser', mappedBy: 'access', orphanRemoval: true)]
  346. #[Groups(['access_notificationuser'])]
  347. private $notificationUsers;
  348. /**
  349. * @var ArrayCollection<Message>
  350. */
  351. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Message\Message', mappedBy: 'author', orphanRemoval: true)]
  352. #[Groups(['access_message'])]
  353. private $messages;
  354. /**
  355. * @var ArrayCollection<JuryMember>
  356. */
  357. #[ORM\ManyToMany(targetEntity: 'AppBundle\Entity\Organization\Jury', mappedBy: 'members', orphanRemoval: true)]
  358. #[ORM\JoinTable(name: 'juries_members')]
  359. #[Groups(['access_jury'])]
  360. private $juryMembers;
  361. /**
  362. * @var ArrayCollection<Organization>
  363. */
  364. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Organization\Organization', mappedBy: 'contactPerson')]
  365. #[Groups(['access_organization'])]
  366. private $organizationContacts;
  367. /**
  368. * @var ArrayCollection<OrganizationLicence>
  369. */
  370. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Organization\OrganizationLicence', mappedBy: 'licensee', orphanRemoval: true)]
  371. #[Groups(['access_organizationlicence'])]
  372. private $organizationLicences;
  373. /**
  374. * @var ArrayCollection<CommissionMember>
  375. */
  376. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Person\CommissionMember', mappedBy: 'member', orphanRemoval: true)]
  377. #[Groups(['access_commissionmember'])]
  378. private $commissionMembers;
  379. /**
  380. * @var ArrayCollection<Equipment>
  381. */
  382. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Product\Equipment', mappedBy: 'supplier')]
  383. #[Groups(['access_equipment'])]
  384. private $equipmentSuppliers;
  385. /**
  386. * @var ArrayCollection<Equipment>
  387. */
  388. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Product\Equipment', mappedBy: 'controlManager')]
  389. #[Groups(['access_equipment'])]
  390. private $equipmentControlManagers;
  391. /**
  392. * @var ArrayCollection<Equipment>
  393. */
  394. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Product\Equipment', mappedBy: 'editor')]
  395. #[Groups(['access_equipment'])]
  396. private $equipmentEditors;
  397. /**
  398. * @var ArrayCollection<EquipmentLoan>
  399. */
  400. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Product\EquipmentLoan', mappedBy: 'borrower', orphanRemoval: true, cascade: ['persist'])]
  401. #[Groups(['access_equipmentloan', 'accessequipment_grid', 'own_access', 'own_student_access', 'access_details'])]
  402. private $equipmentLoans;
  403. /**
  404. * @var ArrayCollection<Control>
  405. */
  406. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Core\AbstractControl', mappedBy: 'accompanist', orphanRemoval: true)]
  407. #[Groups(['access_equipmentloan'])]
  408. private $accompanistControl;
  409. /**
  410. * @var ArrayCollection<Equipment>
  411. */
  412. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Product\Equipment', mappedBy: 'access', orphanRemoval: true, cascade: ['persist'])]
  413. #[Groups(['person_equipment', 'access_details', 'accessequipment_grid', 'own_access', 'own_student_access'])]
  414. private $equipments;
  415. /**
  416. * @var string
  417. */
  418. #[ORM\Column(type: 'text', nullable: true)]
  419. #[Assert\Type(type: 'string')]
  420. #[Groups(['access', 'access_details', 'access_mass', 'student_registration', 'access_informations_edit', 'accesses_list', 'student_list', 'guardians_list', 'teachers_list', 'adherent_list', 'personnels_list', 'morals_list', 'ca_list', 'othercontact_list', 'board_list', 'fusion_accesses'])]
  421. private $note;
  422. /**
  423. * @var ArrayCollection<AccessFictionalIntangible>
  424. */
  425. #[Assert\Valid]
  426. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Billing\AccessFictionalIntangible', mappedBy: 'access', cascade: ['persist'], orphanRemoval: true)]
  427. #[Groups(['access_accessfictionalintangible', 'access_details'])]
  428. private $accessFictionalIntangibles;
  429. /**attendance_list
  430. * @Assert\Valid
  431. * @var ArrayCollection<PersonalizedList>
  432. * @ORM\OneToMany(targetEntity="AppBundle\Entity\AccessAndFunction\PersonalizedList", mappedBy="access", cascade={"persist"}, orphanRemoval=true)
  433. * @Groups({"access_personalizedlist"})
  434. */
  435. private $personalizedLists;
  436. /**
  437. * @var bool
  438. */
  439. #[ORM\Column(type: 'boolean', options: ['default' => false])]
  440. #[Assert\Type(type: 'boolean')]
  441. #[Groups(['access', 'student_list', 'all_accesses_list', 'guardians_list', 'personnels_list', 'othercontact_list', 'ca_list', 'adherent_list', 'accesses_list', 'teachers_list', 'morals_list', 'board_list', 'payer_list'])]
  442. #[Assert\NotNull]
  443. private $loginEnabled = false;
  444. /**
  445. * @var bool
  446. */
  447. #[ORM\Column(type: 'boolean', options: ['default' => false])]
  448. #[Assert\Type(type: 'boolean')]
  449. #[Groups(['access', 'access_details', 'education_student_wish_list_accesswish', 'education_student_wish_list_accesswishreregistrations'])]
  450. #[Assert\NotNull]
  451. private $newAccess = false;
  452. /**
  453. * @var bool
  454. */
  455. #[ORM\Column(type: 'boolean', options: ['default' => false])]
  456. #[Assert\Type(type: 'boolean')]
  457. #[Assert\NotNull]
  458. private $ielEnabled = false;
  459. /**
  460. * @var \DateTime
  461. */
  462. #[ORM\Column(type: 'datetime', nullable: true)]
  463. #[Assert\Date]
  464. private $ielValidationDatetime;
  465. /**
  466. * @var \DateTime
  467. */
  468. #[ORM\Column(type: 'datetime', nullable: true)]
  469. #[Assert\Date]
  470. private $informationRetainedAndUsedDate;
  471. /**
  472. * @var \DateTime
  473. */
  474. #[ORM\Column(type: 'datetime', nullable: true)]
  475. #[Assert\Date]
  476. private $cguReadAndAcceptedDate;
  477. /**
  478. * @var array
  479. */
  480. #[ORM\Column(type: 'json_array', nullable: true)]
  481. #[Groups(['access', 'access_details', 'my_access_put', 'own_access'])]
  482. private $setting;
  483. /**
  484. * @var ArrayCollection<Donor>
  485. */
  486. #[Assert\Valid]
  487. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Donor\Donor', cascade: ['persist'], mappedBy: 'access', orphanRemoval: true)]
  488. #[Groups(['access'])]
  489. private $donors;
  490. /**
  491. * @var ArrayCollection<Donor>
  492. */
  493. #[Assert\Valid]
  494. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Donor\Donor', cascade: ['persist'], mappedBy: 'access', orphanRemoval: true, fetch: 'EXTRA_LAZY')]
  495. #[Groups(['access_details'])]
  496. #[ORM\OrderBy(['id' => 'DESC'])]
  497. private $donorsFiltered;
  498. /**
  499. * @var ArrayCollection<Medal>
  500. */
  501. #[Assert\Valid]
  502. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Person\Medal', cascade: ['persist'], mappedBy: 'access', orphanRemoval: true)]
  503. #[Groups(['access', 'accesses_list', 'student_list', 'guardians_list', 'teachers_list', 'adherent_list', 'personnels_list', 'ca_list', 'othercontact_list', 'board_list'])]
  504. private $medals;
  505. /**
  506. * @var ArrayCollection<Medal>
  507. */
  508. #[Assert\Valid]
  509. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Person\Medal', cascade: ['persist'], mappedBy: 'access', orphanRemoval: true, fetch: 'EXTRA_LAZY')]
  510. #[Groups(['access_details'])]
  511. #[ORM\OrderBy(['id' => 'DESC'])]
  512. private $medalsFiltered;
  513. /**
  514. * @var AccessSocial
  515. */
  516. #[Assert\Valid]
  517. #[ORM\OneToOne(targetEntity: 'AppBundle\Entity\AccessAndFunction\AccessSocial', mappedBy: 'access', cascade: ['persist'], orphanRemoval: true, fetch: 'EAGER')]
  518. #[Groups(['access', 'access_mass', 'teachers_list', 'access_details', 'accesses_list', 'student_list', 'guardians_list', 'teachers_list', 'adherent_list', 'personnels_list', 'ca_list', 'othercontact_list', 'board_list', 'fusion_accesses'])]
  519. private $accessSocial;
  520. /**
  521. * @var AccessNetworkSetting
  522. */
  523. #[Assert\Valid]
  524. #[ORM\OneToOne(targetEntity: 'AppBundle\Entity\AccessAndFunction\AccessNetworkSetting', mappedBy: 'access', cascade: ['persist', 'remove'], orphanRemoval: true, fetch: 'EAGER')]
  525. #[Groups(['access', 'accesscmfnetwork', 'access_details', 'student_list', 'guardians_list', 'teachers_list', 'adherent_list', 'personnels_list', 'ca_list', 'accesses_list', 'student_list', 'guardians_list', 'teachers_list', 'adherent_list', 'personnels_list', 'morals_list', 'othercontact_list', 'student_registration', 'board_list', 'own_access', 'access_informations_edit'])]
  526. private $accessNetworkSetting;
  527. /**
  528. * @var ArrayCollection<OrganizationResponsability>
  529. */
  530. #[Assert\Valid]
  531. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\AccessAndFunction\OrganizationResponsability', mappedBy: 'access', orphanRemoval: true, cascade: ['persist'])]
  532. #[Groups(['access_organizationresponsability', 'access_details'])]
  533. private $organizationResponsabilities;
  534. /**
  535. * @var string
  536. */
  537. #[Groups(['template', 'accesses_list', 'student_list', 'guardians_list', 'teachers_list', 'adherent_list', 'personnels_list', 'ca_list', 'othercontact_list', 'board_list', 'networkmanagers_list'])]
  538. protected $cmfLicenceTemplate;
  539. /**
  540. * @var int
  541. */
  542. #[Groups(['access', 'adherent_list', 'student_list', 'guardians_list', 'teachers_list', 'personnels_list', 'ca_list', 'board_list'])]
  543. private $seniority;
  544. /**
  545. * @var int
  546. */
  547. #[ORM\Column(type: 'integer', nullable: true)]
  548. #[Groups(['access'])]
  549. private $activityYear;
  550. /**
  551. * @var bool
  552. */
  553. #[ORM\Column(type: 'boolean', options: ['default' => false])]
  554. #[Assert\Type(type: 'boolean')]
  555. #[Assert\NotNull]
  556. #[Groups(['accesses_list', 'access_informations_edit', 'ca_list', 'student_list', 'guardians_list', 'teachers_list', 'adherent_list', 'personnels_list', 'othercontact_list', 'board_list'])]
  557. private $waitingForValidation = false;
  558. /**
  559. * @var int
  560. */
  561. #[ORM\Column(type: 'integer', nullable: true)]
  562. private $sharingPersonToRecover;
  563. /**
  564. * @var AccessCommunication
  565. */
  566. #[Assert\Valid]
  567. #[ORM\OneToOne(targetEntity: 'AppBundle\Entity\AccessAndFunction\AccessCommunication', mappedBy: 'access', cascade: ['persist'], orphanRemoval: true, fetch: 'EAGER')]
  568. #[Groups(['access_communication'])]
  569. private $accessCommunication;
  570. /**
  571. * @var ArrayCollection<AccessWish>
  572. */
  573. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\AccessWish\AccessWish', cascade: ['persist', 'remove'], mappedBy: 'accessOriginal', orphanRemoval: true, fetch: 'EAGER')]
  574. #[Groups(['access_accesswishes', 'online_registration_access_family'])]
  575. private $accessWishes;
  576. /**
  577. * @var bool
  578. */
  579. #[ORM\Column(type: 'boolean', options: ['default' => false])]
  580. #[Assert\Type(type: 'boolean')]
  581. #[Assert\NotNull]
  582. #[Groups(['access', 'access_informations_edit', 'student_registration', 'access_mass'])]
  583. private $approveRulesProcedure = false;
  584. /**
  585. * @var bool
  586. */
  587. #[ORM\Column(type: 'boolean', options: ['default' => false])]
  588. #[Assert\Type(type: 'boolean')]
  589. #[Assert\NotNull]
  590. #[Groups(['access', 'access_informations_edit', 'student_registration'])]
  591. private $receiveInformationsFromOrganization = false;
  592. /**
  593. * @var ArrayCollection<WorkByUser >
  594. */
  595. #[Assert\Valid]
  596. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Booking\WorkByUser', mappedBy: 'student', cascade: ['persist'], orphanRemoval: true)]
  597. #[Groups(['work'])]
  598. private $workByUsers;
  599. /**
  600. * @var CalendarSynchro
  601. */
  602. #[ORM\OneToOne(targetEntity: 'AppBundle\Entity\Booking\CalendarSynchro', mappedBy: 'access', cascade: ['persist'], orphanRemoval: true, fetch: 'EAGER')]
  603. #[Groups(['access_calendarsynchro'])]
  604. private $calendarSynchro;
  605. /**
  606. * @var ArrayCollection<Tag>
  607. */
  608. #[ORM\ManyToMany(targetEntity: 'AppBundle\Entity\Core\Tagg', cascade: ['persist'], inversedBy: 'accesses')]
  609. #[ORM\JoinTable(name: 'tag_access', joinColumns: [], inverseJoinColumns: [])]
  610. #[ORM\JoinColumn(name: 'access_id', referencedColumnName: 'id')]
  611. #[ORM\JoinColumn(name: 'tag_id', referencedColumnName: 'id')]
  612. #[Assert\Valid]
  613. #[Groups(['access_tags', 'manage_tags', 'student_list', 'access_informations_edit', 'guardians_list', 'teachers_list', 'adherent_list', 'personnels_list', 'board_list', 'ca_list', 'morals_list', 'othercontact_list', 'accesses_list', 'student_registration', 'education_student_next_year_access', 'accesses_no_reregistred_list', 'equipmentloan_list_borrower', 'equipmentrent_list_borrower', 'education_input_list_access', 'educationnotation_list_educationstudent', 'examenconvocation_list_student', 'access_intangible_list_access', 'billaccounting_list_billlines', 'billaccounting_list_bill', 'bill_list_billlines', 'billcredit_list_bill', 'education_student_wish_list_accesswishreregistrations', 'education_student_next_year_edit_access', 'payer_list_billingpayers', 'billpayment_list_bill', 'online_registration_validation_accessoriginal', 'payer_list', 'attendancebooking_list_access', 'attendance_list_access'])]
  614. private $tags;
  615. /**
  616. * @var EducationNotationConfig
  617. */
  618. #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Education\EducationNotationConfig', inversedBy: 'teachers')]
  619. #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
  620. #[Groups(['access', 'access_reference'])]
  621. private $educationNotationConfig;
  622. /**
  623. * @var Parameters
  624. */
  625. #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Organization\Parameters', inversedBy: 'publicationDirectors')]
  626. #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true)]
  627. private $publicationDirector;
  628. public function __construct()
  629. {
  630. $this->guardians = new ArrayCollection();
  631. $this->children = new ArrayCollection();
  632. $this->companyPersonAccesses = new ArrayCollection();
  633. $this->companyPersonCompany = new ArrayCollection();
  634. $this->educationStudent = new ArrayCollection();
  635. $this->educationTeachers = new ArrayCollection();
  636. $this->organizationFunction = new ArrayCollection();
  637. $this->personActivity = new ArrayCollection();
  638. $this->personActivityActive = new ArrayCollection();
  639. $this->holidays = new ArrayCollection();
  640. $this->courses = new ArrayCollection();
  641. $this->educationStudentByTeacher = new ArrayCollection();
  642. $this->billingPayers = new ArrayCollection();
  643. $this->billingReceivers = new ArrayCollection();
  644. $this->accessIntangibles = new ArrayCollection();
  645. $this->billingEducationalProjectPayers = new ArrayCollection();
  646. $this->bills = new ArrayCollection();
  647. $this->billLines = new ArrayCollection();
  648. $this->silentPartners = new ArrayCollection();
  649. $this->operationalPartners = new ArrayCollection();
  650. $this->eventUsers = new ArrayCollection();
  651. $this->examenConvocations = new ArrayCollection();
  652. $this->equipmentRepairProviders = new ArrayCollection();
  653. $this->roomRepairProviders = new ArrayCollection();
  654. $this->placeRepairProviders = new ArrayCollection();
  655. $this->documentAuthors = new ArrayCollection();
  656. $this->notifications = new ArrayCollection();
  657. $this->notificationUsers = new ArrayCollection();
  658. $this->messages = new ArrayCollection();
  659. $this->juryMembers = new ArrayCollection();
  660. $this->organizationContacts = new ArrayCollection();
  661. $this->organizationLicences = new ArrayCollection();
  662. $this->commissionMembers = new ArrayCollection();
  663. $this->equipmentSuppliers = new ArrayCollection();
  664. $this->equipmentControlManagers = new ArrayCollection();
  665. $this->equipmentEditors = new ArrayCollection();
  666. $this->equipmentLoans = new ArrayCollection();
  667. $this->accompanistControl = new ArrayCollection();
  668. $this->equipments= new ArrayCollection();
  669. $this->childrenContactReferences = new ArrayCollection();
  670. $this->accessFictionalIntangibles = new ArrayCollection();
  671. $this->personalizedLists = new ArrayCollection();
  672. $this->practicalCourses = new ArrayCollection();
  673. $this->attendances = new ArrayCollection();
  674. $this->attendanceBookings = new ArrayCollection();
  675. $this->attendanceBookingsFiltered = new ArrayCollection();
  676. $this->attendanceReplacements = new ArrayCollection();
  677. $this->donors= new ArrayCollection();
  678. $this->donorsFiltered= new ArrayCollection();
  679. $this->medals= new ArrayCollection();
  680. $this->medalsFiltered= new ArrayCollection();
  681. $this->organizationResponsabilities= new ArrayCollection();
  682. $this->coursesFiltered= new ArrayCollection();
  683. $this->tags= new ArrayCollection();
  684. }
  685. /**
  686. * Sets id.
  687. *
  688. * @param int $id
  689. *
  690. * @return $this
  691. */
  692. public function setId($id)
  693. {
  694. $this->id = $id;
  695. return $this;
  696. }
  697. /**
  698. * Gets id.
  699. *
  700. * @return int
  701. */
  702. public function getId()
  703. {
  704. return $this->id;
  705. }
  706. /**
  707. * Sets person.
  708. *
  709. * @param Person $person
  710. *
  711. * @return $this
  712. */
  713. public function setPerson(Person $person)
  714. {
  715. $this->person = $person;
  716. return $this;
  717. }
  718. /**
  719. * Gets person.
  720. *
  721. * @return Person
  722. */
  723. public function getPerson()
  724. {
  725. return $this->person;
  726. }
  727. /**
  728. * Sets organization.
  729. *
  730. * @param Organization $organization
  731. *
  732. * @return $this
  733. */
  734. public function setOrganization(Organization $organization)
  735. {
  736. $this->organization = $organization;
  737. return $this;
  738. }
  739. /**
  740. * Gets organization.
  741. *
  742. * @return Organization
  743. */
  744. public function getOrganization()
  745. {
  746. return $this->organization;
  747. }
  748. /**
  749. * Sets adminAccess.
  750. *
  751. * @param bool $adminAccess
  752. *
  753. * @return $this
  754. */
  755. public function setAdminAccess($adminAccess)
  756. {
  757. $this->adminAccess = $adminAccess;
  758. return $this;
  759. }
  760. /**
  761. * Gets adminAccess.
  762. *
  763. * @return bool
  764. */
  765. public function getAdminAccess()
  766. {
  767. return $this->adminAccess;
  768. }
  769. /**
  770. * add role.
  771. *
  772. * @param string $role
  773. *
  774. * @return $this
  775. */
  776. public function addRole($role)
  777. {
  778. $this->roles[] = $role;
  779. return $this;
  780. }
  781. /**
  782. * Sets roles.
  783. *
  784. * @param array $roles
  785. *
  786. * @return $this
  787. */
  788. public function setRoles(array $roles)
  789. {
  790. $this->roles = $roles;
  791. return $this;
  792. }
  793. /**
  794. * Gets roles.
  795. *
  796. * @return array
  797. */
  798. public function getRoles()
  799. {
  800. return $this->roles;
  801. }
  802. /**
  803. * Set personalized roles
  804. *
  805. * @param boolean $personalizedRoles
  806. *
  807. * @return Access
  808. */
  809. public function setPersonalizedRoles($personalizedRoles)
  810. {
  811. $this->personalizedRoles = $personalizedRoles;
  812. return $this;
  813. }
  814. /**
  815. * Get personalized roles
  816. *
  817. * @return boolean
  818. */
  819. public function getPersonalizedRoles()
  820. {
  821. return $this->personalizedRoles;
  822. }
  823. /**
  824. * Add course
  825. *
  826. * @param \AppBundle\Entity\Booking\Course $course
  827. *
  828. * @return Access
  829. */
  830. public function addCourse(\AppBundle\Entity\Booking\Course $course)
  831. {
  832. $this->courses[] = $course;
  833. return $this;
  834. }
  835. /**
  836. * Remove course
  837. *
  838. * @param \AppBundle\Entity\Booking\Course $course
  839. */
  840. public function removeCourse(\AppBundle\Entity\Booking\Course $course)
  841. {
  842. $course->removeStudent($this);
  843. $this->courses->removeElement($course);
  844. }
  845. /**
  846. * Get courses
  847. *
  848. * @return \Doctrine\Common\Collections\Collection
  849. */
  850. public function getCourses()
  851. {
  852. return $this->courses;
  853. }
  854. /**
  855. * Get educationStudentByTeacher
  856. *
  857. * @return \Doctrine\Common\Collections\Collection
  858. */
  859. public function getEducationStudentByTeacher()
  860. {
  861. return $this->educationStudentByTeacher;
  862. }
  863. /**
  864. * Add educationStudentByTeacher
  865. *
  866. * @param \AppBundle\Entity\Education\EducationStudent $educationStudentByTeacher
  867. *
  868. * @return Access
  869. */
  870. public function addEducationStudentByTeacher(\AppBundle\Entity\Education\EducationStudent $educationStudentByTeacher)
  871. {
  872. $this->educationStudentByTeacher[] = $educationStudentByTeacher;
  873. return $this;
  874. }
  875. /**
  876. * Remove educationStudentByTeacher
  877. *
  878. * @param \AppBundle\Entity\Education\EducationStudent $educationStudentByTeacher
  879. */
  880. public function removeEducationStudentByTeacher(\AppBundle\Entity\Education\EducationStudent $educationStudentByTeacher)
  881. {
  882. $this->educationStudentByTeacher->removeElement($educationStudentByTeacher);
  883. }
  884. /**
  885. * Add practical course
  886. *
  887. * @param \AppBundle\Entity\Booking\Course $course
  888. *
  889. * @return Access
  890. */
  891. public function addPracticalCourse(\AppBundle\Entity\Booking\Course $course)
  892. {
  893. $this->practicalCourses[] = $course;
  894. return $this;
  895. }
  896. /**
  897. * Remove practical course
  898. *
  899. * @param \AppBundle\Entity\Booking\Course $course
  900. */
  901. public function removePracticalCourse(\AppBundle\Entity\Booking\Course $course)
  902. {
  903. $course->removeStudent($this);
  904. $this->practicalCourses->removeElement($course);
  905. }
  906. /**
  907. * Get practical courses
  908. *
  909. * @return \Doctrine\Common\Collections\Collection
  910. */
  911. public function getPracticalCourses()
  912. {
  913. return $this->practicalCourses;
  914. }
  915. public function getBookingOrganizers()
  916. {
  917. return $this->bookingOrganizers;
  918. }
  919. public function removeBookingOrganizer(\AppBundle\Entity\Booking\AbstractBooking $booking)
  920. {
  921. $this->bookingOrganizers->removeElement($booking);
  922. }
  923. public function addBookingOrganizer(\AppBundle\Entity\Booking\AbstractBooking $booking)
  924. {
  925. $this->bookingOrganizers[] = $booking;
  926. return $this;
  927. }
  928. /**
  929. * Set accessBilling
  930. *
  931. * @param \AppBundle\Entity\Billing\AccessBilling $accessBilling
  932. *
  933. * @return Access
  934. */
  935. public function setAccessBilling(\AppBundle\Entity\Billing\AccessBilling $accessBilling = null)
  936. {
  937. if(!is_null($accessBilling)){
  938. $accessBilling->setAccess($this);
  939. }
  940. $this->accessBilling = $accessBilling;
  941. return $this;
  942. }
  943. /**
  944. * Get accessBilling
  945. *
  946. * @return \AppBundle\Entity\Billing\AccessBilling
  947. */
  948. public function getAccessBilling()
  949. {
  950. return $this->accessBilling;
  951. }
  952. /**
  953. * Add holiday
  954. *
  955. * @param \AppBundle\Entity\Booking\PersonHoliday $holiday
  956. *
  957. * @return Access
  958. */
  959. public function addHoliday(\AppBundle\Entity\Booking\PersonHoliday $holiday)
  960. {
  961. $this->holidays[] = $holiday;
  962. return $this;
  963. }
  964. /**
  965. * Remove holiday
  966. *
  967. * @param \AppBundle\Entity\Booking\PersonHoliday $holiday
  968. */
  969. public function removeHoliday(\AppBundle\Entity\Booking\PersonHoliday $holiday)
  970. {
  971. $this->holidays->removeElement($holiday);
  972. }
  973. /**
  974. * Get holidays
  975. *
  976. * @return \Doctrine\Common\Collections\Collection
  977. */
  978. public function getHolidays()
  979. {
  980. return $this->holidays;
  981. }
  982. /**
  983. * Set AccessFamily
  984. *
  985. * @param AccessFamily $accessFamily
  986. *
  987. * @return Access
  988. */
  989. public function setAccessFamily(AccessFamily $accessFamily = null)
  990. {
  991. $this->accessFamily = $accessFamily;
  992. return $this;
  993. }
  994. /**
  995. * Get AccessFamily
  996. *
  997. * @return AccessFamily
  998. */
  999. public function getAccessFamily()
  1000. {
  1001. return $this->accessFamily;
  1002. }
  1003. /**
  1004. * Get AccessFamily
  1005. *
  1006. * @return AccessFamily
  1007. */
  1008. public function getFamilyMembers()
  1009. {
  1010. $family = [];
  1011. $accesses = $this->accessFamily ? $this->accessFamily->getAccesses() : [];
  1012. foreach ($accesses as $access) {
  1013. $currentAccess = [];
  1014. // $scriptName = strpos($_SERVER['SCRIPT_NAME'], 'dev') ? '' : $_SERVER['SCRIPT_NAME'];
  1015. $currentAccess['access'] = "/api/accesses/".$access->getId();
  1016. $contactPoints = [];
  1017. foreach($access->getPerson()->getContactPoint() as $key => $contactPoint){
  1018. $contactPoints[$key]['contactType'] = $contactPoint->getContactType();
  1019. $contactPoints[$key]['email'] = $contactPoint->getEmail();
  1020. $contactPoints[$key]['telphone'] = $contactPoint->getTelphone();
  1021. $contactPoints[$key]['mobilPhone'] = $contactPoint->getMobilPhone();
  1022. }
  1023. $personAddressPostals = [];
  1024. foreach($access->getPerson()->getPersonAddressPostal() as $key => $personAddressPostal){
  1025. $personAddressPostals[$key]['type'] = $personAddressPostal->getType();
  1026. $personAddressPostals[$key]['addressPostal']['streetAddress'] = $personAddressPostal->getAddressPostal()->getStreetAddress();
  1027. $personAddressPostals[$key]['addressPostal']['postalCode'] = $personAddressPostal->getAddressPostal()->getPostalCode();
  1028. $personAddressPostals[$key]['addressPostal']['addressCity'] = $personAddressPostal->getAddressPostal()->getAddressCity();
  1029. }
  1030. $currentAccess['accessDetail'] = ['person' => ['contactPoint' => $contactPoints, 'personAddressPostal' => $personAddressPostals]];
  1031. $family[] = $currentAccess;
  1032. }
  1033. return $family;
  1034. }
  1035. /**
  1036. * @param CompanyPerson $companyPerson
  1037. * @return $this
  1038. */
  1039. public function addCompanyPersonAccess(CompanyPerson $companyPerson)
  1040. {
  1041. $companyPerson->setCompany($this);
  1042. $this->companyPersonAccesses[] = $companyPerson;
  1043. return $this;
  1044. }
  1045. /**
  1046. * Remove companyPersonAccess
  1047. *
  1048. * @param \AppBundle\Entity\Person\CompanyPerson $companyPersonAccess
  1049. */
  1050. public function removeCompanyPersonAccess(\AppBundle\Entity\Person\CompanyPerson $companyPersonAccess)
  1051. {
  1052. $this->companyPersonAccesses->removeElement($companyPersonAccess);
  1053. }
  1054. /**
  1055. * @param CompanyPerson $companyPerson
  1056. * @return $this
  1057. */
  1058. public function addCompanyPersonCompany(CompanyPerson $companyPerson)
  1059. {
  1060. $companyPerson->setAccess($this);
  1061. $this->companyPersonCompany[] = $companyPerson;
  1062. return $this;
  1063. }
  1064. /**
  1065. * Get companyPersonAccesses
  1066. *
  1067. * @return \Doctrine\Common\Collections\Collection
  1068. */
  1069. public function getCompanyPersonAccesses()
  1070. {
  1071. return $this->companyPersonAccesses;
  1072. }
  1073. /**
  1074. * @return ArrayCollection
  1075. */
  1076. public function getCompanyPersonCompany()
  1077. {
  1078. return $this->companyPersonCompany;
  1079. }
  1080. /**
  1081. * Remove companyPersonCompany
  1082. *
  1083. * @param \AppBundle\Entity\Person\CompanyPerson $companyPersonCompany
  1084. */
  1085. public function removeCompanyPersonCompany(\AppBundle\Entity\Person\CompanyPerson $companyPersonCompany)
  1086. {
  1087. $this->companyPersonCompany->removeElement($companyPersonCompany);
  1088. }
  1089. /**
  1090. * @param EducationStudent $educationStudent
  1091. * @return $this
  1092. */
  1093. public function addEducationStudent(EducationStudent $educationStudent)
  1094. {
  1095. $educationStudent->setAccess($this);
  1096. $this->educationStudent[] = $educationStudent;
  1097. return $this;
  1098. }
  1099. /**
  1100. * @return ArrayCollection
  1101. */
  1102. public function getEducationStudent()
  1103. {
  1104. return $this->educationStudent;
  1105. }
  1106. /**
  1107. * Remove educationStudent
  1108. *
  1109. * @param \AppBundle\Entity\Education\EducationStudent $educationStudent
  1110. */
  1111. public function removeEducationStudent(\AppBundle\Entity\Education\EducationStudent $educationStudent)
  1112. {
  1113. $this->educationStudent->removeElement($educationStudent);
  1114. }
  1115. /**
  1116. * @param OrganizationFunction $organizationFunction
  1117. * @return $this
  1118. */
  1119. public function addOrganizationFunction(OrganizationFunction $organizationFunction)
  1120. {
  1121. $organizationFunction->setAccess($this);
  1122. $this->organizationFunction[] = $organizationFunction;
  1123. return $this;
  1124. }
  1125. /**
  1126. * @return ArrayCollection
  1127. */
  1128. public function getOrganizationFunction()
  1129. {
  1130. return $this->organizationFunction;
  1131. }
  1132. /**
  1133. * Remove organizationFunction
  1134. *
  1135. * @param \AppBundle\Entity\AccessAndFunction\OrganizationFunction $organizationFunction
  1136. */
  1137. public function removeOrganizationFunction(\AppBundle\Entity\AccessAndFunction\OrganizationFunction $organizationFunction)
  1138. {
  1139. $this->organizationFunction->removeElement($organizationFunction);
  1140. }
  1141. /**
  1142. * @param PersonActivity $personActivity
  1143. * @return $this
  1144. */
  1145. public function addPersonActivity(PersonActivity $personActivity)
  1146. {
  1147. $personActivity->setAccess($this);
  1148. $this->personActivity[] = $personActivity;
  1149. return $this;
  1150. }
  1151. /**
  1152. * @return ArrayCollection
  1153. */
  1154. public function getPersonActivity()
  1155. {
  1156. return $this->personActivity;
  1157. }
  1158. /**
  1159. * @return ArrayCollection
  1160. */
  1161. public function getPersonActivityActive()
  1162. {
  1163. $filtered = array_filter($this->personActivityActive->toArray(), function($personActivityActive) {
  1164. return new \DateTime($personActivityActive->getStartDate()) <= new \DateTime() && new \DateTime($personActivityActive->getEndDate()) >= new \DateTime();
  1165. });
  1166. $filteredArray = new ArrayCollection(array_values($filtered));
  1167. return $filteredArray;
  1168. }
  1169. /**
  1170. * Remove personActivity
  1171. *
  1172. * @param \AppBundle\Entity\Person\PersonActivity $personActivity
  1173. */
  1174. public function removePersonActivity(\AppBundle\Entity\Person\PersonActivity $personActivity)
  1175. {
  1176. $this->personActivity->removeElement($personActivity);
  1177. }
  1178. /**
  1179. * Add billingReceiver
  1180. *
  1181. * @param \AppBundle\Entity\Billing\AccessPayer $billingReceiver
  1182. *
  1183. * @return Access
  1184. */
  1185. public function addBillingReceiver(\AppBundle\Entity\Billing\AccessPayer $billingReceiver)
  1186. {
  1187. $billingReceiver->setAccessReceiver($this);
  1188. $this->billingReceivers[] = $billingReceiver;
  1189. return $this;
  1190. }
  1191. /**
  1192. * Remove billingReceiver
  1193. *
  1194. * @param \AppBundle\Entity\Billing\AccessPayer $billingReceiver
  1195. */
  1196. public function removeBillingReceiver(\AppBundle\Entity\Billing\AccessPayer $billingReceiver)
  1197. {
  1198. $this->billingReceivers->removeElement($billingReceiver);
  1199. }
  1200. /**
  1201. * Get billingReceivers
  1202. *
  1203. * @return \Doctrine\Common\Collections\Collection
  1204. */
  1205. public function getBillingReceivers()
  1206. {
  1207. return $this->billingReceivers;
  1208. }
  1209. /**
  1210. * Add billingPayer
  1211. *
  1212. * @param \AppBundle\Entity\Billing\AccessPayer $billingPayer
  1213. *
  1214. * @return Access
  1215. */
  1216. public function addBillingPayer(\AppBundle\Entity\Billing\AccessPayer $billingPayer)
  1217. {
  1218. $billingPayer->setAccessPayer($this);
  1219. $this->billingPayers[] = $billingPayer;
  1220. return $this;
  1221. }
  1222. /**
  1223. * Remove billingPayer
  1224. *
  1225. * @param \AppBundle\Entity\Billing\AccessPayer $billingPayer
  1226. */
  1227. public function removeBillingPayer(\AppBundle\Entity\Billing\AccessPayer $billingPayer)
  1228. {
  1229. $this->billingPayers->removeElement($billingPayer);
  1230. }
  1231. /**
  1232. * Get billingPayers
  1233. *
  1234. * @return \Doctrine\Common\Collections\Collection
  1235. */
  1236. public function getBillingPayers()
  1237. {
  1238. return $this->billingPayers;
  1239. }
  1240. /**
  1241. * Add accessIntangible
  1242. *
  1243. * @param \AppBundle\Entity\Billing\AccessIntangible $accessIntangible
  1244. *
  1245. * @return Access
  1246. */
  1247. public function addAccessIntangible(\AppBundle\Entity\Billing\AccessIntangible $accessIntangible)
  1248. {
  1249. $accessIntangible->setAccess($this);
  1250. $this->accessIntangibles[] = $accessIntangible;
  1251. return $this;
  1252. }
  1253. /**
  1254. * Remove accessIntangible
  1255. *
  1256. * @param \AppBundle\Entity\Billing\AccessIntangible $accessIntangible
  1257. */
  1258. public function removeAccessIntangible(\AppBundle\Entity\Billing\AccessIntangible $accessIntangible)
  1259. {
  1260. $this->accessIntangibles->removeElement($accessIntangible);
  1261. }
  1262. /**
  1263. * Get accessIntangibles
  1264. *
  1265. * @return \Doctrine\Common\Collections\Collection
  1266. */
  1267. public function getAccessIntangibles()
  1268. {
  1269. return $this->accessIntangibles;
  1270. }
  1271. /**
  1272. * Add billingEducationalProjectPayer
  1273. *
  1274. * @param \AppBundle\Entity\Billing\EducationalProjectPayer $billingEducationalProjectPayer
  1275. *
  1276. * @return Access
  1277. */
  1278. public function addBillingEducationalProjectPayer(\AppBundle\Entity\Billing\EducationalProjectPayer $billingEducationalProjectPayer)
  1279. {
  1280. $this->billingEducationalProjectPayers[] = $billingEducationalProjectPayer;
  1281. return $this;
  1282. }
  1283. /**
  1284. * Remove billingEducationalProjectPayer
  1285. *
  1286. * @param \AppBundle\Entity\Billing\EducationalProjectPayer $billingEducationalProjectPayer
  1287. */
  1288. public function removeBillingEducationalProjectPayer(\AppBundle\Entity\Billing\EducationalProjectPayer $billingEducationalProjectPayer)
  1289. {
  1290. $this->billingEducationalProjectPayers->removeElement($billingEducationalProjectPayer);
  1291. }
  1292. /**
  1293. * Get billingEducationalProjectPayers
  1294. *
  1295. * @return \Doctrine\Common\Collections\Collection
  1296. */
  1297. public function getBillingEducationalProjectPayers()
  1298. {
  1299. return $this->billingEducationalProjectPayers;
  1300. }
  1301. /**
  1302. * Add bill
  1303. *
  1304. * @param \AppBundle\Entity\Billing\Bill $bill
  1305. *
  1306. * @return Access
  1307. */
  1308. public function addBill(\AppBundle\Entity\Billing\Bill $bill)
  1309. {
  1310. $this->bills[] = $bill;
  1311. return $this;
  1312. }
  1313. /**
  1314. * Remove bill
  1315. *
  1316. * @param \AppBundle\Entity\Billing\Bill $bill
  1317. */
  1318. public function removeBill(\AppBundle\Entity\Billing\Bill $bill)
  1319. {
  1320. $this->bills->removeElement($bill);
  1321. }
  1322. /**
  1323. * Get bills
  1324. *
  1325. * @return \Doctrine\Common\Collections\Collection
  1326. */
  1327. public function getBills()
  1328. {
  1329. return $this->bills;
  1330. }
  1331. /**
  1332. * Add billLine
  1333. *
  1334. * @param \AppBundle\Entity\Billing\BillLine $billLine
  1335. *
  1336. * @return Access
  1337. */
  1338. public function addBillLine(\AppBundle\Entity\Billing\BillLine $billLine)
  1339. {
  1340. $this->billLines[] = $billLine;
  1341. return $this;
  1342. }
  1343. /**
  1344. * Remove billLine
  1345. *
  1346. * @param \AppBundle\Entity\Billing\BillLine $billLine
  1347. */
  1348. public function removeBillLine(\AppBundle\Entity\Billing\BillLine $billLine)
  1349. {
  1350. $this->billLines->removeElement($billLine);
  1351. }
  1352. /**
  1353. * Get billLines
  1354. *
  1355. * @return \Doctrine\Common\Collections\Collection
  1356. */
  1357. public function getBillLines()
  1358. {
  1359. return $this->billLines;
  1360. }
  1361. /**
  1362. * Add silentPartner
  1363. *
  1364. * @param \AppBundle\Entity\Booking\EducationalProject $silentPartner
  1365. *
  1366. * @return Access
  1367. */
  1368. public function addSilentPartner(\AppBundle\Entity\Booking\EducationalProject $silentPartner)
  1369. {
  1370. $this->silentPartners[] = $silentPartner;
  1371. return $this;
  1372. }
  1373. /**
  1374. * Remove silentPartner
  1375. *
  1376. * @param \AppBundle\Entity\Booking\EducationalProject $silentPartner
  1377. */
  1378. public function removeSilentPartner(\AppBundle\Entity\Booking\EducationalProject $silentPartner)
  1379. {
  1380. $this->silentPartners->removeElement($silentPartner);
  1381. }
  1382. /**
  1383. * Get silentPartners
  1384. *
  1385. * @return \Doctrine\Common\Collections\Collection
  1386. */
  1387. public function getSilentPartners()
  1388. {
  1389. return $this->silentPartners;
  1390. }
  1391. /**
  1392. * Add operationalPartner
  1393. *
  1394. * @param \AppBundle\Entity\Booking\EducationalProject $operationalPartner
  1395. *
  1396. * @return Access
  1397. */
  1398. public function addOperationalPartner(\AppBundle\Entity\Booking\EducationalProject $operationalPartner)
  1399. {
  1400. $this->operationalPartners[] = $operationalPartner;
  1401. return $this;
  1402. }
  1403. /**
  1404. * Remove operationalPartner
  1405. *
  1406. * @param \AppBundle\Entity\Booking\EducationalProject $operationalPartner
  1407. */
  1408. public function removeOperationalPartner(\AppBundle\Entity\Booking\EducationalProject $operationalPartner)
  1409. {
  1410. $this->operationalPartners->removeElement($operationalPartner);
  1411. }
  1412. /**
  1413. * Get operationalPartners
  1414. *
  1415. * @return \Doctrine\Common\Collections\Collection
  1416. */
  1417. public function getOperationalPartners()
  1418. {
  1419. return $this->operationalPartners;
  1420. }
  1421. /**
  1422. * Add eventUser
  1423. *
  1424. * @param \AppBundle\Entity\Booking\EventUser $eventUser
  1425. *
  1426. * @return Access
  1427. */
  1428. public function addEventUser(\AppBundle\Entity\Booking\EventUser $eventUser)
  1429. {
  1430. $this->eventUsers[] = $eventUser;
  1431. return $this;
  1432. }
  1433. /**
  1434. * Remove eventUser
  1435. *
  1436. * @param \AppBundle\Entity\Booking\EventUser $eventUser
  1437. */
  1438. public function removeEventUser(\AppBundle\Entity\Booking\EventUser $eventUser)
  1439. {
  1440. $this->eventUsers->removeElement($eventUser);
  1441. }
  1442. /**
  1443. * Get eventUsers
  1444. *
  1445. * @return \Doctrine\Common\Collections\Collection
  1446. */
  1447. public function getEventUsers()
  1448. {
  1449. return $this->eventUsers;
  1450. }
  1451. /**
  1452. * Add examenConvocation
  1453. *
  1454. * @param \AppBundle\Entity\Booking\ExamenConvocation $examenConvocation
  1455. *
  1456. * @return Access
  1457. */
  1458. public function addExamenConvocation(\AppBundle\Entity\Booking\ExamenConvocation $examenConvocation)
  1459. {
  1460. $this->examenConvocations[] = $examenConvocation;
  1461. return $this;
  1462. }
  1463. /**
  1464. * Remove examenConvocation
  1465. *
  1466. * @param \AppBundle\Entity\Booking\ExamenConvocation $examenConvocation
  1467. */
  1468. public function removeExamenConvocation(\AppBundle\Entity\Booking\ExamenConvocation $examenConvocation)
  1469. {
  1470. $this->examenConvocations->removeElement($examenConvocation);
  1471. }
  1472. /**
  1473. * Get examenConvocations
  1474. *
  1475. * @return \Doctrine\Common\Collections\Collection
  1476. */
  1477. public function getExamenConvocations()
  1478. {
  1479. return $this->examenConvocations;
  1480. }
  1481. /**
  1482. * Add educationTeacher
  1483. *
  1484. * @param \AppBundle\Entity\Education\EducationTeacher $educationTeacher
  1485. *
  1486. * @return Access
  1487. */
  1488. public function addEducationTeacher(\AppBundle\Entity\Education\EducationTeacher $educationTeacher)
  1489. {
  1490. $this->educationTeachers[] = $educationTeacher;
  1491. return $this;
  1492. }
  1493. /**
  1494. * Remove educationTeacher
  1495. *
  1496. * @param \AppBundle\Entity\Education\EducationTeacher $educationTeacher
  1497. */
  1498. public function removeEducationTeacher(\AppBundle\Entity\Education\EducationTeacher $educationTeacher)
  1499. {
  1500. $this->educationTeachers->removeElement($educationTeacher);
  1501. }
  1502. /**
  1503. * Get educationTeachers
  1504. *
  1505. * @return \Doctrine\Common\Collections\Collection
  1506. */
  1507. public function getEducationTeachers()
  1508. {
  1509. return $this->educationTeachers;
  1510. }
  1511. /**
  1512. * Add equipmentRepairProvider
  1513. *
  1514. * @param \AppBundle\Entity\Product\EquipmentRepair $equipmentRepairProvider
  1515. *
  1516. * @return Access
  1517. */
  1518. public function addEquipmentRepairProvider(\AppBundle\Entity\Product\EquipmentRepair $equipmentRepairProvider)
  1519. {
  1520. $this->equipmentRepairProviders[] = $equipmentRepairProvider;
  1521. return $this;
  1522. }
  1523. /**
  1524. * Remove equipmentRepairProvider
  1525. *
  1526. * @param \AppBundle\Entity\Product\EquipmentRepair $equipmentRepairProvider
  1527. */
  1528. public function removeEquipmentRepairProvider(\AppBundle\Entity\Product\EquipmentRepair $equipmentRepairProvider)
  1529. {
  1530. $this->equipmentRepairProviders->removeElement($equipmentRepairProvider);
  1531. }
  1532. /**
  1533. * Get equipmentRepairProviders
  1534. *
  1535. * @return \Doctrine\Common\Collections\Collection
  1536. */
  1537. public function getEquipmentRepairProviders()
  1538. {
  1539. return $this->equipmentRepairProviders;
  1540. }
  1541. /**
  1542. * Add roomRepairProvider
  1543. *
  1544. * @param \AppBundle\Entity\Place\RoomRepair $roomRepairProvider
  1545. *
  1546. * @return Access
  1547. */
  1548. public function addRoomRepairProvider(\AppBundle\Entity\Place\RoomRepair $roomRepairProvider)
  1549. {
  1550. $this->roomRepairProviders[] = $roomRepairProvider;
  1551. return $this;
  1552. }
  1553. /**
  1554. * Remove roomRepairProvider
  1555. *
  1556. * @param \AppBundle\Entity\Place\RoomRepair $roomRepairProvider
  1557. */
  1558. public function removeRoomRepairProvider(\AppBundle\Entity\Place\RoomRepair $roomRepairProvider)
  1559. {
  1560. $this->roomRepairProviders->removeElement($roomRepairProvider);
  1561. }
  1562. /**
  1563. * Get roomRepairProviders
  1564. *
  1565. * @return \Doctrine\Common\Collections\Collection
  1566. */
  1567. public function getRoomRepairProviders()
  1568. {
  1569. return $this->roomRepairProviders;
  1570. }
  1571. /**
  1572. * Add placeRepairProvider
  1573. *
  1574. * @param \AppBundle\Entity\Place\PlaceRepair $placeRepairProvider
  1575. *
  1576. * @return Access
  1577. */
  1578. public function addPlaceRepairProvider(\AppBundle\Entity\Place\PlaceRepair $placeRepairProvider)
  1579. {
  1580. $this->placeRepairProviders[] = $placeRepairProvider;
  1581. return $this;
  1582. }
  1583. /**
  1584. * Remove placeRepairProvider
  1585. *
  1586. * @param \AppBundle\Entity\Place\PlaceRepair $placeRepairProvider
  1587. */
  1588. public function removePlaceRepairProvider(\AppBundle\Entity\Place\PlaceRepair $placeRepairProvider)
  1589. {
  1590. $this->placeRepairProviders->removeElement($placeRepairProvider);
  1591. }
  1592. /**
  1593. * Get placeRepairProviders
  1594. *
  1595. * @return \Doctrine\Common\Collections\Collection
  1596. */
  1597. public function getPlaceRepairProviders()
  1598. {
  1599. return $this->placeRepairProviders;
  1600. }
  1601. /**
  1602. * Add documentAuthor
  1603. *
  1604. * @param \AppBundle\Entity\Core\Document $documentAuthor
  1605. *
  1606. * @return Access
  1607. */
  1608. public function addDocumentAuthor(\AppBundle\Entity\Core\Document $documentAuthor)
  1609. {
  1610. $this->documentAuthors[] = $documentAuthor;
  1611. return $this;
  1612. }
  1613. /**
  1614. * Remove documentAuthor
  1615. *
  1616. * @param \AppBundle\Entity\Core\Document $documentAuthor
  1617. */
  1618. public function removeDocumentAuthor(\AppBundle\Entity\Core\Document $documentAuthor)
  1619. {
  1620. $this->documentAuthors->removeElement($documentAuthor);
  1621. }
  1622. /**
  1623. * Get documentAuthors
  1624. *
  1625. * @return \Doctrine\Common\Collections\Collection
  1626. */
  1627. public function getDocumentAuthors()
  1628. {
  1629. return $this->documentAuthors;
  1630. }
  1631. /**
  1632. * Add notification
  1633. *
  1634. * @param \AppBundle\Entity\Core\Notification $notification
  1635. *
  1636. * @return Access
  1637. */
  1638. public function addNotification(\AppBundle\Entity\Core\Notification $notification)
  1639. {
  1640. $this->notifications[] = $notification;
  1641. return $this;
  1642. }
  1643. /**
  1644. * Remove notification
  1645. *
  1646. * @param \AppBundle\Entity\Core\Notification $notification
  1647. */
  1648. public function removeNotification(\AppBundle\Entity\Core\Notification $notification)
  1649. {
  1650. $this->notifications->removeElement($notification);
  1651. }
  1652. /**
  1653. * Get notifications
  1654. *
  1655. * @return \Doctrine\Common\Collections\Collection
  1656. */
  1657. public function getNotifications()
  1658. {
  1659. return $this->notifications;
  1660. }
  1661. /**
  1662. * Add notificationUser
  1663. *
  1664. * @param \AppBundle\Entity\Core\NotificationUser $notificationUser
  1665. *
  1666. * @return Access
  1667. */
  1668. public function addNotificationUser(\AppBundle\Entity\Core\NotificationUser $notificationUser)
  1669. {
  1670. $this->notificationUsers[] = $notificationUser;
  1671. return $this;
  1672. }
  1673. /**
  1674. * Remove notificationUser
  1675. *
  1676. * @param \AppBundle\Entity\Core\NotificationUser $notificationUser
  1677. */
  1678. public function removeNotificationUser(\AppBundle\Entity\Core\NotificationUser $notificationUser)
  1679. {
  1680. $this->notificationUsers->removeElement($notificationUser);
  1681. }
  1682. /**
  1683. * Get notificationUsers
  1684. *
  1685. * @return \Doctrine\Common\Collections\Collection
  1686. */
  1687. public function getNotificationUsers()
  1688. {
  1689. return $this->notificationUsers;
  1690. }
  1691. /**
  1692. * Add message
  1693. *
  1694. * @param \AppBundle\Entity\Message\Message $message
  1695. *
  1696. * @return Access
  1697. */
  1698. public function addMessage(\AppBundle\Entity\Message\Message $message)
  1699. {
  1700. $this->messages[] = $message;
  1701. return $this;
  1702. }
  1703. /**
  1704. * Remove message
  1705. *
  1706. * @param \AppBundle\Entity\Message\Message $message
  1707. */
  1708. public function removeMessage(\AppBundle\Entity\Message\Message $message)
  1709. {
  1710. $this->messages->removeElement($message);
  1711. }
  1712. /**
  1713. * Get messages
  1714. *
  1715. * @return \Doctrine\Common\Collections\Collection
  1716. */
  1717. public function getMessages()
  1718. {
  1719. return $this->messages;
  1720. }
  1721. /**
  1722. * Add juryMember
  1723. *
  1724. * @param \AppBundle\Entity\Organization\Jury $juryMember
  1725. *
  1726. * @return Access
  1727. */
  1728. public function addJuryMember(\AppBundle\Entity\Organization\Jury $juryMember)
  1729. {
  1730. $this->juryMembers[] = $juryMember;
  1731. return $this;
  1732. }
  1733. /**
  1734. * Remove juryMember
  1735. *
  1736. * @param \AppBundle\Entity\Organization\Jury $juryMember
  1737. */
  1738. public function removeJuryMember(\AppBundle\Entity\Organization\Jury $juryMember)
  1739. {
  1740. $this->juryMembers->removeElement($juryMember);
  1741. }
  1742. /**
  1743. * Get juryMembers
  1744. *
  1745. * @return \Doctrine\Common\Collections\Collection
  1746. */
  1747. public function getJuryMembers()
  1748. {
  1749. return $this->juryMembers;
  1750. }
  1751. /**
  1752. * Add organizationContact
  1753. *
  1754. * @param \AppBundle\Entity\Organization\Organization $organizationContact
  1755. *
  1756. * @return Access
  1757. */
  1758. public function addOrganizationContact(\AppBundle\Entity\Organization\Organization $organizationContact)
  1759. {
  1760. $this->organizationContacts[] = $organizationContact;
  1761. return $this;
  1762. }
  1763. /**
  1764. * Remove organizationContact
  1765. *
  1766. * @param \AppBundle\Entity\Organization\Organization $organizationContact
  1767. */
  1768. public function removeOrganizationContact(\AppBundle\Entity\Organization\Organization $organizationContact)
  1769. {
  1770. $this->organizationContacts->removeElement($organizationContact);
  1771. }
  1772. /**
  1773. * Get organizationContacts
  1774. *
  1775. * @return \Doctrine\Common\Collections\Collection
  1776. */
  1777. public function getOrganizationContacts()
  1778. {
  1779. return $this->organizationContacts;
  1780. }
  1781. /**
  1782. * Add organizationLicence
  1783. *
  1784. * @param \AppBundle\Entity\Organization\OrganizationLicence $organizationLicence
  1785. *
  1786. * @return Access
  1787. */
  1788. public function addOrganizationLicence(\AppBundle\Entity\Organization\OrganizationLicence $organizationLicence)
  1789. {
  1790. $this->organizationLicences[] = $organizationLicence;
  1791. return $this;
  1792. }
  1793. /**
  1794. * Remove organizationLicence
  1795. *
  1796. * @param \AppBundle\Entity\Organization\OrganizationLicence $organizationLicence
  1797. */
  1798. public function removeOrganizationLicence(\AppBundle\Entity\Organization\OrganizationLicence $organizationLicence)
  1799. {
  1800. $this->organizationLicences->removeElement($organizationLicence);
  1801. }
  1802. /**
  1803. * Get organizationLicences
  1804. *
  1805. * @return \Doctrine\Common\Collections\Collection
  1806. */
  1807. public function getOrganizationLicences()
  1808. {
  1809. return $this->organizationLicences;
  1810. }
  1811. /**
  1812. * Add commissionMember
  1813. *
  1814. * @param \AppBundle\Entity\Person\CommissionMember $commissionMember
  1815. *
  1816. * @return Access
  1817. */
  1818. public function addCommissionMember(\AppBundle\Entity\Person\CommissionMember $commissionMember)
  1819. {
  1820. $this->commissionMembers[] = $commissionMember;
  1821. return $this;
  1822. }
  1823. /**
  1824. * Remove commissionMember
  1825. *
  1826. * @param \AppBundle\Entity\Person\CommissionMember $commissionMember
  1827. */
  1828. public function removeCommissionMember(\AppBundle\Entity\Person\CommissionMember $commissionMember)
  1829. {
  1830. $this->commissionMembers->removeElement($commissionMember);
  1831. }
  1832. /**
  1833. * Get commissionMembers
  1834. *
  1835. * @return \Doctrine\Common\Collections\Collection
  1836. */
  1837. public function getCommissionMembers()
  1838. {
  1839. return $this->commissionMembers;
  1840. }
  1841. /**
  1842. * Add equipmentSupplier
  1843. *
  1844. * @param \AppBundle\Entity\Product\Equipment $equipmentSupplier
  1845. *
  1846. * @return Access
  1847. */
  1848. public function addEquipmentSupplier(\AppBundle\Entity\Product\Equipment $equipmentSupplier)
  1849. {
  1850. $this->equipmentSuppliers[] = $equipmentSupplier;
  1851. return $this;
  1852. }
  1853. /**
  1854. * Remove equipmentSupplier
  1855. *
  1856. * @param \AppBundle\Entity\Product\Equipment $equipmentSupplier
  1857. */
  1858. public function removeEquipmentSupplier(\AppBundle\Entity\Product\Equipment $equipmentSupplier)
  1859. {
  1860. $this->equipmentSuppliers->removeElement($equipmentSupplier);
  1861. }
  1862. /**
  1863. * Get equipmentSuppliers
  1864. *
  1865. * @return \Doctrine\Common\Collections\Collection
  1866. */
  1867. public function getEquipmentSuppliers()
  1868. {
  1869. return $this->equipmentSuppliers;
  1870. }
  1871. /**
  1872. * Add equipmentControlManager
  1873. *
  1874. * @param \AppBundle\Entity\Product\Equipment $equipmentControlManager
  1875. *
  1876. * @return Access
  1877. */
  1878. public function addEquipmentControlManager(\AppBundle\Entity\Product\Equipment $equipmentControlManager)
  1879. {
  1880. $this->equipmentControlManagers[] = $equipmentControlManager;
  1881. return $this;
  1882. }
  1883. /**
  1884. * Remove equipmentControlManager
  1885. *
  1886. * @param \AppBundle\Entity\Product\Equipment $equipmentControlManager
  1887. */
  1888. public function removeEquipmentControlManager(\AppBundle\Entity\Product\Equipment $equipmentControlManager)
  1889. {
  1890. $this->equipmentControlManagers->removeElement($equipmentControlManager);
  1891. }
  1892. /**
  1893. * Get equipmentControlManagers
  1894. *
  1895. * @return \Doctrine\Common\Collections\Collection
  1896. */
  1897. public function getEquipmentControlManagers()
  1898. {
  1899. return $this->equipmentControlManagers;
  1900. }
  1901. /**
  1902. * Add equipmentEditor
  1903. *
  1904. * @param \AppBundle\Entity\Product\Equipment $equipmentEditor
  1905. *
  1906. * @return Access
  1907. */
  1908. public function addEquipmentEditor(\AppBundle\Entity\Product\Equipment $equipmentEditor)
  1909. {
  1910. $this->equipmentEditors[] = $equipmentEditor;
  1911. return $this;
  1912. }
  1913. /**
  1914. * Remove equipmentEditor
  1915. *
  1916. * @param \AppBundle\Entity\Product\Equipment $equipmentEditor
  1917. */
  1918. public function removeEquipmentEditor(\AppBundle\Entity\Product\Equipment $equipmentEditor)
  1919. {
  1920. $this->equipmentEditors->removeElement($equipmentEditor);
  1921. }
  1922. /**
  1923. * Get equipmentEditors
  1924. *
  1925. * @return \Doctrine\Common\Collections\Collection
  1926. */
  1927. public function getEquipmentEditors()
  1928. {
  1929. return $this->equipmentEditors;
  1930. }
  1931. /**
  1932. * Add equipmentLoan
  1933. *
  1934. * @param \AppBundle\Entity\Product\EquipmentLoan $equipmentLoan
  1935. *
  1936. * @return Access
  1937. */
  1938. public function addEquipmentLoan(\AppBundle\Entity\Product\EquipmentLoan $equipmentLoan)
  1939. {
  1940. $equipmentLoan->setBorrower($this);
  1941. $this->equipmentLoans[] = $equipmentLoan;
  1942. return $this;
  1943. }
  1944. /**
  1945. * Remove equipmentLoan
  1946. *
  1947. * @param \AppBundle\Entity\Product\EquipmentLoan $equipmentLoan
  1948. */
  1949. public function removeEquipmentLoan(\AppBundle\Entity\Product\EquipmentLoan $equipmentLoan)
  1950. {
  1951. $this->equipmentLoans->removeElement($equipmentLoan);
  1952. }
  1953. /**
  1954. * Get equipmentLoans
  1955. *
  1956. * @return \Doctrine\Common\Collections\Collection
  1957. */
  1958. public function getEquipmentLoans()
  1959. {
  1960. return $this->equipmentLoans;
  1961. }
  1962. /**
  1963. * Add accompanistControl
  1964. *
  1965. * @param \AppBundle\Entity\Core\AbstractControl $accompanistControl
  1966. *
  1967. * @return Access
  1968. */
  1969. public function addAccompanistControl(\AppBundle\Entity\Core\AbstractControl $accompanistControl)
  1970. {
  1971. $this->accompanistControl[] = $accompanistControl;
  1972. return $this;
  1973. }
  1974. /**
  1975. * Remove equipmentLoan
  1976. *
  1977. * @param \AppBundle\Entity\Core\AbstractControl $accompanistControl
  1978. */
  1979. public function removeAccompanistControl(\AppBundle\Entity\Core\AbstractControl $accompanistControl)
  1980. {
  1981. $this->accompanistControl->removeElement($accompanistControl);
  1982. }
  1983. /**
  1984. * Get accompanistControl
  1985. *
  1986. * @return \Doctrine\Common\Collections\Collection
  1987. */
  1988. public function getAccompanistControl()
  1989. {
  1990. return $this->accompanistControl;
  1991. }
  1992. /**
  1993. * Add equipment
  1994. *
  1995. * @param \AppBundle\Entity\Product\Equipment $equipment
  1996. *
  1997. * @return Person
  1998. */
  1999. public function addEquipment(\AppBundle\Entity\Product\Equipment $equipment)
  2000. {
  2001. $equipment->setAccess($this);
  2002. $this->equipments[] = $equipment;
  2003. return $this;
  2004. }
  2005. /**
  2006. * Remove equipment
  2007. *
  2008. * @param \AppBundle\Entity\Product\Equipment $equipment
  2009. */
  2010. public function removeEquipment(\AppBundle\Entity\Product\Equipment $equipment)
  2011. {
  2012. $this->equipments->removeElement($equipment);
  2013. }
  2014. /**
  2015. * Get equipments
  2016. *
  2017. * @return \Doctrine\Common\Collections\Collection
  2018. */
  2019. public function getEquipments()
  2020. {
  2021. return $this->equipments;
  2022. }
  2023. /**
  2024. * Add guardian
  2025. *
  2026. * @param \AppBundle\Entity\AccessAndFunction\Access $guardian
  2027. *
  2028. * @return Access
  2029. */
  2030. public function addGuardian(\AppBundle\Entity\AccessAndFunction\Access $guardian)
  2031. {
  2032. if(!empty($this->getId()) && $this->getId() === $guardian->getId())
  2033. return $this;
  2034. $guardian->addChild($this);
  2035. $this->guardians[] = $guardian;
  2036. return $this;
  2037. }
  2038. /**
  2039. * Remove guardian
  2040. *
  2041. * @param \AppBundle\Entity\AccessAndFunction\Access $guardian
  2042. */
  2043. public function removeGuardian(\AppBundle\Entity\AccessAndFunction\Access $guardian)
  2044. {
  2045. $guardian->removeChild($this);
  2046. $this->guardians->removeElement($guardian);
  2047. }
  2048. /**
  2049. * Get guardians
  2050. *
  2051. * @return \Doctrine\Common\Collections\Collection
  2052. */
  2053. public function getGuardians()
  2054. {
  2055. return $this->guardians;
  2056. }
  2057. /**
  2058. * Add child
  2059. *
  2060. * @param \AppBundle\Entity\AccessAndFunction\Access $child
  2061. *
  2062. * @return Access
  2063. */
  2064. public function addChild(\AppBundle\Entity\AccessAndFunction\Access $child)
  2065. {
  2066. if(!empty($this->getId()) && $this->getId() === $child->getId())
  2067. return $this;
  2068. $this->children[] = $child;
  2069. return $this;
  2070. }
  2071. /**
  2072. * Remove child
  2073. *
  2074. * @param \AppBundle\Entity\AccessAndFunction\Access $child
  2075. */
  2076. public function removeChild(\AppBundle\Entity\AccessAndFunction\Access $child)
  2077. {
  2078. $this->children->removeElement($child);
  2079. }
  2080. /**
  2081. * Get children
  2082. *
  2083. * @return \Doctrine\Common\Collections\Collection
  2084. */
  2085. public function getChildren()
  2086. {
  2087. return $this->children;
  2088. }
  2089. /**
  2090. * Sets note.
  2091. *
  2092. * @param string $note
  2093. *
  2094. * @return $this
  2095. */
  2096. public function setNote($note)
  2097. {
  2098. $this->note = $note;
  2099. return $this;
  2100. }
  2101. /**
  2102. * Gets note.
  2103. *
  2104. * @return string
  2105. */
  2106. public function getNote()
  2107. {
  2108. return $this->note;
  2109. }
  2110. /**
  2111. * Add accessFictionalIntangible
  2112. *
  2113. * @param \AppBundle\Entity\Billing\AccessFictionalIntangible $accessFictionalIntangible
  2114. *
  2115. * @return Access
  2116. */
  2117. public function addAccessFictionalIntangible(\AppBundle\Entity\Billing\AccessFictionalIntangible $accessFictionalIntangible)
  2118. {
  2119. $this->accessFictionalIntangibles[] = $accessFictionalIntangible;
  2120. return $this;
  2121. }
  2122. /**
  2123. * Remove accessFictionalIntangible
  2124. *
  2125. * @param \AppBundle\Entity\Billing\AccessFictionalIntangible $accessFictionalIntangible
  2126. */
  2127. public function removeAccessFictionalIntangible(\AppBundle\Entity\Billing\AccessFictionalIntangible $accessFictionalIntangible)
  2128. {
  2129. $this->accessFictionalIntangibles->removeElement($accessFictionalIntangible);
  2130. }
  2131. /**
  2132. * Get accessFictionalIntangibles
  2133. *
  2134. * @return \Doctrine\Common\Collections\Collection
  2135. */
  2136. public function getAccessFictionalIntangibles()
  2137. {
  2138. return $this->accessFictionalIntangibles;
  2139. }
  2140. /**
  2141. * Add personalizedList
  2142. *
  2143. * @param \AppBundle\Entity\AccessAndFunction\PersonalizedList $personalizedList
  2144. *
  2145. * @return Access
  2146. */
  2147. public function addPersonalizedList(\AppBundle\Entity\AccessAndFunction\PersonalizedList $personalizedList)
  2148. {
  2149. $this->personalizedLists[] = $personalizedList;
  2150. return $this;
  2151. }
  2152. /**
  2153. * Remove personalizedList
  2154. *
  2155. * @param \AppBundle\Entity\AccessAndFunction\PersonalizedList $personalizedList
  2156. */
  2157. public function removePersonalizedList(\AppBundle\Entity\AccessAndFunction\PersonalizedList $personalizedList)
  2158. {
  2159. $this->personalizedLists->removeElement($personalizedList);
  2160. }
  2161. /**
  2162. * Get personalizedLists
  2163. *
  2164. * @return \Doctrine\Common\Collections\Collection
  2165. */
  2166. public function getPersonalizedLists()
  2167. {
  2168. return $this->personalizedLists;
  2169. }
  2170. /**
  2171. * Set login enabled
  2172. *
  2173. * @param boolean $enabled
  2174. *
  2175. * @return Access
  2176. */
  2177. public function setLoginEnabled($enabled)
  2178. {
  2179. $this->loginEnabled = $enabled;
  2180. return $this;
  2181. }
  2182. /**
  2183. * Get login is enabled
  2184. *
  2185. * @return boolean
  2186. */
  2187. public function getLoginEnabled()
  2188. {
  2189. return $this->loginEnabled;
  2190. }
  2191. /**
  2192. * Get login is enabled
  2193. *
  2194. * @return boolean
  2195. */
  2196. public function isLoginEnabled()
  2197. {
  2198. return $this->loginEnabled;
  2199. }
  2200. /**
  2201. * Set access as a new
  2202. *
  2203. * @param boolean $newAccess
  2204. *
  2205. * @return Access
  2206. */
  2207. public function setNewAccess($newAccess)
  2208. {
  2209. $this->newAccess = $newAccess;
  2210. return $this;
  2211. }
  2212. /**
  2213. * Get status of new access
  2214. *
  2215. * @return boolean
  2216. */
  2217. public function getNewAccess()
  2218. {
  2219. return $this->newAccess;
  2220. }
  2221. /**
  2222. * Set iel enabled
  2223. *
  2224. * @param boolean $ielEnabled
  2225. *
  2226. * @return Access
  2227. */
  2228. public function setIelEnabled($ielEnabled)
  2229. {
  2230. $this->ielEnabled = $ielEnabled;
  2231. return $this;
  2232. }
  2233. /**
  2234. * Get iel enabled
  2235. *
  2236. * @return boolean
  2237. */
  2238. public function getIelEnabled()
  2239. {
  2240. return $this->ielEnabled;
  2241. }
  2242. /**
  2243. * Set iel validation datetime
  2244. *
  2245. * @param \DateTime $ielValidationDatetime
  2246. *
  2247. * @return Access
  2248. */
  2249. public function setIelValidationDatetime($ielValidationDatetime)
  2250. {
  2251. $this->ielValidationDatetime = $ielValidationDatetime;
  2252. return $this;
  2253. }
  2254. /**
  2255. * Get iel validation datetime
  2256. *
  2257. * @return \DateTime
  2258. */
  2259. public function getIelValidationDatetime()
  2260. {
  2261. return $this->ielValidationDatetime;
  2262. }
  2263. /**
  2264. * Is this Access is New ?
  2265. *
  2266. * @return boolean
  2267. */
  2268. public function isNewAccess()
  2269. {
  2270. return $this->newAccess;
  2271. }
  2272. /**
  2273. * Add attendance
  2274. *
  2275. * @param \AppBundle\Entity\Booking\Attendance $attendence
  2276. *
  2277. * @return Organization
  2278. */
  2279. public function addAttendance(\AppBundle\Entity\Booking\Attendance $attendance)
  2280. {
  2281. $attendance->setAccess($this);
  2282. $this->attendances[] = $attendance;
  2283. return $this;
  2284. }
  2285. /**
  2286. * Remove attendance
  2287. *
  2288. * @param \AppBundle\Entity\Booking\Attendance $attendance
  2289. */
  2290. public function removeAttendance(\AppBundle\Entity\Booking\Attendance $attendance)
  2291. {
  2292. $this->attendances->removeElement($attendance);
  2293. }
  2294. /**
  2295. * Get attendances
  2296. *
  2297. * @return \Doctrine\Common\Collections\Collection
  2298. */
  2299. public function getAttendances()
  2300. {
  2301. return $this->attendances;
  2302. }
  2303. /**
  2304. * Add attendanceBooking
  2305. *
  2306. * @param \AppBundle\Entity\Booking\AttendanceBooking $attendanceBooking
  2307. *
  2308. * @return Organization
  2309. */
  2310. public function addAttendanceBooking(\AppBundle\Entity\Booking\AttendanceBooking $attendanceBooking)
  2311. {
  2312. $attendanceBooking->setAccess($this);
  2313. $this->$attendanceBooking[] = $attendanceBooking;
  2314. return $this;
  2315. }
  2316. /**
  2317. * Remove attendanceBooking
  2318. *
  2319. * @param \AppBundle\Entity\Booking\AttendanceBooking $attendanceBooking
  2320. */
  2321. public function removeAttendanceBooking(\AppBundle\Entity\Booking\AttendanceBooking $attendanceBooking)
  2322. {
  2323. $this->attendanceBooking->removeElement($attendanceBooking);
  2324. }
  2325. /**
  2326. * Get attendanceBooking
  2327. *
  2328. * @return \Doctrine\Common\Collections\Collection
  2329. */
  2330. public function getAttendanceBookings()
  2331. {
  2332. return $this->attendanceBookings;
  2333. }
  2334. /**
  2335. * Get attendanceBooking
  2336. *
  2337. * @return \Doctrine\Common\Collections\Collection
  2338. */
  2339. public function getAttendanceBookingsFiltered()
  2340. {
  2341. $filtered = array_filter($this->attendanceBookingsFiltered->toArray(), function($attendanceBookingsFiltered) { return $attendanceBookingsFiltered->getDatetimeStart() <= new \DateTime(); });
  2342. $filteredArray = new ArrayCollection(array_values($filtered));
  2343. return $filteredArray->slice(0,3);
  2344. }
  2345. /**
  2346. * Add $attendanceReplacement
  2347. *
  2348. * @param \AppBundle\Entity\Booking\Attendance $attendanceReplacement
  2349. *
  2350. * @return Organization
  2351. */
  2352. public function addAttendanceReplacement(\AppBundle\Entity\Booking\Attendance $attendanceReplacement)
  2353. {
  2354. $attendanceReplacement->setReplacement($this);
  2355. $this->attendanceReplacements[] = $attendanceReplacement;
  2356. return $this;
  2357. }
  2358. /**
  2359. * Remove $attendanceReplacement
  2360. *
  2361. * @param \AppBundle\Entity\Booking\Attendance $attendanceReplacement
  2362. */
  2363. public function removeAttendanceReplacement(\AppBundle\Entity\Booking\Attendance $attendanceReplacement)
  2364. {
  2365. $this->attendanceReplacements->removeElement($attendanceReplacement);
  2366. }
  2367. /**
  2368. * Get $attendanceReplacements
  2369. *
  2370. * @return \Doctrine\Common\Collections\Collection
  2371. */
  2372. public function getAttendanceReplacements()
  2373. {
  2374. return $this->attendanceReplacements;
  2375. }
  2376. /**
  2377. * Sets setting.
  2378. *
  2379. * @param array $setting
  2380. *
  2381. * @return $this
  2382. */
  2383. public function setSetting(array $setting)
  2384. {
  2385. $this->setting = $setting;
  2386. return $this;
  2387. }
  2388. /**
  2389. * Gets setting.
  2390. *
  2391. * @return array
  2392. */
  2393. public function getSetting()
  2394. {
  2395. return $this->setting;
  2396. }
  2397. /**
  2398. * Add donor
  2399. *
  2400. * @param \AppBundle\Entity\Donor\Donor $donor
  2401. *
  2402. * @return Access
  2403. */
  2404. public function addDonor(\AppBundle\Entity\Donor\Donor $donor)
  2405. {
  2406. $donor->setAccess($this);
  2407. $this->donors[] = $donor;
  2408. return $this;
  2409. }
  2410. /**
  2411. * Remove donor
  2412. *
  2413. * @param \AppBundle\Entity\Donor\Donor $donor
  2414. */
  2415. public function removeDonor(\AppBundle\Entity\Donor\Donor $donor)
  2416. {
  2417. $this->donors->removeElement($donor);
  2418. }
  2419. /**
  2420. * Get donors
  2421. *
  2422. * @return \Doctrine\Common\Collections\Collection
  2423. */
  2424. public function getDonors()
  2425. {
  2426. return $this->donors;
  2427. }
  2428. /**
  2429. * Get donors
  2430. *
  2431. * @return \Doctrine\Common\Collections\Collection
  2432. */
  2433. public function getDonorsFiltered()
  2434. {
  2435. $filtered = array_filter($this->donorsFiltered->toArray(), function($donorsFiltered) {
  2436. return new \DateTime($donorsFiltered->getStartDate()) <= new \DateTime() && (is_null($donorsFiltered->getEndDate()) || new \DateTime($donorsFiltered->getEndDate()) >= new \DateTime());
  2437. });
  2438. $filteredArray = new ArrayCollection(array_values($filtered));
  2439. return $filteredArray->slice(0,3);
  2440. }
  2441. /**
  2442. * Add medal
  2443. *
  2444. * @param \AppBundle\Entity\Person\Medal $medal
  2445. *
  2446. * @return Access
  2447. */
  2448. public function addMedal(Medal $medal)
  2449. {
  2450. $medal->setAccess($this);
  2451. $this->medals[] = $medal;
  2452. return $this;
  2453. }
  2454. /**
  2455. * Remove medal
  2456. *
  2457. * @param \AppBundle\Entity\Person\Medal
  2458. */
  2459. public function removeMedal(Medal $medal)
  2460. {
  2461. $this->medals->removeElement($medal);
  2462. }
  2463. /**
  2464. * Get medals
  2465. *
  2466. * @return \Doctrine\Common\Collections\Collection
  2467. */
  2468. public function getMedals()
  2469. {
  2470. return $this->medals;
  2471. }
  2472. /**
  2473. * Get donors
  2474. *
  2475. * @return \Doctrine\Common\Collections\Collection
  2476. */
  2477. public function getMedalsFiltered()
  2478. {
  2479. return $this->medalsFiltered->slice(0,3);
  2480. }
  2481. /**
  2482. * Set accessSocial
  2483. *
  2484. * @param \AppBundle\Entity\AccessAndFunction\AccessSocial $accessSocial
  2485. *
  2486. * @return Access
  2487. */
  2488. public function setAccessSocial(\AppBundle\Entity\AccessAndFunction\AccessSocial $accessSocial = null)
  2489. {
  2490. if(!is_null($accessSocial)){
  2491. $accessSocial->setAccess($this);
  2492. }
  2493. $this->accessSocial = $accessSocial;
  2494. return $this;
  2495. }
  2496. /**
  2497. * Get accessSocial
  2498. *
  2499. * @return \AppBundle\Entity\AccessAndFunction\AccessSocial
  2500. */
  2501. public function getAccessSocial()
  2502. {
  2503. return $this->accessSocial;
  2504. }
  2505. /**
  2506. * Set accessNetworkSetting
  2507. *
  2508. * @param \AppBundle\Entity\AccessAndFunction\AccessNetworkSetting $accessNetworkSetting
  2509. *
  2510. * @return Access
  2511. */
  2512. public function setAccessNetworkSetting(\AppBundle\Entity\AccessAndFunction\AccessNetworkSetting $accessNetworkSetting = null)
  2513. {
  2514. if(!is_null($accessNetworkSetting)){
  2515. $accessNetworkSetting->setAccess($this);
  2516. }
  2517. $this->accessNetworkSetting = $accessNetworkSetting;
  2518. return $this;
  2519. }
  2520. /**
  2521. * Get accessNetworkSetting
  2522. *
  2523. * @return \AppBundle\Entity\AccessAndFunction\AccessNetworkSetting
  2524. */
  2525. public function getAccessNetworkSetting()
  2526. {
  2527. return $this->accessNetworkSetting;
  2528. }
  2529. /**
  2530. * Add organizationResponsability
  2531. *
  2532. * @param \AppBundle\Entity\AccessAndFunction\OrganizationResponsability $organizationResponsability
  2533. *
  2534. * @return Access
  2535. */
  2536. public function addOrganizationResponsability(\AppBundle\Entity\AccessAndFunction\OrganizationResponsability $organizationResponsability)
  2537. {
  2538. $organizationResponsability->setAccess($this);
  2539. $this->organizationResponsabilities[] = $organizationResponsability;
  2540. return $this;
  2541. }
  2542. /**
  2543. * Remove organizationResponsability
  2544. *
  2545. * @param \AppBundle\Entity\AccessAndFunction\OrganizationResponsability $organizationResponsability
  2546. */
  2547. public function removeOrganizationResponsability(\AppBundle\Entity\AccessAndFunction\OrganizationResponsability $organizationResponsability)
  2548. {
  2549. $this->organizationResponsabilities->removeElement($organizationResponsability);
  2550. }
  2551. /**
  2552. * Get organizationResponsabilities
  2553. *
  2554. * @return \Doctrine\Common\Collections\Collection
  2555. */
  2556. public function getOrganizationResponsabilities()
  2557. {
  2558. return $this->organizationResponsabilities;
  2559. }
  2560. public function getCmfLicenceTemplate(){
  2561. $organization = $this->getOrganization();
  2562. $identifier = $organization->getIdentifier();
  2563. if(is_null($identifier))
  2564. return null;
  2565. return $identifier.$this->getPerson()->getLegacyId();
  2566. }
  2567. /**
  2568. * Gets seniority.
  2569. *
  2570. * @return int
  2571. */
  2572. public function getSeniority()
  2573. {
  2574. $seniority = null;
  2575. $date = null;
  2576. if($this->getAccessNetworkSetting() && $this->getAccessNetworkSetting()->getDateFirstEntry()){
  2577. $date = new \DateTime($this->getAccessNetworkSetting()->getDateFirstEntry());
  2578. }else{
  2579. $firstDate = null;
  2580. foreach($this->getOrganizationFunction() as $organizationFunction){
  2581. $startDate = new \DateTime($organizationFunction->getStartDate());
  2582. if(is_null($firstDate) || new \DateTime($organizationFunction->getStartDate()) < $firstDate){
  2583. $firstDate = $startDate;
  2584. }
  2585. }
  2586. $date = $firstDate;
  2587. }
  2588. if(!is_null($date)){
  2589. $interval = $date->diff(new \DateTime());
  2590. $seniority = $interval->y;
  2591. }
  2592. return $seniority;
  2593. }
  2594. /**
  2595. * Gets activityYear
  2596. *
  2597. * @return int
  2598. */
  2599. public function getActivityYear() {
  2600. return $this->activityYear;
  2601. }
  2602. /**
  2603. * Sets activityYear
  2604. *
  2605. * @param int $activityYear
  2606. * @return $this
  2607. */
  2608. public function setActivityYear($activityYear) {
  2609. $this->activityYear = $activityYear;
  2610. return $this;
  2611. }
  2612. /**
  2613. * Set waitingForValidation
  2614. *
  2615. * @param boolean $waitingForValidation
  2616. *
  2617. * @return Access
  2618. */
  2619. public function setWaitingForValidation($waitingForValidation)
  2620. {
  2621. $this->waitingForValidation = $waitingForValidation;
  2622. return $this;
  2623. }
  2624. /**
  2625. * Get waitingForValidation
  2626. *
  2627. * @return boolean
  2628. */
  2629. public function getWaitingForValidation()
  2630. {
  2631. return $this->waitingForValidation;
  2632. }
  2633. /**
  2634. * Set sharingPersonToRecover
  2635. *
  2636. * @param integer $sharingPersonToRecover
  2637. *
  2638. * @return Access
  2639. */
  2640. public function setSharingPersonToRecover($sharingPersonToRecover)
  2641. {
  2642. $this->sharingPersonToRecover = $sharingPersonToRecover;
  2643. return $this;
  2644. }
  2645. /**
  2646. * Get sharingPersonToRecover
  2647. *
  2648. * @return integer
  2649. */
  2650. public function getSharingPersonToRecover()
  2651. {
  2652. return $this->sharingPersonToRecover;
  2653. }
  2654. /**
  2655. * Set superAdminAccess
  2656. *
  2657. * @param boolean $superAdminAccess
  2658. *
  2659. * @return Access
  2660. */
  2661. public function setSuperAdminAccess($superAdminAccess)
  2662. {
  2663. $this->superAdminAccess = $superAdminAccess;
  2664. return $this;
  2665. }
  2666. /**
  2667. * Get superAdminAccess
  2668. *
  2669. * @return boolean
  2670. */
  2671. public function getSuperAdminAccess()
  2672. {
  2673. return $this->superAdminAccess;
  2674. }
  2675. /**
  2676. *
  2677. * {@inheritdoc}
  2678. */
  2679. public function getContact() {
  2680. return $this->getPerson();
  2681. }
  2682. /**
  2683. *
  2684. * {@inheritdoc}
  2685. */
  2686. public function getContactAddress() {
  2687. return $this->getContact()->getContactAddress();
  2688. }
  2689. /**
  2690. *
  2691. * {@inheritdoc}
  2692. */
  2693. public function getContactName() {
  2694. return $this->getContact()->getContactName();
  2695. }
  2696. /**
  2697. *
  2698. * {@inheritdoc}
  2699. */
  2700. public function getContactContactPoint() {
  2701. return $this->getContact()->getContactContactPoint();
  2702. }
  2703. /**
  2704. *
  2705. * {@inheritdoc}
  2706. */
  2707. public function getContactPointForType($type) {
  2708. return $this->getContact()->getContactPointForType($type);
  2709. }
  2710. /**
  2711. * Add billCredit
  2712. *
  2713. * @param \AppBundle\Entity\Billing\BillCredit $billCredit
  2714. *
  2715. * @return Access
  2716. */
  2717. public function addBillCredit(\AppBundle\Entity\Billing\BillCredit $billCredit)
  2718. {
  2719. $this->billCredits[] = $billCredit;
  2720. return $this;
  2721. }
  2722. /**
  2723. * Remove billCredit
  2724. *
  2725. * @param \AppBundle\Entity\Billing\BillCredit $billCredit
  2726. */
  2727. public function removeBillCredit(\AppBundle\Entity\Billing\BillCredit $billCredit)
  2728. {
  2729. $this->billCredits->removeElement($billCredit);
  2730. }
  2731. /**
  2732. * Get billCredits
  2733. *
  2734. * @return \Doctrine\Common\Collections\Collection
  2735. */
  2736. public function getBillCredits()
  2737. {
  2738. return $this->billCredits;
  2739. }
  2740. /**
  2741. * Set accessCommunication
  2742. *
  2743. * @param \AppBundle\Entity\AccessAndFunction\AccessCommunication $accessCommunication
  2744. *
  2745. * @return Access
  2746. */
  2747. public function setAccessCommunication(\AppBundle\Entity\AccessAndFunction\AccessCommunication $accessCommunication = null)
  2748. {
  2749. $this->accessCommunication = $accessCommunication;
  2750. $accessCommunication->setAccess($this);
  2751. return $this;
  2752. }
  2753. /**
  2754. * Get accessCommunication
  2755. *
  2756. * @return \AppBundle\Entity\AccessAndFunction\AccessCommunication
  2757. */
  2758. public function getAccessCommunication()
  2759. {
  2760. return $this->accessCommunication;
  2761. }
  2762. /**
  2763. * Set approveRulesProcedure
  2764. *
  2765. * @param boolean $approveRulesProcedure
  2766. *
  2767. * @return Access
  2768. */
  2769. public function setApproveRulesProcedure($approveRulesProcedure)
  2770. {
  2771. $this->approveRulesProcedure = $approveRulesProcedure;
  2772. return $this;
  2773. }
  2774. /**
  2775. * Get approveRulesProcedure
  2776. *
  2777. * @return boolean
  2778. */
  2779. public function getApproveRulesProcedure()
  2780. {
  2781. return $this->approveRulesProcedure;
  2782. }
  2783. /**
  2784. * Set receiveInformationsFromOrganization
  2785. *
  2786. * @param boolean $receiveInformationsFromOrganization
  2787. *
  2788. * @return Access
  2789. */
  2790. public function setReceiveInformationsFromOrganization($receiveInformationsFromOrganization)
  2791. {
  2792. $this->receiveInformationsFromOrganization = $receiveInformationsFromOrganization;
  2793. return $this;
  2794. }
  2795. /**
  2796. * Get receiveInformationsFromOrganization
  2797. *
  2798. * @return boolean
  2799. */
  2800. public function getReceiveInformationsFromOrganization()
  2801. {
  2802. return $this->receiveInformationsFromOrganization;
  2803. }
  2804. /**
  2805. * Get getCoursesFiltered
  2806. *
  2807. * @return \Doctrine\Common\Collections\Collection
  2808. */
  2809. public function getCoursesFiltered()
  2810. {
  2811. $courses = [];
  2812. foreach ($this->getCourses() as $course){
  2813. if(!$course->getIsCanceled() && count($course->getEventRecur()) > 0)
  2814. $courses[] = $course;
  2815. }
  2816. return new ArrayCollection($courses);
  2817. }
  2818. /**
  2819. * Add workByUser
  2820. *
  2821. * @param \AppBundle\Entity\Booking\WorkByUser $workByUser
  2822. *
  2823. * @return Access
  2824. */
  2825. public function addWorkByUser(\AppBundle\Entity\Booking\WorkByUser $workByUser)
  2826. {
  2827. $this->workByUsers[] = $workByUser;
  2828. return $this;
  2829. }
  2830. /**
  2831. * Remove workByUser
  2832. *
  2833. * @param \AppBundle\Entity\Booking\WorkByUser $workByUser
  2834. */
  2835. public function removeWorkByUser(\AppBundle\Entity\Booking\WorkByUser $workByUser)
  2836. {
  2837. $this->workByUsers->removeElement($workByUser);
  2838. }
  2839. /**
  2840. * Get workByUsers
  2841. *
  2842. * @return \Doctrine\Common\Collections\Collection
  2843. */
  2844. public function getWorkByUsers()
  2845. {
  2846. return $this->workByUsers;
  2847. }
  2848. /**
  2849. * Set calendarSynchro
  2850. *
  2851. * @param \AppBundle\Entity\Booking\CalendarSynchro $calendarSynchro
  2852. *
  2853. * @return Access
  2854. */
  2855. public function setCalendarSynchro(\AppBundle\Entity\Booking\CalendarSynchro $calendarSynchro = null)
  2856. {
  2857. $this->calendarSynchro = $calendarSynchro;
  2858. return $this;
  2859. }
  2860. /**
  2861. * Get calendarSynchro
  2862. *
  2863. * @return \AppBundle\Entity\Booking\CalendarSynchro
  2864. */
  2865. public function getCalendarSynchro()
  2866. {
  2867. return $this->calendarSynchro;
  2868. }
  2869. /**
  2870. * Add tag
  2871. *
  2872. * @param \AppBundle\Entity\Core\Tagg $tag
  2873. *
  2874. * @return Access
  2875. */
  2876. public function addTag(\AppBundle\Entity\Core\Tagg $tag)
  2877. {
  2878. $this->tags[] = $tag;
  2879. return $this;
  2880. }
  2881. /**
  2882. * Remove tag
  2883. *
  2884. * @param \AppBundle\Entity\Core\Tagg $tag
  2885. */
  2886. public function removeTag(\AppBundle\Entity\Core\Tagg $tag)
  2887. {
  2888. $this->tags->removeElement($tag);
  2889. }
  2890. /**
  2891. * Get tags
  2892. *
  2893. * @return \Doctrine\Common\Collections\Collection
  2894. */
  2895. public function getTags()
  2896. {
  2897. return $this->tags;
  2898. }
  2899. /**
  2900. * Sets educationNotationConfig.
  2901. *
  2902. * @param $educationNotationConfig
  2903. *
  2904. * @return $this
  2905. */
  2906. public function setEducationNotationConfig($educationNotationConfig)
  2907. {
  2908. $this->educationNotationConfig = $educationNotationConfig;
  2909. return $this;
  2910. }
  2911. /**
  2912. * Gets educationNotationCongig.
  2913. *
  2914. * @return EducationNotationConfig
  2915. */
  2916. public function getEducationNotationConfig()
  2917. {
  2918. return $this->educationNotationConfig;
  2919. }
  2920. /**
  2921. * Set informationRetainedAndUsedDate
  2922. *
  2923. * @param \DateTime $informationRetainedAndUsedDate
  2924. *
  2925. * @return Access
  2926. */
  2927. public function setInformationRetainedAndUsedDate($informationRetainedAndUsedDate)
  2928. {
  2929. $this->informationRetainedAndUsedDate = $informationRetainedAndUsedDate;
  2930. return $this;
  2931. }
  2932. /**
  2933. * Get informationRetainedAndUsedDate
  2934. *
  2935. * @return \DateTime
  2936. */
  2937. public function getInformationRetainedAndUsedDate()
  2938. {
  2939. return $this->informationRetainedAndUsedDate;
  2940. }
  2941. /**
  2942. * Set cguReadAndAcceptedDate
  2943. *
  2944. * @param \DateTime $cguReadAndAcceptedDate
  2945. *
  2946. * @return Access
  2947. */
  2948. public function setCguReadAndAcceptedDate($cguReadAndAcceptedDate)
  2949. {
  2950. $this->cguReadAndAcceptedDate = $cguReadAndAcceptedDate;
  2951. return $this;
  2952. }
  2953. /**
  2954. * Get cguReadAndAcceptedDate
  2955. *
  2956. * @return \DateTime
  2957. */
  2958. public function getCguReadAndAcceptedDate()
  2959. {
  2960. return $this->cguReadAndAcceptedDate;
  2961. }
  2962. /**
  2963. * Get getCoursesNextYear
  2964. *
  2965. * @return \Doctrine\Common\Collections\Collection
  2966. */
  2967. public function getCoursesNextYear()
  2968. {
  2969. $datetimeNow = new \Datetime('now');
  2970. $nextYear = $datetimeNow->format('Y');
  2971. $courses = [];
  2972. /** @var Course $course */
  2973. foreach ($this->getCourses() as $course){
  2974. if(!$course->getIsCanceled() && count($course->getEventRecur()) > 0 && $course->getStartYear() == $nextYear)
  2975. $courses[] = $course;
  2976. }
  2977. return new ArrayCollection($courses);
  2978. }
  2979. /**
  2980. * Sets publicationDirector.
  2981. *
  2982. * @param Parameters $publicationDirector
  2983. *
  2984. * @return $this
  2985. */
  2986. public function setPublicationDirector(Parameters $publicationDirector=null)
  2987. {
  2988. $this->publicationDirector = $publicationDirector;
  2989. return $this;
  2990. }
  2991. /**
  2992. * Add accessWish
  2993. *
  2994. * @param \AppBundle\Entity\AccessWish\AccessWish $accessWish
  2995. *
  2996. * @return Access
  2997. */
  2998. public function addAccessWish(\AppBundle\Entity\AccessWish\AccessWish $accessWish)
  2999. {
  3000. $accessWish->setAccessOriginal($this);
  3001. $this->accessWishes[] = $accessWish;
  3002. return $this;
  3003. }
  3004. /**
  3005. * Remove accessWish
  3006. *
  3007. * @param \AppBundle\Entity\AccessWish\AccessWish $accessWish
  3008. */
  3009. public function removeAccessWish(\AppBundle\Entity\AccessWish\AccessWish $accessWish)
  3010. {
  3011. $this->accessWishes->removeElement($accessWish);
  3012. }
  3013. /**
  3014. * Get accessWishes
  3015. *
  3016. * @return \Doctrine\Common\Collections\Collection
  3017. */
  3018. public function getAccessWishes()
  3019. {
  3020. return $this->accessWishes;
  3021. }
  3022. }