Organization.php 81 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037
  1. <?php
  2. namespace AppBundle\Entity\Organization;
  3. use AppBundle\Entity\AccessAndFunction\Access;
  4. use AppBundle\Entity\Billing\BillingExportSetting;
  5. use AppBundle\Entity\Billing\BillingSetting;
  6. use AppBundle\Entity\Booking\Course;
  7. use AppBundle\Entity\Booking\EducationalProject;
  8. use AppBundle\Entity\Booking\Event;
  9. use AppBundle\Entity\Booking\Examen;
  10. use AppBundle\Entity\Core\ContactPoint;
  11. use AppBundle\Entity\Donor\Donor;
  12. use AppBundle\Enum\Core\AddressPostalOrganizationTypeEnum;
  13. use AppBundle\Enum\Core\ContactPointTypeEnum;
  14. use Doctrine\Common\Collections\ArrayCollection;
  15. use Doctrine\Common\Collections\Criteria;
  16. use Doctrine\ORM\Mapping as ORM;
  17. use Dunglas\ApiBundle\Annotation\Iri;
  18. use AppBundle\Entity\Network\NetworkOrganization;
  19. use Symfony\Component\Serializer\Annotation\Groups;
  20. use Symfony\Component\Validator\Constraints as Assert;
  21. use AppBundle\Entity\Person\Person;
  22. use AppBundle\Entity\Traits\TimestampableEntity;
  23. use AppBundle\Entity\Traits\CreatorUpdaterEntity;
  24. use AppBundle\Entity\Bank\BankAccount;
  25. use AppBundle\Entity\Traits\AddressPostalType;
  26. use AppBundle\Validator\Constraints\Delete as OpentalentDelete;
  27. use AppBundle\Entity\Booking\OrganizationHoliday;
  28. use AppBundle\Entity\Traits\ContactPointType;
  29. use AppBundle\Entity\Core\ContactInterface;
  30. /**
  31. * Structure, organisation
  32. *
  33. * @Iri("http://schema.org/Organization")
  34. * @OpentalentDelete\EntityDelete()
  35. */
  36. #[ORM\Entity(repositoryClass: 'AppBundle\Entity\Organization\Repository\OrganizationRepository')]
  37. class Organization implements ContactInterface
  38. {
  39. use TimestampableEntity;
  40. use CreatorUpdaterEntity;
  41. use AddressPostalType;
  42. use ContactPointType;
  43. /**
  44. * @var int
  45. */
  46. #[ORM\Column(type: 'integer')]
  47. #[ORM\Id]
  48. #[ORM\GeneratedValue(strategy: 'AUTO')]
  49. #[Groups(['organization', 'access_details', 'network_list', 'federations_list', 'networkmanagers_list', 'network_artist_school_list', 'rule', 'accesses_rules', 'all_accesses_list', 'adherent_list', 'organization_cotisation_steps', 'cotisation_responsibles_accesses', 'onlineregistrationsettings_edit', 'organization_communication_edit', 'onlineregistration_infos', 'organization_params_list'])]
  50. private $id;
  51. /**
  52. * @var ArrayCollection<OrganizationAddressPostal>
  53. */
  54. #[Assert\Valid]
  55. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Organization\OrganizationAddressPostal', mappedBy: 'organization', cascade: ['persist'], orphanRemoval: true)]
  56. #[Groups(['organization', 'organization_organizationaddresspostal', 'network_list', 'federations_list', 'networkmanagers_list_organization', 'network_artist_school_list', 'organization_details', 'organization_cotisation_steps', 'organization_params_list'])]
  57. private $organizationAddressPostal;
  58. /**
  59. * @var ArrayCollection<OrganizationAddressPostal>
  60. */
  61. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Organization\OrganizationAddressPostal', mappedBy: 'organization', cascade: ['persist'], orphanRemoval: true, fetch: 'EXTRA_LAZY')]
  62. #[Groups(['network_list', 'federations_list', 'networkmanagers_list_organization', 'network_artist_school_list', 'template'])]
  63. private $organizationAddressPostalContact;
  64. /**
  65. * @var ArrayCollection<OrganizationAddressPostal>
  66. */
  67. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Organization\OrganizationAddressPostal', mappedBy: 'organization', cascade: ['persist'], orphanRemoval: true, fetch: 'EXTRA_LAZY')]
  68. #[Groups(['network_list', 'federations_list', 'networkmanagers_list_organization', 'network_artist_school_list'])]
  69. private $organizationAddressPostalBill;
  70. /**
  71. * @var ArrayCollection<OrganizationAddressPostal>
  72. */
  73. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Organization\OrganizationAddressPostal', mappedBy: 'organization', cascade: ['persist'], orphanRemoval: true, fetch: 'EXTRA_LAZY')]
  74. #[Groups(['network_list', 'federations_list', 'networkmanagers_list_organization', 'network_artist_school_list', 'cmf_network_organizations'])]
  75. private $organizationAddressPostalPrincipal;
  76. #[Assert\Valid]
  77. #[ORM\ManyToMany(targetEntity: 'AppBundle\Entity\Core\ContactPoint', cascade: ['persist'], orphanRemoval: true, inversedBy: 'organization')]
  78. #[ORM\JoinTable(joinColumns: [], inverseJoinColumns: [])]
  79. #[ORM\JoinColumn(name: 'organization_id', referencedColumnName: 'id')]
  80. #[ORM\JoinColumn(name: 'contactPoint_id', referencedColumnName: 'id', unique: true)]
  81. #[Groups(['organization_contactpoint', 'network_list', 'federations_list', 'network_artist_school_list', 'organization_details', 'organization_cotisation_steps', 'onlineregistration_infos_organization', 'cmf_network_organizations'])]
  82. private $contactPoint;
  83. #[Assert\Valid]
  84. #[ORM\ManyToMany(targetEntity: 'AppBundle\Entity\Bank\BankAccount', inversedBy: 'organization', cascade: ['persist'], orphanRemoval: true)]
  85. #[ORM\JoinTable(joinColumns: [], inverseJoinColumns: [])]
  86. #[ORM\JoinColumn(name: 'organization_id', referencedColumnName: 'id')]
  87. #[ORM\JoinColumn(name: 'bankAccount_id', referencedColumnName: 'id', unique: true)]
  88. #[Groups(['organization_bankaccount', 'organization_details'])]
  89. private $bankAccount;
  90. /**
  91. * @var string A short description of the item.
  92. *
  93. * @Iri("https://schema.org/description")
  94. */
  95. #[ORM\Column(type: 'text', nullable: true)]
  96. #[Assert\Type(type: 'string')]
  97. #[Groups(['organization', 'organization_details', 'organization_cotisation_steps'])]
  98. private $description;
  99. /**
  100. * @var File An image of the item. This can be a [URL](http://schema.org/URL) or a fully described [ImageObject](http://schema.org/ImageObject).
  101. * @Iri("https://schema.org/image")
  102. */
  103. #[Assert\Valid]
  104. #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Core\File', inversedBy: 'organizationImages', cascade: ['persist'])]
  105. #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
  106. #[Groups(['organization', 'organization_cotisation_steps', 'organization_communication_edit'])]
  107. private $image;
  108. /**
  109. * @var File An image of the item. This can be a [URL](http://schema.org/URL) or a fully described [ImageObject](http://schema.org/ImageObject).
  110. * @Iri("https://schema.org/image")
  111. *
  112. */
  113. #[Assert\Valid]
  114. #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Core\File', inversedBy: 'organizationLogos', cascade: ['persist'])]
  115. #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
  116. #[Groups(['organization', 'network_list', 'network_artist_school_list', 'organization_details', 'organization_cotisation_steps'])]
  117. private $logo;
  118. /**
  119. * @var string The name of the item.
  120. *
  121. * @Iri("https://schema.org/name")
  122. */
  123. #[ORM\Column(type: 'string', nullable: true, length: 128)]
  124. #[Assert\Type(type: 'string')]
  125. #[Groups(['organization', 'network_list', 'federations_list', 'networkmanagers_list_organization', 'network_artist_school_list', 'reportmessage', 'rule', 'accesses_rules', 'organization_reference', 'accesses_rules_organization', 'organization_create', 'all_accesses_list_organization', 'organization_details', 'organization_cotisation_steps', 'onlineregistration_infos_organization', 'cmf_network_organizations', 'cmf_network_organizations', 'organization_params_list', 'organization_params_list', 'organization_params_list_network'])]
  126. private $name;
  127. /**
  128. * @var \DateTime
  129. */
  130. #[ORM\Column(type: 'date', nullable: true)]
  131. #[Assert\Date]
  132. #[Groups(['organization', 'organization_details'])]
  133. private $creationDate;
  134. /**
  135. * @var string
  136. *
  137. *
  138. * -----------------------
  139. * The validation of the identifier is managed by the creation process
  140. * OpentalentAssert\IdentifierNetwork(network="CMF")
  141. * -----------------------
  142. */
  143. #[ORM\Column(type: 'string', length: 14, nullable: true)]
  144. #[Assert\Type(type: 'string')]
  145. #[Groups(['organization', 'access_details_organization', 'network_artist_school_list', 'federations_list', 'network_list', 'organization_details', 'organization_cotisation_steps', 'cmf_network_organizations', 'organization_params_list'])]
  146. private $identifier;
  147. /**
  148. * @var \DateTime
  149. */
  150. #[ORM\Column(type: 'date', nullable: true)]
  151. #[Assert\Date]
  152. #[Groups(['organization', 'organization_details'])]
  153. private $declarationDate;
  154. /**
  155. * @var string
  156. */
  157. #[ORM\Column(type: 'string')]
  158. #[Assert\Type(type: 'string')]
  159. #[Assert\NotNull]
  160. #[Assert\Choice(callback: ['\AppBundle\Enum\Organization\legalEnum', 'toArray'])]
  161. #[Groups(['organization', 'organization_details', 'organization_cotisation_steps'])]
  162. private $legalStatus;
  163. /**
  164. * @var string
  165. */
  166. #[ORM\Column(type: 'string', length: 14, nullable: true)]
  167. #[Assert\Type(type: 'string')]
  168. #[Groups(['organization', 'organization_details', 'organization_cotisation_steps'])]
  169. private $siretNumber;
  170. /**
  171. * @var string
  172. */
  173. #[ORM\Column(type: 'string', length: 10, nullable: true)]
  174. #[Assert\Type(type: 'string')]
  175. #[Groups(['organization', 'organization_details', 'organization_cotisation_steps'])]
  176. private $waldecNumber;
  177. /**
  178. * @var string
  179. */
  180. #[ORM\Column(type: 'string', length: 5, nullable: true)]
  181. #[Assert\Type(type: 'string')]
  182. #[Groups(['organization', 'organization_details', 'organization_cotisation_steps'])]
  183. private $apeNumber;
  184. /**
  185. * @var string
  186. */
  187. #[ORM\Column(type: 'string', length: 50, nullable: true)]
  188. #[Assert\Type(type: 'string')]
  189. #[Groups(['organization', 'organization_details', 'organization_cotisation_steps'])]
  190. private $tvaNumber;
  191. /**
  192. * @var string
  193. */
  194. #[ORM\Column(type: 'string')]
  195. #[Assert\Type(type: 'string')]
  196. #[Assert\NotNull]
  197. #[Assert\Choice(callback: ['\AppBundle\Enum\Organization\principalTypeEnum', 'toArray'])]
  198. #[Groups(['organization', 'network_list', 'federations_list', 'networkmanagers_list_organization', 'network_artist_school_list', 'organization_create', 'organization_details', 'organization_cotisation_steps', 'cmf_network_organizations'])]
  199. private $principalType;
  200. /**
  201. * @var string
  202. */
  203. #[ORM\Column(type: 'string', length: 40, nullable: true)]
  204. #[Assert\Type(type: 'string')]
  205. #[Groups(['organization'])]
  206. private $otherType;
  207. /**
  208. * @var string
  209. */
  210. #[ORM\Column(type: 'string', length: 80, nullable: true)]
  211. #[Assert\Type(type: 'string')]
  212. #[Groups(['organization', 'organization_details', 'organization_cotisation_steps'])]
  213. private $acronym;
  214. /**
  215. * @var string
  216. */
  217. #[ORM\Column(type: 'string', nullable: true)]
  218. #[Assert\Type(type: 'string')]
  219. #[Groups(['organization', 'organization_details', 'organization_create', 'organization_cotisation_steps', 'organization_communication_edit'])]
  220. private $facebook;
  221. /**
  222. * @var string
  223. */
  224. #[ORM\Column(type: 'string', nullable: true)]
  225. #[Assert\Type(type: 'string')]
  226. #[Groups(['organization', 'organization_details', 'organization_create', 'organization_cotisation_steps', 'organization_communication_edit'])]
  227. private $twitter;
  228. /**
  229. * @var string
  230. */
  231. #[ORM\Column(type: 'string', nullable: true)]
  232. #[Assert\Type(type: 'string')]
  233. #[Groups(['organization', 'organization_details', 'organization_create', 'organization_cotisation_steps', 'organization_communication_edit'])]
  234. private $instagram;
  235. /**
  236. * @var string
  237. */
  238. #[ORM\Column(type: 'string', nullable: true)]
  239. #[Assert\Type(type: 'string')]
  240. #[Groups(['organization', 'organization_details', 'organization_create', 'organization_cotisation_steps', 'organization_communication_edit'])]
  241. private $youtube;
  242. /**
  243. * @var string
  244. */
  245. #[ORM\Column(type: 'string', length: 35, nullable: true)]
  246. #[Assert\Type(type: 'string')]
  247. #[Groups(['organization', 'organization_details'])]
  248. private $collectiveAgreement;
  249. /**
  250. * @var string
  251. */
  252. #[ORM\Column(type: 'string', nullable: true)]
  253. #[Assert\Type(type: 'string')]
  254. #[Assert\Choice(callback: ['\AppBundle\Enum\Organization\opcaEnum', 'toArray'])]
  255. #[Groups(['organization', 'organization_details'])]
  256. private $opca;
  257. /**
  258. * @var string
  259. */
  260. #[ORM\Column(type: 'string', length: 35, nullable: true)]
  261. #[Assert\Type(type: 'string')]
  262. #[Groups(['organization', 'organization_details'])]
  263. private $icomNumber;
  264. /**
  265. * @var string
  266. */
  267. #[ORM\Column(type: 'string', length: 35, nullable: true)]
  268. #[Assert\Type(type: 'string')]
  269. #[Groups(['organization', 'organization_details'])]
  270. private $urssafNumber;
  271. /**
  272. * @var string
  273. */
  274. #[ORM\Column(type: 'string', length: 20, nullable: true)]
  275. #[Assert\Type(type: 'string')]
  276. #[Groups(['organization', 'organization_details'])]
  277. private $youngApproval;
  278. /**
  279. * @var string
  280. */
  281. #[ORM\Column(type: 'string', length: 20, nullable: true)]
  282. #[Assert\Type(type: 'string')]
  283. #[Groups(['organization', 'organization_details'])]
  284. private $trainingApproval;
  285. /**
  286. * @var string
  287. */
  288. #[ORM\Column(type: 'string', length: 50, nullable: true)]
  289. #[Assert\Type(type: 'string')]
  290. #[Groups(['organization', 'organization_details'])]
  291. private $otherApproval;
  292. /**
  293. * @var string
  294. */
  295. #[ORM\Column(type: 'string', length: 35, nullable: true)]
  296. #[Assert\Type(type: 'string')]
  297. #[Groups(['organization', 'organization_details', 'organization_cotisation_steps'])]
  298. private $prefectureName;
  299. /**
  300. * @var string
  301. */
  302. #[ORM\Column(type: 'string', length: 20, nullable: true)]
  303. #[Assert\Type(type: 'string')]
  304. #[Groups(['organization', 'organization_details', 'organization_cotisation_steps'])]
  305. private $prefectureNumber;
  306. /**
  307. * @var string
  308. */
  309. #[ORM\Column(type: 'string', nullable: true)]
  310. #[Assert\Type(type: 'string')]
  311. #[Assert\Choice(callback: ['\AppBundle\Enum\Organization\CategoryEnum', 'toArray'])]
  312. #[Groups(['organization', 'networkmanagers_list_organization'])]
  313. private $category;
  314. /**
  315. * @var string
  316. */
  317. #[ORM\Column(type: 'string', nullable: true)]
  318. #[Assert\Type(type: 'string')]
  319. #[Assert\Choice(callback: ['\AppBundle\Enum\Organization\schoolCategoryEnum', 'toArray'])]
  320. #[Groups(['organization', 'organization_details'])]
  321. private $schoolCategory;
  322. /**
  323. * @var string
  324. */
  325. #[ORM\Column(type: 'string', nullable: true)]
  326. #[Assert\Type(type: 'string')]
  327. #[Assert\Choice(callback: ['\AppBundle\Enum\Organization\typeEstablishmentEnum', 'toArray'])]
  328. #[Groups(['organization', 'organization_details'])]
  329. private $typeEstablishment;
  330. /**
  331. * @var string
  332. */
  333. #[ORM\Column(type: 'string', nullable: true)]
  334. #[Assert\Type(type: 'string')]
  335. #[Assert\Choice(callback: ['\AppBundle\Enum\Organization\typeEstablishmentDetailEnum', 'toArray'])]
  336. #[Groups(['organization'])]
  337. private $typeEstablishmentDetail;
  338. /**
  339. * @var float
  340. */
  341. #[ORM\Column(type: 'float', nullable: true)]
  342. #[Assert\Type(type: 'float')]
  343. #[Groups(['organization', 'organization_details'])]
  344. private $budget;
  345. /**
  346. * @var bool
  347. */
  348. #[ORM\Column(type: 'boolean', nullable: true)]
  349. #[Assert\Type(type: 'boolean')]
  350. #[Groups(['organization', 'organization_details'])]
  351. private $isPedagogicIsPrincipalActivity;
  352. /**
  353. * @var float
  354. */
  355. #[ORM\Column(type: 'float', nullable: true)]
  356. #[Assert\Type(type: 'float')]
  357. #[Groups(['organization'])]
  358. private $pedagogicBudget;
  359. /**
  360. * @var Access
  361. */
  362. #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\AccessAndFunction\Access', inversedBy: 'organizationContacts')]
  363. #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
  364. #[Groups(['organization'])]
  365. private $contactPerson;
  366. /**
  367. * @var bool
  368. */
  369. #[ORM\Column(type: 'boolean', nullable: true)]
  370. #[Assert\Type(type: 'boolean')]
  371. #[Groups(['organization'])]
  372. private $isPerformanceContractor;
  373. /**
  374. * @var string
  375. */
  376. #[ORM\Column(type: 'string', length: 20, nullable: true)]
  377. #[Assert\Type(type: 'string')]
  378. #[Groups(['organization', 'organization_details'])]
  379. private $ffecApproval;
  380. /**
  381. * @var bool
  382. */
  383. #[Assert\Type(type: 'boolean')]
  384. #[Groups(['organization', 'federations_list'])]
  385. private $hasChildren = false;
  386. /**
  387. * @var ArrayCollection<NetworkOrganization>
  388. */
  389. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Network\NetworkOrganization', mappedBy: 'organization', orphanRemoval: true, cascade: ['persist'])]
  390. #[Groups(['organization_networkorganization', 'organization', 'network_list', 'organization_create', 'organization_details', 'organization_cotisation_steps', 'organization_params_list'])]
  391. private $network;
  392. /**
  393. * @var ArrayCollection<NetworkOrganization>
  394. */
  395. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Network\NetworkOrganization', mappedBy: 'parent', orphanRemoval: true, cascade: ['persist'])]
  396. #[Groups(['organization_networkorganization', 'network_list', 'organization_params_list_network'])]
  397. private $networkChild;
  398. /**
  399. * @var bool
  400. */
  401. #[ORM\Column(type: 'boolean', options: ['default' => false])]
  402. #[Assert\Type(type: 'boolean')]
  403. #[Assert\NotNull]
  404. #[Groups(['organization', 'organization_details', 'organization_communication_edit'])]
  405. private $portailVisibility = false;
  406. /**
  407. *
  408. * @var Setting
  409. */
  410. #[ORM\OneToOne(targetEntity: 'AppBundle\Entity\Organization\Settings', mappedBy: 'organization', orphanRemoval: true, cascade: ['persist'], fetch: 'EAGER')]
  411. #[Groups(['organization', 'organization_params_list'])]
  412. private $settings;
  413. /**
  414. * @var Parameters
  415. */
  416. #[Assert\Valid]
  417. #[ORM\OneToOne(targetEntity: 'Parameters', cascade: ['persist'], orphanRemoval: true, fetch: 'EAGER')]
  418. #[Groups(['organization', 'network_list', 'federations_list', 'network_list', 'network_artist_school_list', 'organization_cotisation_steps', 'organization_create'])]
  419. private $parameters;
  420. /**
  421. * @var ArrayCollection<OrganizationHoliday>
  422. */
  423. #[Assert\Valid]
  424. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Booking\OrganizationHoliday', mappedBy: 'organization', cascade: ['persist'], orphanRemoval: true)]
  425. #[Groups(['organization_organizationholiday'])]
  426. private $holidays;
  427. /**
  428. * @var ArrayCollection<OrganizationLicence>
  429. */
  430. #[Assert\Valid]
  431. #[ORM\OneToMany(targetEntity: 'OrganizationLicence', mappedBy: 'organization', cascade: ['persist'], orphanRemoval: true)]
  432. #[Groups(['organization_organizationlicence', 'organization_details'])]
  433. private $organizationLicences;
  434. /**
  435. * @var BillingSetting
  436. */
  437. #[Assert\Valid]
  438. #[ORM\OneToOne(targetEntity: 'AppBundle\Entity\Billing\BillingSetting', mappedBy: 'organization', cascade: ['persist'], orphanRemoval: true, fetch: 'EAGER')]
  439. #[Groups(['organization'])]
  440. private $billingSetting;
  441. /**
  442. * @var BillingExportSetting
  443. */
  444. #[Assert\Valid]
  445. #[ORM\OneToOne(targetEntity: 'AppBundle\Entity\Billing\BillingExportSetting', mappedBy: 'organization', cascade: ['persist'], orphanRemoval: true, fetch: 'EAGER')]
  446. #[Groups(['organization'])]
  447. private $billingExportSetting;
  448. /**
  449. * @var ArrayCollection<Access>
  450. */
  451. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\AccessAndFunction\Access', mappedBy: 'organization', cascade: ['persist'], orphanRemoval: true)]
  452. #[Groups(['organization_access', 'organization_create'])]
  453. private $access;
  454. /**
  455. * @var ArrayCollection<Course>
  456. */
  457. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Booking\Course', mappedBy: 'organization', orphanRemoval: true)]
  458. #[Groups(['organization_booking'])]
  459. private $courses;
  460. /**
  461. * @var ArrayCollection<EducationalProject>
  462. */
  463. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Booking\EducationalProject', mappedBy: 'organization', orphanRemoval: true)]
  464. #[Groups(['organization_booking'])]
  465. private $educationalProjects;
  466. /**
  467. * @var ArrayCollection<Event>
  468. */
  469. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Booking\Event', mappedBy: 'organization', orphanRemoval: true)]
  470. #[Groups(['organization_booking'])]
  471. private $events;
  472. /**
  473. * @var ArrayCollection<Examen>
  474. */
  475. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Booking\Examen', mappedBy: 'organization', orphanRemoval: true)]
  476. #[Groups(['organization_booking'])]
  477. private $examens;
  478. /**
  479. * @var ArrayCollection<CriteriaNotation>
  480. */
  481. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Education\CriteriaNotation', mappedBy: 'organization', orphanRemoval: true, cascade: ['persist'])]
  482. #[Groups(['organization_criterianotation'])]
  483. private $critereNotations;
  484. /**
  485. * @var ArrayCollection<Cycle>
  486. */
  487. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Education\Cycle', mappedBy: 'organization', orphanRemoval: true)]
  488. #[Groups(['organization_cycle'])]
  489. private $cycles;
  490. /**
  491. * @var ArrayCollection<EducationTiming>
  492. */
  493. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Education\EducationTiming', mappedBy: 'organization', cascade: ['persist'], orphanRemoval: true)]
  494. #[Groups(['organization_educationTiming'])]
  495. #[Assert\Valid]
  496. private $educationTimings;
  497. /**
  498. * @var ArrayCollection<EducationCategory>
  499. */
  500. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Education\EducationCategory', mappedBy: 'organization', orphanRemoval: true)]
  501. #[Groups(['organization_educationcategory'])]
  502. private $educationCategories;
  503. /**
  504. * @var ArrayCollection<PeriodNotation>
  505. */
  506. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Education\PeriodNotation', mappedBy: 'organization', orphanRemoval: true)]
  507. #[Groups(['organization_periodnotation'])]
  508. private $periodNotations;
  509. /**
  510. * @var ArrayCollection<Document>
  511. */
  512. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Core\Document', mappedBy: 'organization', orphanRemoval: true)]
  513. #[Groups(['organization_document'])]
  514. private $documents;
  515. /**
  516. * @var ArrayCollection<File>
  517. */
  518. #[Groups(['organization_file'])]
  519. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Core\File', mappedBy: 'organization', orphanRemoval: true)]
  520. private $files;
  521. /**
  522. * @var ArrayCollection<Notification>
  523. */
  524. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Core\Notification', mappedBy: 'recipientOrganization', orphanRemoval: true)]
  525. #[Groups(['organization_notification'])]
  526. private $notifications;
  527. /**
  528. * @var ArrayCollection<Message>
  529. */
  530. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Message\Message', mappedBy: 'organization', orphanRemoval: true)]
  531. #[Groups(['organization_message'])]
  532. private $messages;
  533. /**
  534. * @var ArrayCollection<Activity>
  535. */
  536. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Organization\Activity', mappedBy: 'organization', orphanRemoval: true, cascade: ['persist'])]
  537. #[Groups(['organization_activity', 'network_list', 'organization_cotisation_steps'])]
  538. private $activities;
  539. /**
  540. * @var ArrayCollection<Jury>
  541. */
  542. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Organization\Jury', mappedBy: 'organization', orphanRemoval: true)]
  543. #[Groups(['organization_jury'])]
  544. private $juries;
  545. /**
  546. * @var ArrayCollection<Commission>
  547. */
  548. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Person\Commission', mappedBy: 'organization', orphanRemoval: true)]
  549. #[Groups(['organization_commission'])]
  550. private $commissions;
  551. /**
  552. * @var ArrayCollection<Place>
  553. */
  554. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Place\Place', mappedBy: 'organization', orphanRemoval: true)]
  555. #[Groups(['organization_place'])]
  556. private $places;
  557. /**
  558. * @var ArrayCollection<Attendance>
  559. */
  560. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Booking\Attendance', mappedBy: 'organization', orphanRemoval: true)]
  561. #[Groups(['organization_attendance'])]
  562. private $attendances;
  563. /**
  564. * @var ArrayCollection<Equipment>
  565. */
  566. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Product\Equipment', mappedBy: 'organization', orphanRemoval: true)]
  567. #[Groups(['organization_equipment'])]
  568. private $equipments;
  569. /**
  570. * @var ArrayCollection<Equipment>
  571. */
  572. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Product\Intangible', mappedBy: 'organization', orphanRemoval: true)]
  573. #[Groups(['organization_intangible'])]
  574. private $intangibles;
  575. /**
  576. * @var ArrayCollection<Donor>
  577. */
  578. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Donor\Donor', mappedBy: 'organization', orphanRemoval: true)]
  579. #[Groups(['organization_donor', 'access_details_organization'])]
  580. private $donors;
  581. /**
  582. * @var int
  583. */
  584. #[ORM\Column(type: 'integer', nullable: true)]
  585. private $cmsId;
  586. /**
  587. * @var string
  588. */
  589. #[Groups(['network_list', 'federations_list', 'parameters'])]
  590. private $emailAdminAccess;
  591. /**
  592. * @var string
  593. */
  594. #[Groups(['login_admin'])]
  595. private $loginAdminAccess;
  596. /**
  597. * @var string
  598. */
  599. #[Groups(['organization', 'organization_params_list'])]
  600. private $idAdminAccess;
  601. /**
  602. *
  603. * @var OnlineRegistrationSettings
  604. */
  605. #[Assert\Valid]
  606. #[ORM\OneToOne(targetEntity: 'AppBundle\Entity\Organization\OnlineRegistrationSettings', mappedBy: 'organization', orphanRemoval: true, cascade: ['persist'], fetch: 'EAGER')]
  607. #[Groups(['organization_onlineregistrationstetings', 'onlineregistrationsettings_edit'])]
  608. private $onlineRegistrationSettings;
  609. /**
  610. * @var ArrayCollection<OrganizationLicence>
  611. */
  612. #[Assert\Valid]
  613. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Organization\CotisationByYear', mappedBy: 'organization', cascade: ['persist'], orphanRemoval: true)]
  614. #[Groups(['organization_cotisationbyyears', 'organization_cotisation_steps'])]
  615. private $cotisationByYears;
  616. /**
  617. * this field is only for CMF temporary ...
  618. * @var string
  619. */
  620. #[Groups(['organization', 'network_list', 'federations_list', 'networkmanagers_list_organization'])]
  621. private $temporaryFieldForCMF;
  622. /**
  623. * @var array
  624. */
  625. #[ORM\ManyToMany(targetEntity: 'TypeOfPractice', inversedBy: 'organization')]
  626. #[ORM\JoinTable(name: 'organization_type_of_practices')]
  627. #[Groups(['organization', 'organization_cotisation_steps', 'network_list'])]
  628. private $typeOfPractices;
  629. /**
  630. * @var string
  631. */
  632. #[ORM\Column(type: 'text', nullable: true)]
  633. #[Assert\Type(type: 'string')]
  634. #[Groups(['organization', 'organization_cotisation_steps'])]
  635. private $otherPractice;
  636. /**
  637. * @var ArrayCollection<OrganizationArticle>
  638. */
  639. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Organization\OrganizationArticle', mappedBy: 'organization', cascade: ['persist'], orphanRemoval: true)]
  640. #[Groups(['organization_organizationarticles', 'organization_communication_edit', 'organization_cotisation_steps'])]
  641. private $organizationArticles;
  642. /**
  643. * @var ArrayCollection<Tag>
  644. */
  645. #[ORM\ManyToMany(targetEntity: 'AppBundle\Entity\Core\Tagg', cascade: ['persist'], inversedBy: 'organizations')]
  646. #[ORM\JoinTable(name: 'tag_organization', joinColumns: [], inverseJoinColumns: [])]
  647. #[ORM\JoinColumn(name: 'organization_id', referencedColumnName: 'id')]
  648. #[ORM\JoinColumn(name: 'tag_id', referencedColumnName: 'id')]
  649. #[Assert\Valid]
  650. #[Groups(['organization_tags', 'network_list', 'federations_list', 'manage_tags'])]
  651. private $tags;
  652. public function __construct()
  653. {
  654. $this->network = new ArrayCollection();
  655. $this->networkChild = new ArrayCollection();
  656. $this->contactPoint = new ArrayCollection();
  657. $this->bankAccount = new ArrayCollection();
  658. $this->organizationAddressPostal = new ArrayCollection();
  659. $this->holidays = new ArrayCollection();
  660. $this->organizationLicences = new ArrayCollection();
  661. $this->access = new ArrayCollection();
  662. $this->courses = new ArrayCollection();
  663. $this->educationalProjects = new ArrayCollection();
  664. $this->events = new ArrayCollection();
  665. $this->examens = new ArrayCollection();
  666. $this->critereNotations = new ArrayCollection();
  667. $this->cycles = new ArrayCollection();
  668. $this->educationTimings = new ArrayCollection();
  669. $this->educationCategories = new ArrayCollection();
  670. $this->periodNotations = new ArrayCollection();
  671. $this->documents = new ArrayCollection();
  672. $this->files = new ArrayCollection();
  673. $this->notifications = new ArrayCollection();
  674. $this->messages = new ArrayCollection();
  675. $this->activities = new ArrayCollection();
  676. $this->juries = new ArrayCollection();
  677. $this->commissions = new ArrayCollection();
  678. $this->places = new ArrayCollection();
  679. $this->attendances = new ArrayCollection();
  680. $this->equipments = new ArrayCollection();
  681. $this->intangibles = new ArrayCollection();
  682. $this->donors = new ArrayCollection();
  683. $this->cotisationByYears = new ArrayCollection();
  684. $this->typeOfPractices = new ArrayCollection();
  685. $this->organizationArticles = new ArrayCollection();
  686. $this->tags = new ArrayCollection();
  687. }
  688. /**
  689. * Sets id.
  690. *
  691. * @param int $id
  692. *
  693. * @return $this
  694. */
  695. public function setId($id)
  696. {
  697. $this->id = $id;
  698. return $this;
  699. }
  700. /**
  701. * Gets id.
  702. *
  703. * @return int
  704. */
  705. public function getId()
  706. {
  707. return $this->id;
  708. }
  709. /**
  710. * Add donor
  711. *
  712. * @param \AppBundle\Entity\Donor\Donor $donor
  713. *
  714. * @return Organization
  715. */
  716. public function addDonor(\AppBundle\Entity\Donor\Donor $donor)
  717. {
  718. $donor->setOrganization($this);
  719. $this->donors[] = $donor;
  720. return $this;
  721. }
  722. /**
  723. * Remove donor
  724. *
  725. * @param \AppBundle\Entity\Donor\Donor $donor
  726. */
  727. public function removeDonor(\AppBundle\Entity\Donor\Donor $donor)
  728. {
  729. $this->donors->removeElement($donor);
  730. }
  731. /**
  732. * Get donors
  733. *
  734. * @return \Doctrine\Common\Collections\Collection
  735. */
  736. public function getDonors()
  737. {
  738. return $this->donors;
  739. }
  740. /**
  741. * Sets description.
  742. *
  743. * @param string $description
  744. *
  745. * @return $this
  746. */
  747. public function setDescription($description)
  748. {
  749. $this->description = $description;
  750. return $this;
  751. }
  752. /**
  753. * Gets description.
  754. *
  755. * @return string
  756. */
  757. public function getDescription()
  758. {
  759. return $this->description;
  760. }
  761. /**
  762. * Sets image.
  763. *
  764. * @param string $image
  765. *
  766. * @return $this
  767. */
  768. public function setImage($image)
  769. {
  770. $this->image = $image;
  771. return $this;
  772. }
  773. /**
  774. * Gets image.
  775. *
  776. * @return string
  777. */
  778. public function getImage()
  779. {
  780. return $this->image;
  781. }
  782. /**
  783. * Sets logo.
  784. *
  785. * @param string $logo
  786. *
  787. * @return $this
  788. */
  789. public function setLogo($logo)
  790. {
  791. $this->logo = $logo;
  792. return $this;
  793. }
  794. /**
  795. * Gets logo.
  796. *
  797. * @return string
  798. */
  799. public function getLogo()
  800. {
  801. return $this->logo;
  802. }
  803. /**
  804. * Sets name.
  805. *
  806. * @param string $name
  807. *
  808. * @return $this
  809. */
  810. public function setName($name)
  811. {
  812. $this->name = $name;
  813. return $this;
  814. }
  815. /**
  816. * Gets name.
  817. *
  818. * @return string
  819. */
  820. public function getName()
  821. {
  822. return $this->name;
  823. }
  824. /**
  825. * Sets creationDate.
  826. *
  827. * @param \DateTime $creationDate
  828. *
  829. * @return $this
  830. */
  831. public function setCreationDate(\DateTime $creationDate = null)
  832. {
  833. $this->creationDate = $creationDate;
  834. return $this;
  835. }
  836. /**
  837. * Gets creationDate.
  838. *
  839. * @return \DateTime
  840. */
  841. public function getCreationDate()
  842. {
  843. return $this->creationDate ? $this->creationDate->format('Y-m-d') : $this->creationDate;
  844. }
  845. /**
  846. * Sets identifier.
  847. *
  848. * @param string $identifier
  849. *
  850. * @return $this
  851. */
  852. public function setIdentifier($identifier)
  853. {
  854. $this->identifier = $identifier;
  855. return $this;
  856. }
  857. /**
  858. * Gets identifier.
  859. *
  860. * @return string
  861. */
  862. public function getIdentifier()
  863. {
  864. return $this->identifier;
  865. }
  866. /**
  867. * Sets declarationDate.
  868. *
  869. * @param \DateTime $declarationDate
  870. *
  871. * @return $this
  872. */
  873. public function setDeclarationDate(\DateTime $declarationDate = null)
  874. {
  875. $this->declarationDate = $declarationDate;
  876. return $this;
  877. }
  878. /**
  879. * Gets declarationDate.
  880. *
  881. * @return \DateTime
  882. */
  883. public function getDeclarationDate()
  884. {
  885. return $this->declarationDate ? $this->declarationDate->format('Y-m-d') : $this->declarationDate;
  886. }
  887. /**
  888. * Sets legalStatus.
  889. *
  890. * @param string $legalStatus
  891. *
  892. * @return $this
  893. */
  894. public function setLegalStatus($legalStatus)
  895. {
  896. $this->legalStatus = $legalStatus;
  897. return $this;
  898. }
  899. /**
  900. * Gets legalStatus.
  901. *
  902. * @return string
  903. */
  904. public function getLegalStatus()
  905. {
  906. return $this->legalStatus;
  907. }
  908. /**
  909. * Sets siretNumber.
  910. *
  911. * @param string $siretNumber
  912. *
  913. * @return $this
  914. */
  915. public function setSiretNumber($siretNumber)
  916. {
  917. $this->siretNumber = $siretNumber;
  918. return $this;
  919. }
  920. /**
  921. * Gets siretNumber.
  922. *
  923. * @return string
  924. */
  925. public function getSiretNumber()
  926. {
  927. return $this->siretNumber;
  928. }
  929. /**
  930. * Sets waldecNumber.
  931. *
  932. * @param string $waldecNumber
  933. *
  934. * @return $this
  935. */
  936. public function setWaldecNumber($waldecNumber)
  937. {
  938. $this->waldecNumber = $waldecNumber;
  939. return $this;
  940. }
  941. /**
  942. * Gets waldecNumber.
  943. *
  944. * @return string
  945. */
  946. public function getWaldecNumber()
  947. {
  948. return $this->waldecNumber;
  949. }
  950. /**
  951. * Sets apeNumber.
  952. *
  953. * @param string $apeNumber
  954. *
  955. * @return $this
  956. */
  957. public function setApeNumber($apeNumber)
  958. {
  959. $this->apeNumber = $apeNumber;
  960. return $this;
  961. }
  962. /**
  963. * Gets apeNumber.
  964. *
  965. * @return string
  966. */
  967. public function getApeNumber()
  968. {
  969. return $this->apeNumber;
  970. }
  971. /**
  972. * Sets tvaNumber.
  973. *
  974. * @param string $tvaNumber
  975. *
  976. * @return $this
  977. */
  978. public function setTvaNumber($tvaNumber)
  979. {
  980. $this->tvaNumber = $tvaNumber;
  981. return $this;
  982. }
  983. /**
  984. * Gets tvaNumber.
  985. *
  986. * @return string
  987. */
  988. public function getTvaNumber()
  989. {
  990. return $this->tvaNumber;
  991. }
  992. /**
  993. * Sets principalType.
  994. *
  995. * @param string $principalType
  996. *
  997. * @return $this
  998. */
  999. public function setPrincipalType($principalType)
  1000. {
  1001. $this->principalType = $principalType;
  1002. return $this;
  1003. }
  1004. /**
  1005. * Gets principalType.
  1006. *
  1007. * @return string
  1008. */
  1009. public function getPrincipalType()
  1010. {
  1011. return $this->principalType;
  1012. }
  1013. /**
  1014. * Sets otherType.
  1015. *
  1016. * @param string $otherType
  1017. *
  1018. * @return $this
  1019. */
  1020. public function setOtherType($otherType)
  1021. {
  1022. $this->otherType = $otherType;
  1023. return $this;
  1024. }
  1025. /**
  1026. * Gets otherType.
  1027. *
  1028. * @return string
  1029. */
  1030. public function getOtherType()
  1031. {
  1032. return $this->otherType;
  1033. }
  1034. /**
  1035. * Sets acronym.
  1036. *
  1037. * @param string $acronym
  1038. *
  1039. * @return $this
  1040. */
  1041. public function setAcronym($acronym)
  1042. {
  1043. $this->acronym = $acronym;
  1044. return $this;
  1045. }
  1046. /**
  1047. * Gets acronym.
  1048. *
  1049. * @return string
  1050. */
  1051. public function getAcronym()
  1052. {
  1053. return $this->acronym;
  1054. }
  1055. /**
  1056. * Sets facebook.
  1057. *
  1058. * @param string $facebook
  1059. *
  1060. * @return $this
  1061. */
  1062. public function setFacebook($facebook)
  1063. {
  1064. $this->facebook = $facebook;
  1065. return $this;
  1066. }
  1067. /**
  1068. * Gets facebook.
  1069. *
  1070. * @return string
  1071. */
  1072. public function getFacebook()
  1073. {
  1074. return $this->facebook;
  1075. }
  1076. /**
  1077. * Sets twitter.
  1078. *
  1079. * @param string $twitter
  1080. *
  1081. * @return $this
  1082. */
  1083. public function setTwitter($twitter)
  1084. {
  1085. $this->twitter = $twitter;
  1086. return $this;
  1087. }
  1088. /**
  1089. * Gets twitter.
  1090. *
  1091. * @return string
  1092. */
  1093. public function getTwitter()
  1094. {
  1095. return $this->twitter;
  1096. }
  1097. /**
  1098. * Sets instagram.
  1099. *
  1100. * @param string $instagram
  1101. *
  1102. * @return $this
  1103. */
  1104. public function setInstagram($instagram)
  1105. {
  1106. $this->instagram = $instagram;
  1107. return $this;
  1108. }
  1109. /**
  1110. * Gets instagram.
  1111. *
  1112. * @return string
  1113. */
  1114. public function getInstagram()
  1115. {
  1116. return $this->instagram;
  1117. }
  1118. /**
  1119. * Sets collectiveAgreement.
  1120. *
  1121. * @param string $collectiveAgreement
  1122. *
  1123. * @return $this
  1124. */
  1125. public function setCollectiveAgreement($collectiveAgreement)
  1126. {
  1127. $this->collectiveAgreement = $collectiveAgreement;
  1128. return $this;
  1129. }
  1130. /**
  1131. * Gets collectiveAgreement.
  1132. *
  1133. * @return string
  1134. */
  1135. public function getCollectiveAgreement()
  1136. {
  1137. return $this->collectiveAgreement;
  1138. }
  1139. /**
  1140. * Sets opca.
  1141. *
  1142. * @param string $opca
  1143. *
  1144. * @return $this
  1145. */
  1146. public function setOpca($opca)
  1147. {
  1148. $this->opca = $opca;
  1149. return $this;
  1150. }
  1151. /**
  1152. * Gets opca.
  1153. *
  1154. * @return string
  1155. */
  1156. public function getOpca()
  1157. {
  1158. return $this->opca;
  1159. }
  1160. /**
  1161. * Sets icomNumber.
  1162. *
  1163. * @param string $icomNumber
  1164. *
  1165. * @return $this
  1166. */
  1167. public function setIcomNumber($icomNumber)
  1168. {
  1169. $this->icomNumber = $icomNumber;
  1170. return $this;
  1171. }
  1172. /**
  1173. * Gets icomNumber.
  1174. *
  1175. * @return string
  1176. */
  1177. public function getIcomNumber()
  1178. {
  1179. return $this->icomNumber;
  1180. }
  1181. /**
  1182. * Sets urssafNumber.
  1183. *
  1184. * @param string $urssafNumber
  1185. *
  1186. * @return $this
  1187. */
  1188. public function setUrssafNumber($urssafNumber)
  1189. {
  1190. $this->urssafNumber = $urssafNumber;
  1191. return $this;
  1192. }
  1193. /**
  1194. * Gets urssafNumber.
  1195. *
  1196. * @return string
  1197. */
  1198. public function getUrssafNumber()
  1199. {
  1200. return $this->urssafNumber;
  1201. }
  1202. /**
  1203. * Sets youngApproval.
  1204. *
  1205. * @param string $youngApproval
  1206. *
  1207. * @return $this
  1208. */
  1209. public function setYoungApproval($youngApproval)
  1210. {
  1211. $this->youngApproval = $youngApproval;
  1212. return $this;
  1213. }
  1214. /**
  1215. * Gets youngApproval.
  1216. *
  1217. * @return string
  1218. */
  1219. public function getYoungApproval()
  1220. {
  1221. return $this->youngApproval;
  1222. }
  1223. /**
  1224. * Sets trainingApproval.
  1225. *
  1226. * @param string $trainingApproval
  1227. *
  1228. * @return $this
  1229. */
  1230. public function setTrainingApproval($trainingApproval)
  1231. {
  1232. $this->trainingApproval = $trainingApproval;
  1233. return $this;
  1234. }
  1235. /**
  1236. * Gets trainingApproval.
  1237. *
  1238. * @return string
  1239. */
  1240. public function getTrainingApproval()
  1241. {
  1242. return $this->trainingApproval;
  1243. }
  1244. /**
  1245. * Sets otherApproval.
  1246. *
  1247. * @param string $otherApproval
  1248. *
  1249. * @return $this
  1250. */
  1251. public function setOtherApproval($otherApproval)
  1252. {
  1253. $this->otherApproval = $otherApproval;
  1254. return $this;
  1255. }
  1256. /**
  1257. * Gets otherApproval.
  1258. *
  1259. * @return string
  1260. */
  1261. public function getOtherApproval()
  1262. {
  1263. return $this->otherApproval;
  1264. }
  1265. /**
  1266. * Sets prefectureName.
  1267. *
  1268. * @param string $prefectureName
  1269. *
  1270. * @return $this
  1271. */
  1272. public function setPrefectureName($prefectureName)
  1273. {
  1274. $this->prefectureName = $prefectureName;
  1275. return $this;
  1276. }
  1277. /**
  1278. * Gets prefectureName.
  1279. *
  1280. * @return string
  1281. */
  1282. public function getPrefectureName()
  1283. {
  1284. return $this->prefectureName;
  1285. }
  1286. /**
  1287. * Sets prefectureNumber.
  1288. *
  1289. * @param string $prefectureNumber
  1290. *
  1291. * @return $this
  1292. */
  1293. public function setPrefectureNumber($prefectureNumber)
  1294. {
  1295. $this->prefectureNumber = $prefectureNumber;
  1296. return $this;
  1297. }
  1298. /**
  1299. * Gets prefectureNumber.
  1300. *
  1301. * @return string
  1302. */
  1303. public function getPrefectureNumber()
  1304. {
  1305. return $this->prefectureNumber;
  1306. }
  1307. /**
  1308. * Sets category.
  1309. *
  1310. * @param string $category
  1311. *
  1312. * @return $this
  1313. */
  1314. public function setCategory($category)
  1315. {
  1316. $this->category = $category;
  1317. return $this;
  1318. }
  1319. /**
  1320. * Gets category.
  1321. *
  1322. * @return string
  1323. */
  1324. public function getCategory()
  1325. {
  1326. return $this->category;
  1327. }
  1328. /**
  1329. * Sets schoolCategory.
  1330. *
  1331. * @param string $schoolCategory
  1332. *
  1333. * @return $this
  1334. */
  1335. public function setSchoolCategory($schoolCategory)
  1336. {
  1337. $this->schoolCategory = $schoolCategory;
  1338. return $this;
  1339. }
  1340. /**
  1341. * Gets schoolCategory.
  1342. *
  1343. * @return string
  1344. */
  1345. public function getSchoolCategory()
  1346. {
  1347. return $this->schoolCategory;
  1348. }
  1349. /**
  1350. * Sets typeEstablishment.
  1351. *
  1352. * @param string $typeEstablishment
  1353. *
  1354. * @return $this
  1355. */
  1356. public function setTypeEstablishment($typeEstablishment)
  1357. {
  1358. $this->typeEstablishment = $typeEstablishment;
  1359. return $this;
  1360. }
  1361. /**
  1362. * Gets typeEstablishment.
  1363. *
  1364. * @return string
  1365. */
  1366. public function getTypeEstablishment()
  1367. {
  1368. return $this->typeEstablishment;
  1369. }
  1370. /**
  1371. * Sets typeEstablishmentDetail.
  1372. *
  1373. * @param string $typeEstablishmentDetail
  1374. *
  1375. * @return $this
  1376. */
  1377. public function setTypeEstablishmentDetail($typeEstablishmentDetail)
  1378. {
  1379. $this->typeEstablishmentDetail = $typeEstablishmentDetail;
  1380. return $this;
  1381. }
  1382. /**
  1383. * Gets typeEstablishmentDetail.
  1384. *
  1385. * @return string
  1386. */
  1387. public function getTypeEstablishmentDetail()
  1388. {
  1389. return $this->typeEstablishmentDetail;
  1390. }
  1391. /**
  1392. * Sets budget.
  1393. *
  1394. * @param float $budget
  1395. *
  1396. * @return $this
  1397. */
  1398. public function setBudget($budget)
  1399. {
  1400. $this->budget = floatval($budget);
  1401. return $this;
  1402. }
  1403. /**
  1404. * Gets budget.
  1405. *
  1406. * @return float
  1407. */
  1408. public function getBudget()
  1409. {
  1410. return $this->budget;
  1411. }
  1412. /**
  1413. * Sets isPedagogicIsPrincipalActivity.
  1414. *
  1415. * @param bool $isPedagogicIsPrincipalActivity
  1416. *
  1417. * @return $this
  1418. */
  1419. public function setIsPedagogicIsPrincipalActivity($isPedagogicIsPrincipalActivity)
  1420. {
  1421. $this->isPedagogicIsPrincipalActivity = $isPedagogicIsPrincipalActivity;
  1422. return $this;
  1423. }
  1424. /**
  1425. * Gets isPedagogicIsPrincipalActivity.
  1426. *
  1427. * @return bool
  1428. */
  1429. public function getIsPedagogicIsPrincipalActivity()
  1430. {
  1431. return $this->isPedagogicIsPrincipalActivity;
  1432. }
  1433. /**
  1434. * Sets pedagogicBudget.
  1435. *
  1436. * @param float $pedagogicBudget
  1437. *
  1438. * @return $this
  1439. */
  1440. public function setPedagogicBudget($pedagogicBudget)
  1441. {
  1442. $this->pedagogicBudget = floatval($pedagogicBudget);
  1443. return $this;
  1444. }
  1445. /**
  1446. * Gets pedagogicBudget.
  1447. *
  1448. * @return float
  1449. */
  1450. public function getPedagogicBudget()
  1451. {
  1452. return $this->pedagogicBudget;
  1453. }
  1454. /**
  1455. * Sets Access.
  1456. *
  1457. * @param Access $contactPerson
  1458. *
  1459. * @return $this
  1460. */
  1461. public function setContactPerson(Access $contactPerson = null)
  1462. {
  1463. $this->contactPerson = $contactPerson;
  1464. return $this;
  1465. }
  1466. /**
  1467. * Gets Access.
  1468. *
  1469. * @return Person
  1470. */
  1471. public function getContactPerson()
  1472. {
  1473. return $this->contactPerson;
  1474. }
  1475. /**
  1476. * Sets isPerformanceContractor.
  1477. *
  1478. * @param bool $isPerformanceContractor
  1479. *
  1480. * @return $this
  1481. */
  1482. public function setIsPerformanceContractor($isPerformanceContractor)
  1483. {
  1484. $this->isPerformanceContractor = $isPerformanceContractor;
  1485. return $this;
  1486. }
  1487. /**
  1488. * Gets isPerformanceContractor.
  1489. *
  1490. * @return bool
  1491. */
  1492. public function getIsPerformanceContractor()
  1493. {
  1494. return $this->isPerformanceContractor;
  1495. }
  1496. /**
  1497. * Sets ffecApproval.
  1498. *
  1499. * @param string $ffecApproval
  1500. *
  1501. * @return $this
  1502. */
  1503. public function setFfecApproval($ffecApproval)
  1504. {
  1505. $this->ffecApproval = $ffecApproval;
  1506. return $this;
  1507. }
  1508. /**
  1509. * Gets ffecApproval.
  1510. *
  1511. * @return string
  1512. */
  1513. public function getFfecApproval()
  1514. {
  1515. return $this->ffecApproval;
  1516. }
  1517. /**
  1518. * Add network
  1519. *
  1520. * @param NetworkOrganization $network
  1521. * @return Organization
  1522. */
  1523. public function addNetwork(NetworkOrganization $network)
  1524. {
  1525. $network->setOrganization($this);
  1526. $this->network[] = $network;
  1527. return $this;
  1528. }
  1529. /**
  1530. * Remove network
  1531. *
  1532. * @param NetworkOrganization $network
  1533. */
  1534. public function removeNetwork(NetworkOrganization $network)
  1535. {
  1536. $this->network->removeElement($network);
  1537. }
  1538. /**
  1539. * Get network
  1540. *
  1541. * @return \Doctrine\Common\Collections\Collection
  1542. */
  1543. public function getNetwork()
  1544. {
  1545. return ($this->network) ? array_values($this->network->toArray()) : new ArrayCollection();
  1546. }
  1547. /**
  1548. * Add networkChild
  1549. *
  1550. * @param NetworkOrganization $networkChild
  1551. * @return Organization
  1552. */
  1553. public function addNetworkChild(NetworkOrganization $networkChild)
  1554. {
  1555. $this->networkChild[] = $networkChild;
  1556. return $this;
  1557. }
  1558. /**
  1559. * Remove network
  1560. *
  1561. * @param NetworkOrganization $networkChild
  1562. */
  1563. public function removeNetworkChild(NetworkOrganization $networkChild)
  1564. {
  1565. $this->networkChild->removeElement($networkChild);
  1566. }
  1567. /**
  1568. * Get network
  1569. *
  1570. * @return \Doctrine\Common\Collections\Collection
  1571. */
  1572. public function getNetworkChild()
  1573. {
  1574. return ($this->networkChild) ? array_values($this->networkChild->toArray()) : new ArrayCollection();
  1575. }
  1576. /**
  1577. * Add organizationAddressPostal
  1578. *
  1579. * @param OrganizationAddressPostal $organizationAddressPostal
  1580. * @return Person
  1581. */
  1582. public function addOrganizationAddressPostal(OrganizationAddressPostal $organizationAddressPostal)
  1583. {
  1584. $organizationAddressPostal->setOrganization($this);
  1585. $this->organizationAddressPostal[] = $organizationAddressPostal;
  1586. return $this;
  1587. }
  1588. /**
  1589. * Remove personAddressPostal
  1590. *
  1591. * @param OrganizationAddressPostal $organizationAddressPostal
  1592. */
  1593. public function removeOrganizationAddressPostal(OrganizationAddressPostal $organizationAddressPostal)
  1594. {
  1595. $this->organizationAddressPostal->removeElement($organizationAddressPostal);
  1596. }
  1597. /**
  1598. * Get OrganizationAddressPostal
  1599. *
  1600. * @return \Doctrine\Common\Collections\Collection
  1601. */
  1602. public function getOrganizationAddressPostal()
  1603. {
  1604. return $this->organizationAddressPostal;
  1605. }
  1606. /**
  1607. * Get OrganizationAddressPostal
  1608. *
  1609. * @return \Doctrine\Common\Collections\Collection
  1610. */
  1611. public function getOrganizationAddressPostalPrincipal()
  1612. {
  1613. $principal = [];
  1614. foreach ($this->organizationAddressPostal as $organizationAddressPostal){
  1615. if($organizationAddressPostal->getType () === AddressPostalOrganizationTypeEnum::ADDRESS_HEAD_OFFICE){
  1616. $principal = new ArrayCollection([$organizationAddressPostal]);
  1617. }
  1618. }
  1619. return $principal;
  1620. }
  1621. /**
  1622. * Get OrganizationAddressPostal
  1623. *
  1624. * @return \Doctrine\Common\Collections\Collection
  1625. */
  1626. public function getOrganizationAddressPostalContact()
  1627. {
  1628. $contact = [];
  1629. foreach ($this->organizationAddressPostal as $organizationAddressPostal){
  1630. if($organizationAddressPostal->getType () === AddressPostalOrganizationTypeEnum::ADDRESS_CONTACT){
  1631. $contact = new ArrayCollection([$organizationAddressPostal]);
  1632. }
  1633. }
  1634. return $contact;
  1635. }
  1636. /**
  1637. * Get OrganizationAddressPostal
  1638. *
  1639. * @return \Doctrine\Common\Collections\Collection
  1640. */
  1641. public function getOrganizationAddressPostalBill()
  1642. {
  1643. $bill = [];
  1644. foreach ($this->organizationAddressPostal as $organizationAddressPostal){
  1645. if($organizationAddressPostal->getType () === AddressPostalOrganizationTypeEnum::ADDRESS_BILL){
  1646. $bill = new ArrayCollection([$organizationAddressPostal]);
  1647. }
  1648. }
  1649. return $bill;
  1650. }
  1651. /**
  1652. * Add contact Point
  1653. *
  1654. * @param ContactPoint $contactPoint
  1655. * @return Person
  1656. */
  1657. public function addContactPoint(ContactPoint $contactPoint)
  1658. {
  1659. $contactPoint->addOrganization($this);
  1660. $this->contactPoint[] = $contactPoint;
  1661. return $this;
  1662. }
  1663. /**
  1664. * Remove contact Point
  1665. *
  1666. * @param ContactPoint $contactPoint
  1667. */
  1668. public function removeContactPoint(ContactPoint $contactPoint)
  1669. {
  1670. $this->contactPoint->removeElement($contactPoint);
  1671. }
  1672. /**
  1673. * Get contact Point
  1674. *
  1675. * @return \Doctrine\Common\Collections\Collection
  1676. */
  1677. public function getContactPoint()
  1678. {
  1679. return $this->contactPoint;
  1680. }
  1681. /**
  1682. * Get contact Point
  1683. *
  1684. * @return \Doctrine\Common\Collections\Collection
  1685. */
  1686. public function getContactPointPrincipal()
  1687. {
  1688. $principal = [];
  1689. foreach ($this->contactPoint as $contactPoint){
  1690. if($contactPoint->getContactType () === ContactPointTypeEnum::PRINCIPAL){
  1691. $principal = new ArrayCollection([$contactPoint]);
  1692. }
  1693. }
  1694. return $principal;
  1695. }
  1696. /**
  1697. * Get contact Point
  1698. *
  1699. * @return \Doctrine\Common\Collections\Collection
  1700. */
  1701. public function getContactPointContact()
  1702. {
  1703. $contact = [];
  1704. foreach ($this->contactPoint as $contactPoint){
  1705. if($contactPoint->getContactType () === ContactPointTypeEnum::CONTACT){
  1706. $contact = new ArrayCollection([$contactPoint]);
  1707. }
  1708. }
  1709. return $contact;
  1710. }
  1711. /**
  1712. * Get contact Point
  1713. *
  1714. * @return \Doctrine\Common\Collections\Collection
  1715. */
  1716. public function getContactPointBill()
  1717. {
  1718. $bill = [];
  1719. foreach ($this->contactPoint as $contactPoint){
  1720. if($contactPoint->getContactType () === ContactPointTypeEnum::BILL){
  1721. $bill = new ArrayCollection([$contactPoint]);
  1722. }
  1723. }
  1724. return $bill;
  1725. }
  1726. /**
  1727. * Add bankAccount
  1728. *
  1729. * @param BankAccount $bankAccount
  1730. * @return Person
  1731. */
  1732. public function addBankAccount(BankAccount $bankAccount)
  1733. {
  1734. $bankAccount->addOrganization($this);
  1735. $this->bankAccount[] = $bankAccount;
  1736. return $this;
  1737. }
  1738. /**
  1739. * Remove bankAccount
  1740. *
  1741. * @param BankAccount $bankAccount
  1742. */
  1743. public function removeBankAccount(BankAccount $bankAccount)
  1744. {
  1745. $this->bankAccount->removeElement($bankAccount);
  1746. }
  1747. /**
  1748. * Get bankAccount
  1749. *
  1750. * @return \Doctrine\Common\Collections\Collection
  1751. */
  1752. public function getBankAccount()
  1753. {
  1754. return $this->bankAccount;
  1755. }
  1756. /**
  1757. * Sets portailVisibility.
  1758. *
  1759. * @param bool $portailVisibility
  1760. *
  1761. * @return $this
  1762. */
  1763. public function setPortailVisibility($portailVisibility)
  1764. {
  1765. $this->portailVisibility = $portailVisibility;
  1766. return $this;
  1767. }
  1768. /**
  1769. * Gets portailVisibility.
  1770. *
  1771. * @return bool
  1772. */
  1773. public function getPortailVisibility()
  1774. {
  1775. return $this->portailVisibility;
  1776. }
  1777. /**
  1778. * Get settings
  1779. *
  1780. * @return \AppBundle\Entity\Organization\Settings
  1781. */
  1782. public function getSettings()
  1783. {
  1784. return $this->settings;
  1785. }
  1786. /**
  1787. * Set settings
  1788. *
  1789. * @return Organization
  1790. */
  1791. public function setSettings(\AppBundle\Entity\Organization\Settings $settings)
  1792. {
  1793. $settings->setOrganization($this);
  1794. $this->settings = $settings;
  1795. return $this;
  1796. }
  1797. /**
  1798. * Get parameters
  1799. *
  1800. * @return \AppBundle\Entity\Organization\Parameters
  1801. */
  1802. public function getParameters()
  1803. {
  1804. return $this->parameters;
  1805. }
  1806. /**
  1807. * Set settings
  1808. * @param Parameters $parameters
  1809. * @return Parameters
  1810. */
  1811. public function setParameters(Parameters $parameters)
  1812. {
  1813. $this->parameters = $parameters;
  1814. return $this;
  1815. }
  1816. /**
  1817. * @param OrganizationHoliday $personHoliday
  1818. * @return $this
  1819. */
  1820. public function addHoliday(OrganizationHoliday $organizationHoliday)
  1821. {
  1822. $organizationHoliday->setOrganization($this);
  1823. $this->holidays->add($organizationHoliday);
  1824. return $this;
  1825. }
  1826. /**
  1827. * @param OrganizationHoliday $organizationHoliday
  1828. * @return $this
  1829. */
  1830. public function removeHoliday(OrganizationHoliday $organizationHoliday)
  1831. {
  1832. $organizationHoliday->setOrganization(null);
  1833. $this->holidays->removeElement($organizationHoliday);
  1834. return $this;
  1835. }
  1836. /**
  1837. * @param array $organizationHolidays
  1838. * @return $this
  1839. */
  1840. public function setHolidays(array $organizationHolidays)
  1841. {
  1842. $this->holidays = $organizationHolidays;
  1843. return $this;
  1844. }
  1845. /**
  1846. * @return ArrayCollection<OrganizationHoliday>
  1847. */
  1848. public function getHolidays()
  1849. {
  1850. return $this->holidays;
  1851. }
  1852. /**
  1853. * Add organizationLicence
  1854. *
  1855. * @param \AppBundle\Entity\Organization\OrganizationLicence $organizationLicence
  1856. *
  1857. * @return Organization
  1858. */
  1859. public function addOrganizationLicence(\AppBundle\Entity\Organization\OrganizationLicence $organizationLicence)
  1860. {
  1861. $organizationLicence->setOrganization($this);
  1862. $this->organizationLicences[] = $organizationLicence;
  1863. return $this;
  1864. }
  1865. /**
  1866. * Remove organizationLicence
  1867. *
  1868. * @param \AppBundle\Entity\Organization\OrganizationLicence $organizationLicence
  1869. */
  1870. public function removeOrganizationLicence(\AppBundle\Entity\Organization\OrganizationLicence $organizationLicence)
  1871. {
  1872. $this->organizationLicences->removeElement($organizationLicence);
  1873. }
  1874. /**
  1875. * Get organizationLicences
  1876. *
  1877. * @return \Doctrine\Common\Collections\Collection
  1878. */
  1879. public function getOrganizationLicences()
  1880. {
  1881. return $this->organizationLicences;
  1882. }
  1883. /**
  1884. * Set billingSetting
  1885. *
  1886. * @param \AppBundle\Entity\Billing\BillingSetting $billingSetting
  1887. *
  1888. * @return Organization
  1889. */
  1890. public function setBillingSetting(\AppBundle\Entity\Billing\BillingSetting $billingSetting = null)
  1891. {
  1892. // if($billingSetting === null){
  1893. // $billingSetting = new BillingSetting();
  1894. // $billingSetting->setOrganization($this);
  1895. // }
  1896. $this->billingSetting = $billingSetting;
  1897. return $this;
  1898. }
  1899. /**
  1900. * Get billingSetting
  1901. *
  1902. * @return \AppBundle\Entity\Billing\BillingSetting
  1903. */
  1904. public function getBillingSetting()
  1905. {
  1906. return $this->billingSetting;
  1907. }
  1908. /**
  1909. * Set billingExportSetting
  1910. *
  1911. * @param \AppBundle\Entity\Billing\BillingExportSetting $billingExportSetting
  1912. *
  1913. * @return Organization
  1914. */
  1915. public function setBillingExportSetting(\AppBundle\Entity\Billing\BillingExportSetting $billingExportSetting = null)
  1916. {
  1917. if (!is_null($billingExportSetting)) {
  1918. $billingExportSetting->setOrganization($this);
  1919. }
  1920. $this->billingExportSetting = $billingExportSetting;
  1921. return $this;
  1922. }
  1923. /**
  1924. * Get billingExportSetting
  1925. *
  1926. * @return \AppBundle\Entity\Billing\BillingExportSetting
  1927. */
  1928. public function getBillingExportSetting()
  1929. {
  1930. return $this->billingExportSetting;
  1931. }
  1932. /**
  1933. * Add course
  1934. *
  1935. * @param \AppBundle\Entity\Booking\Course $course
  1936. *
  1937. * @return Organization
  1938. */
  1939. public function addCourse(\AppBundle\Entity\Booking\Course $course)
  1940. {
  1941. $course->setOrganization($this);
  1942. $this->courses[] = $course;
  1943. return $this;
  1944. }
  1945. /**
  1946. * Remove course
  1947. *
  1948. * @param \AppBundle\Entity\Booking\Course $course
  1949. */
  1950. public function removeCourse(\AppBundle\Entity\Booking\Course $course)
  1951. {
  1952. $this->courses->removeElement($course);
  1953. }
  1954. /**
  1955. * Get courses
  1956. *
  1957. * @return \Doctrine\Common\Collections\Collection
  1958. */
  1959. public function getCourses()
  1960. {
  1961. return $this->courses;
  1962. }
  1963. /**
  1964. * Add educationalProject
  1965. *
  1966. * @param \AppBundle\Entity\Booking\EducationalProject $educationalProject
  1967. *
  1968. * @return Organization
  1969. */
  1970. public function addEducationalProject(\AppBundle\Entity\Booking\EducationalProject $educationalProject)
  1971. {
  1972. $educationalProject->setOrganization($this);
  1973. $this->educationalProjects[] = $educationalProject;
  1974. return $this;
  1975. }
  1976. /**
  1977. * Remove educationalProject
  1978. *
  1979. * @param \AppBundle\Entity\Booking\EducationalProject $educationalProject
  1980. */
  1981. public function removeEducationalProject(\AppBundle\Entity\Booking\EducationalProject $educationalProject)
  1982. {
  1983. $this->educationalProjects->removeElement($educationalProject);
  1984. }
  1985. /**
  1986. * Get educationalProjects
  1987. *
  1988. * @return \Doctrine\Common\Collections\Collection
  1989. */
  1990. public function getEducationalProjects()
  1991. {
  1992. return $this->educationalProjects;
  1993. }
  1994. /**
  1995. * Add event
  1996. *
  1997. * @param \AppBundle\Entity\Booking\Event $event
  1998. *
  1999. * @return Organization
  2000. */
  2001. public function addEvent(\AppBundle\Entity\Booking\Event $event)
  2002. {
  2003. $event->setOrganization($this);
  2004. $this->events[] = $event;
  2005. return $this;
  2006. }
  2007. /**
  2008. * Remove event
  2009. *
  2010. * @param \AppBundle\Entity\Booking\Event $event
  2011. */
  2012. public function removeEvent(\AppBundle\Entity\Booking\Event $event)
  2013. {
  2014. $this->events->removeElement($event);
  2015. }
  2016. /**
  2017. * Get events
  2018. *
  2019. * @return \Doctrine\Common\Collections\Collection
  2020. */
  2021. public function getEvents()
  2022. {
  2023. return $this->events;
  2024. }
  2025. /**
  2026. * Add examen
  2027. *
  2028. * @param \AppBundle\Entity\Booking\Examen $examen
  2029. *
  2030. * @return Organization
  2031. */
  2032. public function addExamen(\AppBundle\Entity\Booking\Examen $examen)
  2033. {
  2034. $examen->setOrganization($this);
  2035. $this->examens[] = $examen;
  2036. return $this;
  2037. }
  2038. /**
  2039. * Remove examen
  2040. *
  2041. * @param \AppBundle\Entity\Booking\Examen $examen
  2042. */
  2043. public function removeExamen(\AppBundle\Entity\Booking\Examen $examen)
  2044. {
  2045. $this->examens->removeElement($examen);
  2046. }
  2047. /**
  2048. * Get examens
  2049. *
  2050. * @return \Doctrine\Common\Collections\Collection
  2051. */
  2052. public function getExamens()
  2053. {
  2054. return $this->examens;
  2055. }
  2056. /**
  2057. * Add critereNotation
  2058. *
  2059. * @param \AppBundle\Entity\Education\CriteriaNotation $critereNotation
  2060. *
  2061. * @return Organization
  2062. */
  2063. public function addCritereNotation(\AppBundle\Entity\Education\CriteriaNotation $critereNotation)
  2064. {
  2065. $critereNotation->setOrganization($this);
  2066. $this->critereNotations[] = $critereNotation;
  2067. return $this;
  2068. }
  2069. /**
  2070. * Remove critereNotation
  2071. *
  2072. * @param \AppBundle\Entity\Education\CriteriaNotation $critereNotation
  2073. */
  2074. public function removeCritereNotation(\AppBundle\Entity\Education\CriteriaNotation $critereNotation)
  2075. {
  2076. $this->critereNotations->removeElement($critereNotation);
  2077. }
  2078. /**
  2079. * Get critereNotations
  2080. *
  2081. * @return \Doctrine\Common\Collections\Collection
  2082. */
  2083. public function getCritereNotations()
  2084. {
  2085. return $this->critereNotations;
  2086. }
  2087. /**
  2088. * Add cycle
  2089. *
  2090. * @param \AppBundle\Entity\Education\Cycle $cycle
  2091. *
  2092. * @return Organization
  2093. */
  2094. public function addCycle(\AppBundle\Entity\Education\Cycle $cycle)
  2095. {
  2096. $cycle->setOrganization($this);
  2097. $this->cycles[] = $cycle;
  2098. return $this;
  2099. }
  2100. /**
  2101. * Remove cycle
  2102. *
  2103. * @param \AppBundle\Entity\Education\Cycle $cycle
  2104. */
  2105. public function removeCycle(\AppBundle\Entity\Education\Cycle $cycle)
  2106. {
  2107. $this->cycles->removeElement($cycle);
  2108. }
  2109. /**
  2110. * Get cycles
  2111. *
  2112. * @return \Doctrine\Common\Collections\Collection
  2113. */
  2114. public function getCycles()
  2115. {
  2116. return $this->cycles;
  2117. }
  2118. /**
  2119. * Add EducationTiming
  2120. *
  2121. * @param \AppBundle\Entity\Education\EducationTiming $educationTiming
  2122. *
  2123. * @return Organization
  2124. */
  2125. public function addEducationTiming(\AppBundle\Entity\Education\EducationTiming $educationTiming)
  2126. {
  2127. $educationTiming->setOrganization($this);
  2128. $this->educationTimings[] = $educationTiming;
  2129. return $this;
  2130. }
  2131. /**
  2132. * Remove EducationTiming
  2133. *
  2134. * @param \AppBundle\Entity\Education\EducationTiming $educationTiming
  2135. */
  2136. public function removeEducationTiming(\AppBundle\Entity\Education\EducationTiming $educationTiming)
  2137. {
  2138. $this->educationTimings->removeElement($educationTiming);
  2139. }
  2140. /**
  2141. * Get EducationTimings
  2142. *
  2143. * @return \Doctrine\Common\Collections\Collection
  2144. */
  2145. public function getEducationTimings()
  2146. {
  2147. return $this->educationTimings;
  2148. }
  2149. /**
  2150. * Add educationCategory
  2151. *
  2152. * @param \AppBundle\Entity\Education\EducationCategory $educationCategory
  2153. *
  2154. * @return Organization
  2155. */
  2156. public function addEducationCategory(\AppBundle\Entity\Education\EducationCategory $educationCategory)
  2157. {
  2158. $educationCategory->setOrganization($this);
  2159. $this->educationCategories[] = $educationCategory;
  2160. return $this;
  2161. }
  2162. /**
  2163. * Remove educationCategory
  2164. *
  2165. * @param \AppBundle\Entity\Education\EducationCategory $educationCategory
  2166. */
  2167. public function removeEducationCategory(\AppBundle\Entity\Education\EducationCategory $educationCategory)
  2168. {
  2169. $this->educationCategories->removeElement($educationCategory);
  2170. }
  2171. /**
  2172. * Get educationCategories
  2173. *
  2174. * @return \Doctrine\Common\Collections\Collection
  2175. */
  2176. public function getEducationCategories()
  2177. {
  2178. return $this->educationCategories;
  2179. }
  2180. /**
  2181. * Add periodNotation
  2182. *
  2183. * @param \AppBundle\Entity\Education\PeriodNotation $periodNotation
  2184. *
  2185. * @return Organization
  2186. */
  2187. public function addPeriodNotation(\AppBundle\Entity\Education\PeriodNotation $periodNotation)
  2188. {
  2189. $periodNotation->setOrganization($this);
  2190. $this->periodNotations[] = $periodNotation;
  2191. return $this;
  2192. }
  2193. /**
  2194. * Remove periodNotation
  2195. *
  2196. * @param \AppBundle\Entity\Education\PeriodNotation $periodNotation
  2197. */
  2198. public function removePeriodNotation(\AppBundle\Entity\Education\PeriodNotation $periodNotation)
  2199. {
  2200. $this->periodNotations->removeElement($periodNotation);
  2201. }
  2202. /**
  2203. * Get periodNotations
  2204. *
  2205. * @return \Doctrine\Common\Collections\Collection
  2206. */
  2207. public function getPeriodNotations()
  2208. {
  2209. return $this->periodNotations;
  2210. }
  2211. /**
  2212. * Add document
  2213. *
  2214. * @param \AppBundle\Entity\Core\Document $document
  2215. *
  2216. * @return Organization
  2217. */
  2218. public function addDocument(\AppBundle\Entity\Core\Document $document)
  2219. {
  2220. $document->setOrganization($this);
  2221. $this->documents[] = $document;
  2222. return $this;
  2223. }
  2224. /**
  2225. * Remove document
  2226. *
  2227. * @param \AppBundle\Entity\Core\Document $document
  2228. */
  2229. public function removeDocument(\AppBundle\Entity\Core\Document $document)
  2230. {
  2231. $this->documents->removeElement($document);
  2232. }
  2233. /**
  2234. * Get documents
  2235. *
  2236. * @return \Doctrine\Common\Collections\Collection
  2237. */
  2238. public function getDocuments()
  2239. {
  2240. return $this->documents;
  2241. }
  2242. /**
  2243. * Add file
  2244. *
  2245. * @param \AppBundle\Entity\Core\File $file
  2246. *
  2247. * @return Organization
  2248. */
  2249. public function addFile(\AppBundle\Entity\Core\File $file)
  2250. {
  2251. $file->setOrganization($this);
  2252. $this->files[] = $file;
  2253. return $this;
  2254. }
  2255. /**
  2256. * Remove file
  2257. *
  2258. * @param \AppBundle\Entity\Core\File $file
  2259. */
  2260. public function removeFile(\AppBundle\Entity\Core\File $file)
  2261. {
  2262. $this->files->removeElement($file);
  2263. }
  2264. /**
  2265. * Get files
  2266. *
  2267. * @return \Doctrine\Common\Collections\Collection
  2268. */
  2269. public function getFiles()
  2270. {
  2271. return $this->files;
  2272. }
  2273. /**
  2274. * Add notification
  2275. *
  2276. * @param \AppBundle\Entity\Core\Notification $notification
  2277. *
  2278. * @return Organization
  2279. */
  2280. public function addNotification(\AppBundle\Entity\Core\Notification $notification)
  2281. {
  2282. $notification->setRecipientOrganization($this);
  2283. $this->notifications[] = $notification;
  2284. return $this;
  2285. }
  2286. /**
  2287. * Remove notification
  2288. *
  2289. * @param \AppBundle\Entity\Core\Notification $notification
  2290. */
  2291. public function removeNotification(\AppBundle\Entity\Core\Notification $notification)
  2292. {
  2293. $this->notifications->removeElement($notification);
  2294. }
  2295. /**
  2296. * Get notifications
  2297. *
  2298. * @return \Doctrine\Common\Collections\Collection
  2299. */
  2300. public function getNotifications()
  2301. {
  2302. return $this->notifications;
  2303. }
  2304. /**
  2305. * Add message
  2306. *
  2307. * @param \AppBundle\Entity\Message\Message $message
  2308. *
  2309. * @return Organization
  2310. */
  2311. public function addMessage(\AppBundle\Entity\Message\Message $message)
  2312. {
  2313. $message->setOrganization($this);
  2314. $this->messages[] = $message;
  2315. return $this;
  2316. }
  2317. /**
  2318. * Remove message
  2319. *
  2320. * @param \AppBundle\Entity\Message\Message $message
  2321. */
  2322. public function removeMessage(\AppBundle\Entity\Message\Message $message)
  2323. {
  2324. $this->messages->removeElement($message);
  2325. }
  2326. /**
  2327. * Get messages
  2328. *
  2329. * @return \Doctrine\Common\Collections\Collection
  2330. */
  2331. public function getMessages()
  2332. {
  2333. return $this->messages;
  2334. }
  2335. /**
  2336. * Add activity
  2337. *
  2338. * @param \AppBundle\Entity\Organization\Activity $activity
  2339. *
  2340. * @return Organization
  2341. */
  2342. public function addActivity(\AppBundle\Entity\Organization\Activity $activity)
  2343. {
  2344. $activity->setOrganization($this);
  2345. $this->activities[] = $activity;
  2346. return $this;
  2347. }
  2348. /**
  2349. * Remove activity
  2350. *
  2351. * @param \AppBundle\Entity\Organization\Activity $activity
  2352. */
  2353. public function removeActivity(\AppBundle\Entity\Organization\Activity $activity)
  2354. {
  2355. $this->activities->removeElement($activity);
  2356. }
  2357. /**
  2358. * Get activities
  2359. *
  2360. * @return \Doctrine\Common\Collections\Collection
  2361. */
  2362. public function getActivities()
  2363. {
  2364. return $this->activities;
  2365. }
  2366. /**
  2367. * Add jury
  2368. *
  2369. * @param \AppBundle\Entity\Organization\Jury $jury
  2370. *
  2371. * @return Organization
  2372. */
  2373. public function addJury(\AppBundle\Entity\Organization\Jury $jury)
  2374. {
  2375. $jury->setOrganization($this);
  2376. $this->juries[] = $jury;
  2377. return $this;
  2378. }
  2379. /**
  2380. * Remove jury
  2381. *
  2382. * @param \AppBundle\Entity\Organization\Jury $jury
  2383. */
  2384. public function removeJury(\AppBundle\Entity\Organization\Jury $jury)
  2385. {
  2386. $this->juries->removeElement($jury);
  2387. }
  2388. /**
  2389. * Get juries
  2390. *
  2391. * @return \Doctrine\Common\Collections\Collection
  2392. */
  2393. public function getJuries()
  2394. {
  2395. return $this->juries;
  2396. }
  2397. /**
  2398. * Add commission
  2399. *
  2400. * @param \AppBundle\Entity\Person\Commission $commission
  2401. *
  2402. * @return Organization
  2403. */
  2404. public function addCommission(\AppBundle\Entity\Person\Commission $commission)
  2405. {
  2406. $commission->setOrganization($this);
  2407. $this->commissions[] = $commission;
  2408. return $this;
  2409. }
  2410. /**
  2411. * Remove commission
  2412. *
  2413. * @param \AppBundle\Entity\Person\Commission $commission
  2414. */
  2415. public function removeCommission(\AppBundle\Entity\Person\Commission $commission)
  2416. {
  2417. $this->commissions->removeElement($commission);
  2418. }
  2419. /**
  2420. * Get commissions
  2421. *
  2422. * @return \Doctrine\Common\Collections\Collection
  2423. */
  2424. public function getCommissions()
  2425. {
  2426. return $this->commissions;
  2427. }
  2428. /**
  2429. * Add place
  2430. *
  2431. * @param \AppBundle\Entity\Place\Place $place
  2432. *
  2433. * @return Organization
  2434. */
  2435. public function addPlace(\AppBundle\Entity\Place\Place $place)
  2436. {
  2437. $place->setOrganization($this);
  2438. $this->places[] = $place;
  2439. return $this;
  2440. }
  2441. /**
  2442. * Remove place
  2443. *
  2444. * @param \AppBundle\Entity\Place\Place $place
  2445. */
  2446. public function removePlace(\AppBundle\Entity\Place\Place $place)
  2447. {
  2448. $this->places->removeElement($place);
  2449. }
  2450. /**
  2451. * Get places
  2452. *
  2453. * @return \Doctrine\Common\Collections\Collection
  2454. */
  2455. public function getPlaces()
  2456. {
  2457. return $this->places;
  2458. }
  2459. /**
  2460. * Add attendance
  2461. *
  2462. * @param \AppBundle\Entity\Booking\Attendance $attendence
  2463. *
  2464. * @return Organization
  2465. */
  2466. public function addAttendance(\AppBundle\Entity\Booking\Attendance $attendance)
  2467. {
  2468. $attendance->setOrganization($this);
  2469. $this->attendances[] = $attendance;
  2470. return $this;
  2471. }
  2472. /**
  2473. * Remove attendance
  2474. *
  2475. * @param \AppBundle\Entity\Booking\Attendance $attendance
  2476. */
  2477. public function removeAttendance(\AppBundle\Entity\Booking\Attendance $attendance)
  2478. {
  2479. $this->attendances->removeElement($attendance);
  2480. }
  2481. /**
  2482. * Get attendances
  2483. *
  2484. * @return \Doctrine\Common\Collections\Collection
  2485. */
  2486. public function getAttendances()
  2487. {
  2488. return $this->attendances;
  2489. }
  2490. /**
  2491. * Add equipment
  2492. *
  2493. * @param \AppBundle\Entity\Product\Equipment $equipment
  2494. *
  2495. * @return Organization
  2496. */
  2497. public function addEquipment(\AppBundle\Entity\Product\Equipment $equipment)
  2498. {
  2499. $equipment->setOrganization($this);
  2500. $this->equipments[] = $equipment;
  2501. return $this;
  2502. }
  2503. /**
  2504. * Remove equipment
  2505. *
  2506. * @param \AppBundle\Entity\Product\Equipment $equipment
  2507. */
  2508. public function removeEquipment(\AppBundle\Entity\Product\Equipment $equipment)
  2509. {
  2510. $this->equipments->removeElement($equipment);
  2511. }
  2512. /**
  2513. * Get equipments
  2514. *
  2515. * @return \Doctrine\Common\Collections\Collection
  2516. */
  2517. public function getEquipments()
  2518. {
  2519. return $this->equipments;
  2520. }
  2521. /**
  2522. * Add intangible
  2523. *
  2524. * @param \AppBundle\Entity\Product\Intangible $intangible
  2525. *
  2526. * @return Organization
  2527. */
  2528. public function addIntangible(\AppBundle\Entity\Product\Intangible $intangible)
  2529. {
  2530. $intangible->setOrganization($this);
  2531. $this->intangibles[] = $intangible;
  2532. return $this;
  2533. }
  2534. /**
  2535. * Remove intangible
  2536. *
  2537. * @param \AppBundle\Entity\Product\Intangible $intangible
  2538. */
  2539. public function removeIntangible(\AppBundle\Entity\Product\Intangible $intangible)
  2540. {
  2541. $this->intangibles->removeElement($intangible);
  2542. }
  2543. /**
  2544. * Get intangibles
  2545. *
  2546. * @return \Doctrine\Common\Collections\Collection
  2547. */
  2548. public function getIntangibles()
  2549. {
  2550. return $this->intangibles;
  2551. }
  2552. public function checkIfFFEC()
  2553. {
  2554. $isFFEC = false;
  2555. $networksOrganizations = $this->getNetwork();
  2556. foreach ($networksOrganizations as $netOrga) {
  2557. if ('FFEC' === $netOrga->getNetwork()->getName()) {
  2558. $isFFEC = true;
  2559. break;
  2560. }
  2561. }
  2562. return $isFFEC;
  2563. }
  2564. /**
  2565. * Get the cms Id
  2566. *
  2567. * @return int
  2568. */
  2569. public function getCmsId()
  2570. {
  2571. return $this->cmsId;
  2572. }
  2573. /**
  2574. * Sets the cms Id
  2575. *
  2576. * @param int $cmsId
  2577. * @return $this
  2578. */
  2579. public function setCmsId($cmsId)
  2580. {
  2581. $this->cmsId = $cmsId;
  2582. return $this;
  2583. }
  2584. /**
  2585. * Get children
  2586. *
  2587. * @return \Doctrine\Common\Collections\Collection
  2588. */
  2589. public function getHasChildren()
  2590. {
  2591. return count($this->networkChild) > 0;
  2592. }
  2593. /**
  2594. * Gets seniority.
  2595. *
  2596. * @return int
  2597. */
  2598. public function getEmailAdminAccess()
  2599. {
  2600. $email = null;
  2601. $criteria = Criteria::create()->where(Criteria::expr()->eq("adminAccess", true));
  2602. $adminAccess = $this->getAccess()->matching($criteria);
  2603. if (!empty($adminAccess) && !is_null($adminAccess[0])) {
  2604. $adminAccess = $adminAccess[0];
  2605. $principalContactPoint = $adminAccess->getPerson()->getContactPointPrincipal();
  2606. if (!empty($principalContactPoint))
  2607. $email = $principalContactPoint->getEmail();
  2608. }
  2609. return $email;
  2610. }
  2611. /**
  2612. * Sets email.
  2613. *
  2614. * @param string $email
  2615. *
  2616. * @return $this
  2617. */
  2618. public function setEmailAdminAccess($email)
  2619. {
  2620. $criteria = Criteria::create()->where(Criteria::expr()->eq("adminAccess", true));
  2621. $adminAccess = $this->getAccess()->matching($criteria);
  2622. if (!empty($adminAccess) && !is_null($adminAccess[0])) {
  2623. $adminAccess = $adminAccess[0];
  2624. $principalContactPoint = $adminAccess->getPerson()->getContactPointPrincipal();
  2625. if (empty($principalContactPoint)){
  2626. $principalContactPoint = new ContactPoint();
  2627. $principalContactPoint->setContactType(ContactPointTypeEnum::PRINCIPAL);
  2628. $adminAccess->getPerson()->addContactPoint($principalContactPoint);
  2629. }
  2630. $principalContactPoint->setEmail($email);
  2631. }
  2632. return $this;
  2633. }
  2634. /**
  2635. * Gets seniority.
  2636. *
  2637. * @return int
  2638. */
  2639. public function getLoginAdminAccess()
  2640. {
  2641. $email = null;
  2642. $criteria = Criteria::create()->where(Criteria::expr()->eq("adminAccess", true));
  2643. $adminAccess = $this->getAccess()->matching($criteria);
  2644. if (!empty($adminAccess) && !is_null($adminAccess[0])) {
  2645. $adminAccess = $adminAccess[0];
  2646. $login = $adminAccess->getPerson()->getUsername();
  2647. }
  2648. return $login;
  2649. }
  2650. /**
  2651. * Gets seniority.
  2652. *
  2653. * @return int
  2654. */
  2655. public function getIdAdminAccess()
  2656. {
  2657. $idAdminAccess = null;
  2658. $criteria = Criteria::create()->where(Criteria::expr()->eq("adminAccess", true));
  2659. $adminAccess = $this->getAccess()->matching($criteria);
  2660. if (!empty($adminAccess) && !is_null($adminAccess[0])) {
  2661. $adminAccess = $adminAccess[0];
  2662. $idAdminAccess = $adminAccess->getId();
  2663. }
  2664. return $idAdminAccess;
  2665. }
  2666. /**
  2667. *
  2668. * {@inheritdoc}
  2669. */
  2670. public function getContact()
  2671. {
  2672. return $this;
  2673. }
  2674. /**
  2675. *
  2676. * {@inheritdoc}
  2677. */
  2678. public function getContactAddress()
  2679. {
  2680. return $this->getAddressPostalForType(\AppBundle\Enum\Core\AddressPostalOrganizationTypeEnum::ADDRESS_HEAD_OFFICE);
  2681. }
  2682. /**
  2683. *
  2684. * {@inheritdoc}
  2685. */
  2686. public function getContactName()
  2687. {
  2688. return $this->getName();
  2689. }
  2690. /**
  2691. *
  2692. * {@inheritdoc}
  2693. */
  2694. public function getContactContactPoint()
  2695. {
  2696. return $this->getContactPointForType(ContactPointTypeEnum::PRINCIPAL);
  2697. }
  2698. /**
  2699. * Add access
  2700. *
  2701. * @param \AppBundle\Entity\AccessAndFunction\Access $access
  2702. *
  2703. * @return access
  2704. */
  2705. public function addAccess(\AppBundle\Entity\AccessAndFunction\Access $access)
  2706. {
  2707. $access->setOrganization($this);
  2708. $this->access[] = $access;
  2709. return $this;
  2710. }
  2711. /**
  2712. * Remove access
  2713. *
  2714. * @param \AppBundle\Entity\Organization\Organization $access
  2715. */
  2716. public function removeAccess(\AppBundle\Entity\AccessAndFunction\Access $access)
  2717. {
  2718. $this->access->removeElement($access);
  2719. }
  2720. /**
  2721. * Get access
  2722. *
  2723. * @return access
  2724. */
  2725. public function getAccess()
  2726. {
  2727. return $this->access;
  2728. }
  2729. /**
  2730. * Set access
  2731. *
  2732. * @param array $access
  2733. * @return $this
  2734. */
  2735. public function setAccess(array $accesses)
  2736. {
  2737. foreach ($accesses as $access) {
  2738. $access->setOrganization($this);
  2739. }
  2740. $this->access = new ArrayCollection($accesses);
  2741. return $this;
  2742. }
  2743. /**
  2744. * Set onlineRegistrationSettings
  2745. *
  2746. * @param \AppBundle\Entity\Organization\OnlineRegistrationSettings $onlineRegistrationSettings
  2747. *
  2748. * @return Organization
  2749. */
  2750. public function setOnlineRegistrationSettings(\AppBundle\Entity\Organization\OnlineRegistrationSettings $onlineRegistrationSettings = null)
  2751. {
  2752. $onlineRegistrationSettings->setOrganization($this);
  2753. $this->onlineRegistrationSettings = $onlineRegistrationSettings;
  2754. return $this;
  2755. }
  2756. /**
  2757. * Get onlineRegistrationSettings
  2758. *
  2759. * @return \AppBundle\Entity\Organization\OnlineRegistrationSettings
  2760. */
  2761. public function getOnlineRegistrationSettings()
  2762. {
  2763. return $this->onlineRegistrationSettings;
  2764. }
  2765. /**
  2766. * Add cotisationByYear
  2767. *
  2768. * @param \AppBundle\Entity\Organization\CotisationByYear $cotisationByYear
  2769. *
  2770. * @return Organization
  2771. */
  2772. public function addCotisationByYear(\AppBundle\Entity\Organization\CotisationByYear $cotisationByYear)
  2773. {
  2774. $cotisationByYear->setOrganization($this);
  2775. $this->cotisationByYears[] = $cotisationByYear;
  2776. return $this;
  2777. }
  2778. /**
  2779. * Remove cotisationByYear
  2780. *
  2781. * @param \AppBundle\Entity\Organization\CotisationByYear $cotisationByYear
  2782. */
  2783. public function removeCotisationByYear(\AppBundle\Entity\Organization\CotisationByYear $cotisationByYear)
  2784. {
  2785. $this->cotisationByYears->removeElement($cotisationByYear);
  2786. }
  2787. /**
  2788. * Get cotisationByYears
  2789. *
  2790. * @return \Doctrine\Common\Collections\Collection
  2791. */
  2792. public function getCotisationByYears()
  2793. {
  2794. return $this->cotisationByYears;
  2795. }
  2796. /**
  2797. * @return string
  2798. */
  2799. public function getTemporaryFieldForCMF()
  2800. {
  2801. return $this->temporaryFieldForCMF;
  2802. }
  2803. /**
  2804. * @param string $temporaryFieldForCMF
  2805. */
  2806. public function setTemporaryFieldForCMF(string $temporaryFieldForCMF)
  2807. {
  2808. $this->temporaryFieldForCMF = $temporaryFieldForCMF;
  2809. return $this;
  2810. }
  2811. /**
  2812. * Add typeOfPractice
  2813. *
  2814. * @param TypeOfPractice $typeOfPractices
  2815. *
  2816. * @return Organization
  2817. */
  2818. public function addTypeOfPractice(TypeOfPractice $typeOfPractices)
  2819. {
  2820. $this->typeOfPractices[] = $typeOfPractices;
  2821. return $this;
  2822. }
  2823. /**
  2824. * Remove typeOfPractice
  2825. *
  2826. * @param TypeOfPractice $typeOfPractices
  2827. */
  2828. public function removeTypeOfPractice(TypeOfPractice $typeOfPractices)
  2829. {
  2830. $this->typeOfPractices->removeElement($typeOfPractices);
  2831. }
  2832. /**
  2833. * Get typeOfPractices
  2834. *
  2835. * @return \Doctrine\Common\Collections\Collection
  2836. */
  2837. public function getTypeOfPractices()
  2838. {
  2839. return $this->typeOfPractices;
  2840. }
  2841. /**
  2842. * Set otherPractice
  2843. *
  2844. * @param string $otherPractice
  2845. *
  2846. * @return Organization
  2847. */
  2848. public function setOtherPractice($otherPractice)
  2849. {
  2850. $this->otherPractice = $otherPractice;
  2851. return $this;
  2852. }
  2853. /**
  2854. * Get otherPractice
  2855. *
  2856. * @return string
  2857. */
  2858. public function getOtherPractice()
  2859. {
  2860. return $this->otherPractice;
  2861. }
  2862. /**
  2863. * Add tag
  2864. *
  2865. * @param \AppBundle\Entity\Core\Tagg $tag
  2866. *
  2867. * @return Organization
  2868. */
  2869. public function addTag(\AppBundle\Entity\Core\Tagg $tag)
  2870. {
  2871. $this->tags[] = $tag;
  2872. return $this;
  2873. }
  2874. /**
  2875. * Remove tag
  2876. *
  2877. * @param \AppBundle\Entity\Core\Tagg $tag
  2878. */
  2879. public function removeTag(\AppBundle\Entity\Core\Tagg $tag)
  2880. {
  2881. $this->tags->removeElement($tag);
  2882. }
  2883. /**
  2884. * Get tags
  2885. *
  2886. * @return \Doctrine\Common\Collections\Collection
  2887. */
  2888. public function getTags()
  2889. {
  2890. return $this->tags;
  2891. }
  2892. /**
  2893. * Set youtube
  2894. *
  2895. * @param string $youtube
  2896. *
  2897. * @return Organization
  2898. */
  2899. public function setYoutube($youtube)
  2900. {
  2901. $this->youtube = $youtube;
  2902. return $this;
  2903. }
  2904. /**
  2905. * Get youtube
  2906. *
  2907. * @return string
  2908. */
  2909. public function getYoutube()
  2910. {
  2911. return $this->youtube;
  2912. }
  2913. /**
  2914. * Add organizationArticle
  2915. *
  2916. * @param \AppBundle\Entity\Organization\OrganizationArticle $organizationArticle
  2917. *
  2918. * @return Organization
  2919. */
  2920. public function addOrganizationArticle(\AppBundle\Entity\Organization\OrganizationArticle $organizationArticle)
  2921. {
  2922. $organizationArticle->setOrganization($this);
  2923. $this->organizationArticles[] = $organizationArticle;
  2924. return $this;
  2925. }
  2926. /**
  2927. * Remove organizationArticle
  2928. *
  2929. * @param \AppBundle\Entity\Organization\OrganizationArticle $organizationArticle
  2930. */
  2931. public function removeOrganizationArticle(\AppBundle\Entity\Organization\OrganizationArticle $organizationArticle)
  2932. {
  2933. $this->organizationArticles->removeElement($organizationArticle);
  2934. }
  2935. /**
  2936. * Get organizationArticles
  2937. *
  2938. * @return \Doctrine\Common\Collections\Collection
  2939. */
  2940. public function getOrganizationArticles()
  2941. {
  2942. return $this->organizationArticles;
  2943. }
  2944. }