File.php 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989
  1. <?php
  2. namespace AppBundle\Entity\Core;
  3. use AppBundle\AppBundle;
  4. use AppBundle\Entity\AccessWish\DocumentWish;
  5. use AppBundle\Entity\Booking\CalendarSynchro;
  6. use AppBundle\Entity\Booking\EventReport;
  7. use AppBundle\Entity\Message\TemplateSystem;
  8. use AppBundle\Entity\Organization\Organization;
  9. use AppBundle\Entity\Organization\Parameters;
  10. use AppBundle\Entity\Person\Person;
  11. use Doctrine\Common\Collections\ArrayCollection;
  12. use Doctrine\ORM\Mapping as ORM;
  13. use Dunglas\ApiBundle\Annotation\Iri;
  14. use Symfony\Component\Serializer\Annotation\Groups;
  15. use Symfony\Component\Validator\Constraints as Assert;
  16. use AppBundle\Entity\Traits\TimestampableEntity;
  17. use AppBundle\Entity\Traits\CreatorUpdaterEntity;
  18. use Symfony\Component\Validator\Context\ExecutionContextInterface;
  19. /**
  20. * Tout type de fichier associé à un Access ou une Organization
  21. *
  22. * @Iri("http://schema.org/File")
  23. */
  24. #[ORM\Entity(repositoryClass: 'AppBundle\Entity\Core\Repository\FileRepository')]
  25. #[ORM\Table(name: 'File')]
  26. #[ORM\Index(name: 'visibility', columns: ['visibility'])]
  27. #[ORM\Index(name: 'folder', columns: ['folder'])]
  28. class File
  29. {
  30. use TimestampableEntity;
  31. use CreatorUpdaterEntity;
  32. /**
  33. * @var int
  34. */
  35. #[ORM\Column(type: 'integer')]
  36. #[ORM\Id]
  37. #[ORM\GeneratedValue(strategy: 'AUTO')]
  38. #[Groups(['file', 'report_card', 'email_detail', 'access_details_person', 'organization_details', 'booking_event_documents', 'event_details', 'student_registration_person', 'onlineregistration_infos', 'worksbyusers_db_work'])]
  39. private $id;
  40. /**
  41. * @var string
  42. *
  43. *
  44. */
  45. #[ORM\Column(type: 'string', length: 255)]
  46. #[Assert\Type(type: 'string')]
  47. #[Assert\NotNull]
  48. private $slug;
  49. /**
  50. * @var string
  51. *
  52. *
  53. */
  54. #[ORM\Column(type: 'string', length: 255)]
  55. #[Assert\Type(type: 'string')]
  56. #[Assert\NotNull]
  57. private $path;
  58. /**
  59. * @var string
  60. */
  61. #[ORM\Column(type: 'string', length: 255)]
  62. #[Assert\Type(type: 'string')]
  63. #[Assert\NotNull]
  64. #[Groups(['file', 'report_card', 'access_details_person', 'booking_event_documents_files', 'event_details_files', 'event_details_eventreports', 'my_bills_show_bills', 'access_files_person', 'email_detail_files', 'student_registration_person', 'onlineregistration_infos_introductionfiles', 'onlineregistration_infos_introductionfilesnewenrolments', 'worksbyusers_db_work'])]
  65. private $name;
  66. /**
  67. * @var string
  68. */
  69. #[ORM\Column(type: 'string', length: 255, nullable: true)]
  70. #[Assert\Type(type: 'string')]
  71. #[Groups(['file'])]
  72. private $mimeType;
  73. /**
  74. * @var Person
  75. */
  76. #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Person\Person', inversedBy: 'files')]
  77. #[ORM\JoinColumn(name: 'person_id', referencedColumnName: 'id')]
  78. #[Groups(['file', 'booking_event_documents_files'])]
  79. private $person;
  80. /**
  81. * @var Organization
  82. */
  83. #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Organization\Organization', inversedBy: 'files')]
  84. #[ORM\JoinColumn(name: 'organization_id', referencedColumnName: 'id')]
  85. #[Groups(['file', 'booking_event_documents_files', 'email_detail_files'])]
  86. private $organization;
  87. /**
  88. * @var string
  89. */
  90. #[ORM\Column(type: 'string')]
  91. #[Assert\Type(type: 'string')]
  92. #[Assert\NotNull]
  93. #[Assert\Choice(callback: ['\AppBundle\Enum\Core\FileVisibilityEnum', 'toArray'])]
  94. #[Groups(['file'])]
  95. private $visibility;
  96. /**
  97. * @var array
  98. */
  99. #[ORM\Column(type: 'json_array', nullable: true)]
  100. #[Groups(['file'])]
  101. private $accessRoles;
  102. /**
  103. * @var ArrayCollection<Person>
  104. */
  105. #[ORM\ManyToMany(targetEntity: 'AppBundle\Entity\Person\Person', inversedBy: 'personFiles')]
  106. #[Groups(['file_person'])]
  107. private $accessPersons;
  108. #[ORM\Column(type: 'string', nullable: true)]
  109. #[Assert\Type(type: 'string')]
  110. #[Groups(['file', 'booking_event_files', 'booking_event_documents_files'])]
  111. private $config;
  112. /**
  113. * @var string
  114. */
  115. #[ORM\Column(type: 'string')]
  116. #[Assert\Type(type: 'string')]
  117. #[Assert\NotNull]
  118. #[Assert\Choice(callback: ['\AppBundle\Enum\Core\FileFolderEnum', 'toArray'])]
  119. #[Groups(['file', 'booking_event_files', 'booking_event_documents_files'])]
  120. private $folder;
  121. /**
  122. * @var ArrayCollection<Event>
  123. */
  124. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Booking\Event', mappedBy: 'image')]
  125. #[Groups(['file_event'])]
  126. private $events;
  127. /**
  128. * @var ArrayCollection<Network>
  129. */
  130. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Network\Network', mappedBy: 'image')]
  131. #[Groups(['file_network'])]
  132. private $networks;
  133. /**
  134. * @var ArrayCollection<Activity>
  135. */
  136. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Organization\Activity', mappedBy: 'logo')]
  137. #[Groups(['file_activity'])]
  138. private $activityLogos;
  139. /**
  140. * @var ArrayCollection<Activity>
  141. */
  142. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Organization\Activity', mappedBy: 'imageActivity')]
  143. #[Groups(['file_activity'])]
  144. private $activityImages;
  145. /**
  146. * @var ArrayCollection<Organization>
  147. */
  148. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Organization\Organization', mappedBy: 'logo')]
  149. #[Groups(['file_organization'])]
  150. private $organizationLogos;
  151. /**
  152. * @var ArrayCollection<Organization>
  153. */
  154. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Organization\Organization', mappedBy: 'image')]
  155. #[Groups(['file_organization'])]
  156. private $organizationImages;
  157. /**
  158. * @var ArrayCollection<Person>
  159. */
  160. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Person\Person', mappedBy: 'image')]
  161. #[Groups(['file_person'])]
  162. private $personImages;
  163. /**
  164. * @var Parameters
  165. */
  166. #[ORM\OneToOne(targetEntity: 'AppBundle\Entity\Organization\Parameters', mappedBy: 'qrCode', fetch: 'EAGER')]
  167. #[Groups(['file'])]
  168. private $qrCode;
  169. /**
  170. * @var EventReport
  171. */
  172. #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Booking\EventReport', inversedBy: 'files')]
  173. #[ORM\JoinColumn(onDelete: 'CASCADE')]
  174. #[Groups(['file'])]
  175. private $eventReport;
  176. /**
  177. * @var DocumentWish
  178. */
  179. #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\AccessWish\DocumentWish', inversedBy: 'files', cascade: ['persist'])]
  180. #[ORM\JoinColumn(onDelete: 'CASCADE')]
  181. #[Groups(['file'])]
  182. private $documentWish;
  183. /**
  184. * @var DocumentWish
  185. */
  186. #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Organization\OnlineRegistrationSettings', inversedBy: 'introductionFiles', cascade: ['persist'])]
  187. #[ORM\JoinColumn(onDelete: 'CASCADE')]
  188. #[Groups(['file'])]
  189. private $onlineRegistrationSetting;
  190. /**
  191. * @var DocumentWish
  192. */
  193. #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Organization\OnlineRegistrationSettings', inversedBy: 'introductionFilesNewEnrolments', cascade: ['persist'])]
  194. #[ORM\JoinColumn(onDelete: 'CASCADE')]
  195. #[Groups(['file'])]
  196. private $onlineRegistrationSettingNewEnrolments;
  197. /**
  198. * @var DocumentWish
  199. */
  200. #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Booking\Work', inversedBy: 'files', cascade: ['persist'])]
  201. #[ORM\JoinColumn(onDelete: 'CASCADE')]
  202. #[Groups(['file'])]
  203. private $work;
  204. /**
  205. * @var CalendarSynchro
  206. */
  207. #[ORM\OneToOne(targetEntity: 'AppBundle\Entity\Booking\CalendarSynchro', mappedBy: 'file', fetch: 'EAGER')]
  208. #[Groups(['file'])]
  209. private $calendarSynchro;
  210. /**
  211. * @var string
  212. */
  213. #[ORM\Column(type: 'string', options: ['default' => 'NONE'])]
  214. #[Assert\Type(type: 'string')]
  215. #[Assert\NotNull]
  216. #[Assert\Choice(callback: ['\AppBundle\Enum\Core\FileTypeEnum', 'toArray'])]
  217. #[Groups(['file', 'booking_event_files', 'access_files_person'])]
  218. private $type = "NONE";
  219. /**
  220. * @var \DateTime
  221. */
  222. #[ORM\Column(type: 'date', nullable: true)]
  223. #[Assert\Date]
  224. #[Groups(['file', 'access_files_person'])]
  225. private $availabilityDate;
  226. /**
  227. * @var integer
  228. */
  229. #[ORM\Column(type: 'integer', nullable: true)]
  230. #[Groups(['file'])]
  231. private $size;
  232. /**
  233. * @var bool
  234. */
  235. #[ORM\Column(type: 'boolean', options: ['default' => 0])]
  236. #[Assert\Type(type: 'boolean')]
  237. #[Assert\NotNull]
  238. #[Groups(['file'])]
  239. private $isTemporaryFile = false;
  240. /**
  241. * @var TemplateSystem
  242. */
  243. #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Message\TemplateSystem', inversedBy: 'files', cascade: ['persist'])]
  244. #[ORM\JoinColumn(onDelete: 'CASCADE')]
  245. #[Groups(['file'])]
  246. private $templateSystem;
  247. public function __construct()
  248. {
  249. $this->accessPersons = new ArrayCollection();
  250. $this->events = new ArrayCollection();
  251. $this->networks = new ArrayCollection();
  252. $this->activityLogos = new ArrayCollection();
  253. $this->organizationLogos = new ArrayCollection();
  254. $this->organizationImages = new ArrayCollection();
  255. $this->personImages = new ArrayCollection();
  256. }
  257. /**
  258. * Sets id.
  259. *
  260. * @param int $id
  261. *
  262. * @return $this
  263. */
  264. public function setId($id)
  265. {
  266. $this->id = $id;
  267. return $this;
  268. }
  269. /**
  270. * Gets id.
  271. *
  272. * @return int
  273. */
  274. public function getId()
  275. {
  276. return $this->id;
  277. }
  278. /**
  279. * Gets slug.
  280. *
  281. * @return string
  282. */
  283. public function getSlug() {
  284. return $this->slug;
  285. }
  286. /**
  287. * Sets slug.
  288. *
  289. * @param string $slug
  290. * @return $this
  291. */
  292. public function setSlug($slug) {
  293. $this->slug = $slug;
  294. return $this;
  295. }
  296. /**
  297. * Sets path.
  298. *
  299. * @param string $path
  300. *
  301. * @return $this
  302. */
  303. public function setPath($path)
  304. {
  305. $this->path = $path;
  306. return $this;
  307. }
  308. /**
  309. * Gets path.
  310. *
  311. * @return string
  312. */
  313. public function getPath()
  314. {
  315. return $this->path;
  316. }
  317. /**
  318. * Sets name.
  319. *
  320. * @param string $name
  321. *
  322. * @return $this
  323. */
  324. public function setName($name)
  325. {
  326. $this->name = $name;
  327. return $this;
  328. }
  329. /**
  330. * Gets name.
  331. *
  332. * @return string
  333. */
  334. public function getName()
  335. {
  336. return $this->name;
  337. }
  338. /**
  339. * Sets mimeType.
  340. *
  341. * @param string $mimeType
  342. *
  343. * @return $this
  344. */
  345. public function setMimeType($mimeType)
  346. {
  347. $this->mimeType = $mimeType;
  348. return $this;
  349. }
  350. /**
  351. * Gets mimeType.
  352. *
  353. * @return string
  354. */
  355. public function getMimeType()
  356. {
  357. return $this->mimeType;
  358. }
  359. /**
  360. * @return Person
  361. */
  362. public function getPerson()
  363. {
  364. return $this->person;
  365. }
  366. /**
  367. * @param Person $person
  368. * @return $this
  369. */
  370. public function setPerson($person)
  371. {
  372. $this->person = $person;
  373. return $this;
  374. }
  375. /**
  376. * @return Organization
  377. */
  378. public function getOrganization()
  379. {
  380. return $this->organization;
  381. }
  382. /**
  383. * @param Organization $organization
  384. * @return $this
  385. */
  386. public function setOrganization($organization)
  387. {
  388. $this->organization = $organization;
  389. return $this;
  390. }
  391. /**
  392. * Adds person can access the file.
  393. *
  394. * @param Person $person
  395. *
  396. * @return $this
  397. */
  398. public function addAccessPerson(Person $person)
  399. {
  400. $this->accessPersons->add($person);
  401. return $this;
  402. }
  403. /**
  404. * Removes person has access the file.
  405. *
  406. * @param Person $person
  407. *
  408. * @return $this
  409. */
  410. public function removeAccessPerson(Person $person)
  411. {
  412. $this->accessPersons->removeElement($person);
  413. return $this;
  414. }
  415. /**
  416. * Gets accessPersons.
  417. *
  418. * @return ArrayCollection<Person>
  419. */
  420. public function getAccessPersons()
  421. {
  422. return $this->accessPersons;
  423. }
  424. /**
  425. * @return string
  426. */
  427. public function getVisibility()
  428. {
  429. return $this->visibility;
  430. }
  431. /**
  432. * @param string $visibility
  433. * @return $this
  434. */
  435. public function setVisibility($visibility)
  436. {
  437. $this->visibility = $visibility;
  438. return $this;
  439. }
  440. /**
  441. * @return array
  442. */
  443. public function getAccessRoles()
  444. {
  445. return $this->accessRoles;
  446. }
  447. /**
  448. * @param array $accessRoles
  449. * @return $this
  450. */
  451. public function setAccessRoles($accessRoles)
  452. {
  453. $this->accessRoles = $accessRoles;
  454. return $this;
  455. }
  456. /**
  457. * @return mixed
  458. */
  459. public function getConfig()
  460. {
  461. return $this->config;
  462. }
  463. /**
  464. * @param mixed $config
  465. * @return $this
  466. */
  467. public function setConfig($config)
  468. {
  469. $this->config = $config;
  470. return $this;
  471. }
  472. /**
  473. * Set folder
  474. *
  475. * @param string $folder
  476. *
  477. * @return $this
  478. */
  479. public function setFolder($folder)
  480. {
  481. $this->folder = $folder;
  482. return $this;
  483. }
  484. /**
  485. * Get folder
  486. *
  487. * @return string
  488. */
  489. public function getFolder()
  490. {
  491. return $this->folder;
  492. }
  493. #[Assert\Callback]
  494. public function validatePersonOrOrganization(ExecutionContextInterface $context)
  495. {
  496. if ((empty($this->person) && empty($this->organization))) {
  497. $context->buildViolation('You must specify one Person or one Organization')->atPath('person')->addViolation();
  498. $context->buildViolation('You must specify one Person or one Organization')->atPath('organization')->addViolation();
  499. }
  500. }
  501. /**
  502. * Add event
  503. *
  504. * @param \AppBundle\Entity\Booking\Event $event
  505. *
  506. * @return File
  507. */
  508. public function addEvent(\AppBundle\Entity\Booking\Event $event)
  509. {
  510. $this->events[] = $event;
  511. return $this;
  512. }
  513. /**
  514. * Remove event
  515. *
  516. * @param \AppBundle\Entity\Booking\Event $event
  517. */
  518. public function removeEvent(\AppBundle\Entity\Booking\Event $event)
  519. {
  520. $this->events->removeElement($event);
  521. }
  522. /**
  523. * Get events
  524. *
  525. * @return \Doctrine\Common\Collections\Collection
  526. */
  527. public function getEvents()
  528. {
  529. return $this->events;
  530. }
  531. /**
  532. * Add network
  533. *
  534. * @param \AppBundle\Entity\Network\Network $network
  535. *
  536. * @return File
  537. */
  538. public function addNetwork(\AppBundle\Entity\Network\Network $network)
  539. {
  540. $this->networks[] = $network;
  541. return $this;
  542. }
  543. /**
  544. * Remove network
  545. *
  546. * @param \AppBundle\Entity\Network\Network $network
  547. */
  548. public function removeNetwork(\AppBundle\Entity\Network\Network $network)
  549. {
  550. $this->networks->removeElement($network);
  551. }
  552. /**
  553. * Get networks
  554. *
  555. * @return \Doctrine\Common\Collections\Collection
  556. */
  557. public function getNetworks()
  558. {
  559. return $this->networks;
  560. }
  561. /**
  562. * Add activityLogo
  563. *
  564. * @param \AppBundle\Entity\Organization\Activity $activityLogo
  565. *
  566. * @return File
  567. */
  568. public function addActivityLogo(\AppBundle\Entity\Organization\Activity $activityLogo)
  569. {
  570. $this->activityLogos[] = $activityLogo;
  571. return $this;
  572. }
  573. /**
  574. * Remove activityLogo
  575. *
  576. * @param \AppBundle\Entity\Organization\Activity $activityLogo
  577. */
  578. public function removeActivityLogo(\AppBundle\Entity\Organization\Activity $activityLogo)
  579. {
  580. $this->activityLogos->removeElement($activityLogo);
  581. }
  582. /**
  583. * Get activityLogos
  584. *
  585. * @return \Doctrine\Common\Collections\Collection
  586. */
  587. public function getActivityLogos()
  588. {
  589. return $this->activityLogos;
  590. }
  591. /**
  592. * Add activityImage
  593. *
  594. * @param \AppBundle\Entity\Organization\Activity $activityImage
  595. *
  596. * @return File
  597. */
  598. public function addActivityImage(\AppBundle\Entity\Organization\Activity $activityImage)
  599. {
  600. $this->activityImages[] = $activityImage;
  601. return $this;
  602. }
  603. /**
  604. * Remove activityImage
  605. *
  606. * @param \AppBundle\Entity\Organization\Activity $activityImage
  607. */
  608. public function removeActivityImage(\AppBundle\Entity\Organization\Activity $activityImage)
  609. {
  610. $this->activityImages->removeElement($activityImage);
  611. }
  612. /**
  613. * Get activityImages
  614. *
  615. * @return \Doctrine\Common\Collections\Collection
  616. */
  617. public function getActivityImages()
  618. {
  619. return $this->activityImages;
  620. }
  621. /**
  622. * Add organizationLogo
  623. *
  624. * @param \AppBundle\Entity\Organization\Organization $organizationLogo
  625. *
  626. * @return File
  627. */
  628. public function addOrganizationLogo(\AppBundle\Entity\Organization\Organization $organizationLogo)
  629. {
  630. $this->organizationLogos[] = $organizationLogo;
  631. return $this;
  632. }
  633. /**
  634. * Remove organizationLogo
  635. *
  636. * @param \AppBundle\Entity\Organization\Organization $organizationLogo
  637. */
  638. public function removeOrganizationLogo(\AppBundle\Entity\Organization\Organization $organizationLogo)
  639. {
  640. $this->organizationLogos->removeElement($organizationLogo);
  641. }
  642. /**
  643. * Get organizationLogos
  644. *
  645. * @return \Doctrine\Common\Collections\Collection
  646. */
  647. public function getOrganizationLogos()
  648. {
  649. return $this->organizationLogos;
  650. }
  651. /**
  652. * Add organizationImage
  653. *
  654. * @param \AppBundle\Entity\Organization\Organization $organizationImage
  655. *
  656. * @return File
  657. */
  658. public function addOrganizationImage(\AppBundle\Entity\Organization\Organization $organizationImage)
  659. {
  660. $this->organizationImages[] = $organizationImage;
  661. return $this;
  662. }
  663. /**
  664. * Remove organizationImage
  665. *
  666. * @param \AppBundle\Entity\Organization\Organization $organizationImage
  667. */
  668. public function removeOrganizationImage(\AppBundle\Entity\Organization\Organization $organizationImage)
  669. {
  670. $this->organizationImages->removeElement($organizationImage);
  671. }
  672. /**
  673. * Get organizationImages
  674. *
  675. * @return \Doctrine\Common\Collections\Collection
  676. */
  677. public function getOrganizationImages()
  678. {
  679. return $this->organizationImages;
  680. }
  681. /**
  682. * Add personImage
  683. *
  684. * @param \AppBundle\Entity\Person\Person $personImage
  685. *
  686. * @return File
  687. */
  688. public function addPersonImage(\AppBundle\Entity\Person\Person $personImage)
  689. {
  690. $this->personImages[] = $personImage;
  691. return $this;
  692. }
  693. /**
  694. * Remove personImage
  695. *
  696. * @param \AppBundle\Entity\Person\Person $personImage
  697. */
  698. public function removePersonImage(\AppBundle\Entity\Person\Person $personImage)
  699. {
  700. $this->personImages->removeElement($personImage);
  701. }
  702. /**
  703. * Get personImages
  704. *
  705. * @return \Doctrine\Common\Collections\Collection
  706. */
  707. public function getPersonImages()
  708. {
  709. return $this->personImages;
  710. }
  711. /**
  712. * Set qrCode
  713. *
  714. * @param $qrCode
  715. *
  716. * @return File
  717. */
  718. public function setQrCode($qrCode)
  719. {
  720. $this->qrCode = $qrCode;
  721. return $this;
  722. }
  723. /**
  724. * Get qrCode
  725. *
  726. * @return string
  727. */
  728. public function getQrCode()
  729. {
  730. return $this->qrCode;
  731. }
  732. /**
  733. * Set type
  734. *
  735. * @param string $type
  736. *
  737. * @return File
  738. */
  739. public function setType($type)
  740. {
  741. $this->type = $type;
  742. return $this;
  743. }
  744. /**
  745. * Get type
  746. *
  747. * @return string
  748. */
  749. public function getType()
  750. {
  751. return $this->type;
  752. }
  753. /**
  754. * @return EventReport
  755. */
  756. public function getEventReport()
  757. {
  758. return $this->eventReport;
  759. }
  760. /**
  761. * @param EventReport $eventReport
  762. * @return $this
  763. */
  764. public function setEventReport($eventReport)
  765. {
  766. $this->eventReport = $eventReport;
  767. return $this;
  768. }
  769. /**
  770. * Set availabilityDate
  771. *
  772. * @param \DateTime $availabilityDate
  773. *
  774. * @return File
  775. */
  776. public function setAvailabilityDate($availabilityDate)
  777. {
  778. $this->availabilityDate = $availabilityDate;
  779. return $this;
  780. }
  781. /**
  782. * Get availabilityDate
  783. *
  784. * @return \DateTime
  785. */
  786. public function getAvailabilityDate()
  787. {
  788. return $this->availabilityDate;
  789. }
  790. /**
  791. * Set documentWish
  792. *
  793. * @param \AppBundle\Entity\AccessWish\DocumentWish $documentWish
  794. *
  795. * @return File
  796. */
  797. public function setDocumentWish(\AppBundle\Entity\AccessWish\DocumentWish $documentWish = null)
  798. {
  799. $this->documentWish = $documentWish;
  800. return $this;
  801. }
  802. /**
  803. * Get documentWish
  804. *
  805. * @return \AppBundle\Entity\AccessWish\DocumentWish
  806. */
  807. public function getDocumentWish()
  808. {
  809. return $this->documentWish;
  810. }
  811. /**
  812. * Set size
  813. *
  814. * @param integer $size
  815. *
  816. * @return File
  817. */
  818. public function setSize($size)
  819. {
  820. $this->size = $size;
  821. return $this;
  822. }
  823. /**
  824. * Get size
  825. *
  826. * @return integer
  827. */
  828. public function getSize()
  829. {
  830. return $this->size;
  831. }
  832. /**
  833. * @return bool
  834. */
  835. public function isTemporaryFile()
  836. {
  837. return $this->isTemporaryFile;
  838. }
  839. /**
  840. * @param bool $isTemporaryFile
  841. */
  842. public function setIsTemporaryFile($isTemporaryFile)
  843. {
  844. $this->isTemporaryFile = $isTemporaryFile;
  845. return $this;
  846. }
  847. /**
  848. * Set calendarSynchro
  849. *
  850. * @param \AppBundle\Entity\Booking\CalendarSynchro $calendarSynchro
  851. *
  852. * @return File
  853. */
  854. public function setCalendarSynchro(\AppBundle\Entity\Booking\CalendarSynchro $calendarSynchro = null)
  855. {
  856. $this->calendarSynchro = $calendarSynchro;
  857. return $this;
  858. }
  859. /**
  860. * Get calendarSynchro
  861. *
  862. * @return \AppBundle\Entity\Booking\CalendarSynchro
  863. */
  864. public function getCalendarSynchro()
  865. {
  866. return $this->calendarSynchro;
  867. }
  868. /**
  869. * Get isTemporaryFile
  870. *
  871. * @return boolean
  872. */
  873. public function getIsTemporaryFile()
  874. {
  875. return $this->isTemporaryFile;
  876. }
  877. /**
  878. * Set onlineRegistrationSetting
  879. *
  880. * @param \AppBundle\Entity\Organization\OnlineRegistrationSettings $onlineRegistrationSetting
  881. *
  882. * @return File
  883. */
  884. public function setOnlineRegistrationSetting(\AppBundle\Entity\Organization\OnlineRegistrationSettings $onlineRegistrationSetting = null)
  885. {
  886. $this->onlineRegistrationSetting = $onlineRegistrationSetting;
  887. return $this;
  888. }
  889. /**
  890. * Get onlineRegistrationSetting
  891. *
  892. * @return \AppBundle\Entity\Organization\OnlineRegistrationSettings
  893. */
  894. public function getOnlineRegistrationSetting()
  895. {
  896. return $this->onlineRegistrationSetting;
  897. }
  898. /**
  899. * Set templateSystem
  900. *
  901. * @param TemplateSystem $templateSystem
  902. *
  903. * @return File
  904. */
  905. public function setTemplateSystem(TemplateSystem $templateSystem = null)
  906. {
  907. $this->templateSystem = $templateSystem;
  908. return $this;
  909. }
  910. /**
  911. * Get templateSystem
  912. *
  913. * @return TemplateSystem
  914. */
  915. public function getTemplateSystem()
  916. {
  917. return $this->templateSystem;
  918. }
  919. /**
  920. * Set work
  921. *
  922. * @param \AppBundle\Entity\Booking\Work $work
  923. *
  924. * @return File
  925. */
  926. public function setWork(\AppBundle\Entity\Booking\Work $work = null)
  927. {
  928. $this->work = $work;
  929. return $this;
  930. }
  931. /**
  932. * Get work
  933. *
  934. * @return \AppBundle\Entity\Booking\Work
  935. */
  936. public function getWork()
  937. {
  938. return $this->work;
  939. }
  940. /**
  941. * Set onlineRegistrationSettingNewEnrolments
  942. *
  943. * @param \AppBundle\Entity\Organization\OnlineRegistrationSettings $onlineRegistrationSettingNewEnrolments
  944. *
  945. * @return File
  946. */
  947. public function setOnlineRegistrationSettingNewEnrolments(\AppBundle\Entity\Organization\OnlineRegistrationSettings $onlineRegistrationSettingNewEnrolments = null)
  948. {
  949. $this->onlineRegistrationSettingNewEnrolments = $onlineRegistrationSettingNewEnrolments;
  950. return $this;
  951. }
  952. /**
  953. * Get onlineRegistrationSettingNewEnrolments
  954. *
  955. * @return \AppBundle\Entity\Organization\OnlineRegistrationSettings
  956. */
  957. public function getOnlineRegistrationSettingNewEnrolments()
  958. {
  959. return $this->onlineRegistrationSettingNewEnrolments;
  960. }
  961. }