Completed
Push — payment ( a2694a...cf6a20 )
by Torben
45:36
created

Event::setEnablePayment()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
namespace DERHANSEN\SfEventMgt\Domain\Model;
3
4
/*
5
 * This file is part of the TYPO3 CMS project.
6
 *
7
 * It is free software; you can redistribute it and/or modify it under
8
 * the terms of the GNU General Public License, either version 2
9
 * of the License, or any later version.
10
 *
11
 * For the full copyright and license information, please read the
12
 * LICENSE.txt file that was distributed with this source code.
13
 *
14
 * The TYPO3 project - inspiring people to share!
15
 */
16
17
/**
18
 * Event
19
 *
20
 * @author Torben Hansen <[email protected]>
21
 */
22
class Event extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
23
{
24
25
    /**
26
     * Title
27
     *
28
     * @var string
29
     * @validate NotEmpty
30
     */
31
    protected $title = '';
32
33
    /**
34
     * Teaser
35
     *
36
     * @var string
37
     */
38
    protected $teaser = '';
39
40
    /**
41
     * Description
42
     *
43
     * @var string
44
     */
45
    protected $description = '';
46
47
    /**
48
     * Program/Schedule
49
     *
50
     * @var string
51
     */
52
    protected $program = '';
53
54
    /**
55
     * Startdate and time
56
     *
57
     * @var \DateTime
58
     */
59
    protected $startdate = null;
60
61
    /**
62
     * Enddate and time
63
     *
64
     * @var \DateTime
65
     */
66
    protected $enddate = null;
67
68
    /**
69
     * Max participants
70
     *
71
     * @var int
72
     */
73
    protected $maxParticipants = 0;
74
75
    /**
76
     * Max registrations per user
77
     *
78
     * @var int
79
     */
80
    protected $maxRegistrationsPerUser = 1;
81
82
    /**
83
     * Price
84
     *
85
     * @var float
86
     */
87
    protected $price = 0.0;
88
89
    /**
90
     * Currency
91
     *
92
     * @var string
93
     */
94
    protected $currency = '';
95
96
    /**
97
     * Enable payment
98
     *
99
     * @var bool
100
     */
101
    protected $enablePayment = false;
102
103
    /**
104
     * Category
105
     *
106
     * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\Category>
107
     */
108
    protected $category = null;
109
110
    /**
111
     * Registration
112
     *
113
     * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DERHANSEN\SfEventMgt\Domain\Model\Registration>
114
     * @cascade remove
115
     */
116
    protected $registration = null;
117
118
    /**
119
     * Registration deadline date
120
     *
121
     * @var \DateTime
122
     */
123
    protected $registrationDeadline = null;
124
125
    /**
126
     * The image
127
     *
128
     * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference>
129
     */
130
    protected $image = null;
131
132
    /**
133
     * Additional files
134
     *
135
     * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference>
136
     */
137
    protected $files = null;
138
139
    /**
140
     * YouTube Embed code
141
     *
142
     * @var string
143
     */
144
    protected $youtube = '';
145
146
    /**
147
     * The Location
148
     *
149
     * @var \DERHANSEN\SfEventMgt\Domain\Model\Location
150
     */
151
    protected $location = null;
152
153
    /**
154
     * Enable registration
155
     *
156
     * @var bool
157
     */
158
    protected $enableRegistration = false;
159
160
    /**
161
     * Link
162
     *
163
     * @var string
164
     */
165
    protected $link;
166
167
    /**
168
     * Top event
169
     *
170
     * @var bool
171
     */
172
    protected $topEvent = false;
173
174
    /**
175
     * The additionalImage
176
     *
177
     * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference>
178
     */
179
    protected $additionalImage = null;
180
181
    /**
182
     * The organisator
183
     *
184
     * @var \DERHANSEN\SfEventMgt\Domain\Model\Organisator
185
     */
186
    protected $organisator = null;
187
188
    /**
189
     * Notify admin
190
     *
191
     * @var bool
192
     */
193
    protected $notifyAdmin = true;
194
195
    /**
196
     * Notify organisator
197
     *
198
     * @var bool
199
     */
200
    protected $notifyOrganisator = false;
201
202
    /**
203
     * Enable cancel of registration
204
     *
205
     * @var bool
206
     */
207
    protected $enableCancel = false;
208
209
    /**
210
     * Deadline for cancel
211
     *
212
     * @var \DateTime
213
     */
214
    protected $cancelDeadline = null;
215
216
    /**
217
     * Unique e-mail check
218
     *
219
     * @var bool
220
     */
221
    protected $uniqueEmailCheck = false;
222
223
    /**
224
     * __construct
225
     */
226
    public function __construct()
227
    {
228
        //Do not remove the next line: It would break the functionality
229
        $this->initStorageObjects();
230
    }
231
232
    /**
233
     * Initializes all ObjectStorage properties
234
     * Do not modify this method!
235
     * It will be rewritten on each save in the extension builder
236
     * You may modify the constructor of this class instead
237
     *
238
     * @return void
239
     */
240
    protected function initStorageObjects()
241
    {
242
        $this->category = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
243
        $this->registration = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
244
        $this->image = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
245
        $this->files = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
246
        $this->additionalImage = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
247
    }
248
249
    /**
250
     * Returns the title
251
     *
252
     * @return string $title
253
     */
254
    public function getTitle()
255
    {
256
        return $this->title;
257
    }
258
259
    /**
260
     * Sets the title
261
     *
262
     * @param string $title Title
263
     *
264
     * @return void
265
     */
266
    public function setTitle($title)
267
    {
268
        $this->title = $title;
269
    }
270
271
    /**
272
     * Returns the teaser
273
     *
274
     * @return string
275
     */
276
    public function getTeaser()
277
    {
278
        return $this->teaser;
279
    }
280
281
    /**
282
     * Sets the teaser
283
     *
284
     * @param string $teaser Teaser
285
     *
286
     * @return void
287
     */
288
    public function setTeaser($teaser)
289
    {
290
        $this->teaser = $teaser;
291
    }
292
293
    /**
294
     * Returns the description
295
     *
296
     * @return string $description
297
     */
298
    public function getDescription()
299
    {
300
        return $this->description;
301
    }
302
303
    /**
304
     * Sets the description
305
     *
306
     * @param string $description Description
307
     *
308
     * @return void
309
     */
310
    public function setDescription($description)
311
    {
312
        $this->description = $description;
313
    }
314
315
    /**
316
     * Returns the program
317
     *
318
     * @return string $program
319
     */
320
    public function getProgram()
321
    {
322
        return $this->program;
323
    }
324
325
    /**
326
     * Sets the program
327
     *
328
     * @param string $program The program
329
     *
330
     * @return void
331
     */
332
    public function setProgram($program)
333
    {
334
        $this->program = $program;
335
    }
336
337
    /**
338
     * Returns the startdate
339
     *
340
     * @return \DateTime $startdate
341
     */
342
    public function getStartdate()
343
    {
344
        return $this->startdate;
345
    }
346
347
    /**
348
     * Sets the startdate
349
     *
350
     * @param \DateTime $startdate Startdate
351
     *
352
     * @return void
353
     */
354
    public function setStartdate(\DateTime $startdate)
355
    {
356
        $this->startdate = $startdate;
357
    }
358
359
    /**
360
     * Returns the enddate
361
     *
362
     * @return \DateTime $enddate
363
     */
364
    public function getEnddate()
365
    {
366
        return $this->enddate;
367
    }
368
369
    /**
370
     * Sets the enddate
371
     *
372
     * @param \DateTime $enddate Enddate
373
     *
374
     * @return void
375
     */
376
    public function setEnddate(\DateTime $enddate)
377
    {
378
        $this->enddate = $enddate;
379
    }
380
381
    /**
382
     * Returns the participants
383
     *
384
     * @return int $participants
385
     */
386
    public function getMaxParticipants()
387
    {
388
        return $this->maxParticipants;
389
    }
390
391
    /**
392
     * Sets the participants
393
     *
394
     * @param int $participants Participants
395
     *
396
     * @return void
397
     */
398
    public function setMaxParticipants($participants)
399
    {
400
        $this->maxParticipants = $participants;
401
    }
402
403
    /**
404
     * Returns the price
405
     *
406
     * @return float $price
407
     */
408
    public function getPrice()
409
    {
410
        return $this->price;
411
    }
412
413
    /**
414
     * Sets the price
415
     *
416
     * @param float $price Price
417
     *
418
     * @return void
419
     */
420
    public function setPrice($price)
421
    {
422
        $this->price = $price;
423
    }
424
425
    /**
426
     * Returns the currency
427
     *
428
     * @return string $currency
429
     */
430
    public function getCurrency()
431
    {
432
        return $this->currency;
433
    }
434
435
    /**
436
     * Sets the currency
437
     *
438
     * @param string $currency Currency
439
     *
440
     * @return void
441
     */
442
    public function setCurrency($currency)
443
    {
444
        $this->currency = $currency;
445
    }
446
447
    /**
448
     * Returns if payment is enabled
449
     *
450
     * @return boolean
451
     */
452
    public function getEnablePayment()
453
    {
454
        return $this->enablePayment;
455
    }
456
457
    /**
458
     * Sets enablePayment
459
     *
460
     * @param boolean $enablePayment
461
     * @return void
462
     */
463
    public function setEnablePayment($enablePayment)
464
    {
465
        $this->enablePayment = $enablePayment;
466
    }
467
468
    /**
469
     * Adds a Category
470
     *
471
     * @param \TYPO3\CMS\Extbase\Domain\Model\Category $category Category
472
     *
473
     * @return void
474
     */
475
    public function addCategory(\TYPO3\CMS\Extbase\Domain\Model\Category $category)
476
    {
477
        $this->category->attach($category);
478
    }
479
480
    /**
481
     * Removes a Category
482
     *
483
     * @param \TYPO3\CMS\Extbase\Domain\Model\Category $categoryToRemove The Category to be removed
484
     *
485
     * @return void
486
     */
487
    public function removeCategory(\TYPO3\CMS\Extbase\Domain\Model\Category $categoryToRemove)
488
    {
489
        $this->category->detach($categoryToRemove);
490
    }
491
492
    /**
493
     * Returns the category
494
     *
495
     * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage
496
     */
497
    public function getCategory()
498
    {
499
        return $this->category;
500
    }
501
502
    /**
503
     * Sets the category
504
     *
505
     * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $category Category
506
     *
507
     * @return void
508
     */
509
    public function setCategory(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $category)
510
    {
511
        $this->category = $category;
512
    }
513
514
    /**
515
     * Adds a Registration
516
     *
517
     * @param \DERHANSEN\SfEventMgt\Domain\Model\Registration $registration Registration
518
     *
519
     * @return void
520
     */
521
    public function addRegistration(\DERHANSEN\SfEventMgt\Domain\Model\Registration $registration)
522
    {
523
        $this->registration->attach($registration);
524
    }
525
526
    /**
527
     * Removes a Registration
528
     *
529
     * @param \DERHANSEN\SfEventMgt\Domain\Model\Registration $registrationToRemove Registration
530
     *
531
     * @return void
532
     */
533
    public function removeRegistration(\DERHANSEN\SfEventMgt\Domain\Model\Registration $registrationToRemove)
534
    {
535
        $this->registration->detach($registrationToRemove);
536
    }
537
538
    /**
539
     * Returns the Registration
540
     *
541
     * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage $registration
542
     */
543
    public function getRegistration()
544
    {
545
        return $this->registration;
546
    }
547
548
    /**
549
     * Sets the Registration
550
     *
551
     * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $registration Registration
552
     *
553
     * @return void
554
     */
555
    public function setRegistration(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $registration)
556
    {
557
        $this->registration = $registration;
558
    }
559
560
    /**
561
     * Adds an image
562
     *
563
     * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $image Image
564
     *
565
     * @return void
566
     */
567
    public function addImage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $image)
568
    {
569
        $this->image->attach($image);
570
    }
571
572
    /**
573
     * Removes an image
574
     *
575
     * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $imageToRemove Image
576
     *
577
     * @return void
578
     */
579
    public function removeImage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $imageToRemove)
580
    {
581
        $this->image->detach($imageToRemove);
582
    }
583
584
    /**
585
     * Returns the image
586
     *
587
     * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage $image
588
     */
589
    public function getImage()
590
    {
591
        return $this->image;
592
    }
593
594
    /**
595
     * Sets the image
596
     *
597
     * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $image Image
598
     *
599
     * @return void
600
     */
601
    public function setImage(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $image)
602
    {
603
        $this->image = $image;
604
    }
605
606
    /**
607
     * Adds a file
608
     *
609
     * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $file File
610
     *
611
     * @return void
612
     */
613
    public function addFiles(\TYPO3\CMS\Extbase\Domain\Model\FileReference $file)
614
    {
615
        $this->files->attach($file);
616
    }
617
618
    /**
619
     * Removes a file
620
     *
621
     * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $fileToRemove File
622
     *
623
     * @return void
624
     */
625
    public function removeFiles(\TYPO3\CMS\Extbase\Domain\Model\FileReference $fileToRemove)
626
    {
627
        $this->files->detach($fileToRemove);
628
    }
629
630
    /**
631
     * Returns the files
632
     *
633
     * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage $files
634
     */
635
    public function getFiles()
636
    {
637
        return $this->files;
638
    }
639
640
    /**
641
     * Sets the files
642
     *
643
     * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $files Files
644
     *
645
     * @return void
646
     */
647
    public function setFiles(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $files)
648
    {
649
        $this->files = $files;
650
    }
651
652
    /**
653
     * Returns YouTube embed code
654
     *
655
     * @return string
656
     */
657
    public function getYoutube()
658
    {
659
        return $this->youtube;
660
    }
661
662
    /**
663
     * Sets YouTube embed code
664
     *
665
     * @param string $youtube Youtube
666
     *
667
     * @return void
668
     */
669
    public function setYoutube($youtube)
670
    {
671
        $this->youtube = $youtube;
672
    }
673
674
    /**
675
     * Returns if the registration for this event is logically possible
676
     *
677
     * @return bool
678
     */
679
    public function getRegistrationPossible()
680
    {
681
        $maxParticipantsNotReached = true;
682
        if ($this->getMaxParticipants() > 0 && $this->getRegistration()->count() >= $this->maxParticipants) {
683
            $maxParticipantsNotReached = false;
684
        }
685
        $deadlineNotReached = true;
686
        if ($this->getRegistrationDeadline() != null && $this->getRegistrationDeadline() <= new \DateTime()) {
687
            $deadlineNotReached = false;
688
        }
689
        return ($this->getStartdate() > new \DateTime()) && $maxParticipantsNotReached &&
690
        $this->getEnableRegistration() && $deadlineNotReached;
691
    }
692
693
    /**
694
     * Returns the amount of free places
695
     *
696
     * @return int
697
     */
698
    public function getFreePlaces()
699
    {
700
        return $this->maxParticipants - $this->getRegistration()->count();
701
    }
702
703
    /**
704
     * Sets the location
705
     *
706
     * @param \DERHANSEN\SfEventMgt\Domain\Model\Location $location Location
707
     *
708
     * @return void
709
     */
710
    public function setLocation($location)
711
    {
712
        $this->location = $location;
713
    }
714
715
    /**
716
     * Returns the location
717
     *
718
     * @return \DERHANSEN\SfEventMgt\Domain\Model\Location
719
     */
720
    public function getLocation()
721
    {
722
        return $this->location;
723
    }
724
725
    /**
726
     * Sets enableRegistration
727
     *
728
     * @param bool $enableRegistration EnableRegistration
729
     *
730
     * @return void
731
     */
732
    public function setEnableRegistration($enableRegistration)
733
    {
734
        $this->enableRegistration = $enableRegistration;
735
    }
736
737
    /**
738
     * Returns if registration is enabled
739
     *
740
     * @return bool
741
     */
742
    public function getEnableRegistration()
743
    {
744
        return $this->enableRegistration;
745
    }
746
747
    /**
748
     * Sets the registration deadline
749
     *
750
     * @param \DateTime $registrationDeadline RegistrationDeadline
751
     *
752
     * @return void
753
     */
754
    public function setRegistrationDeadline(\DateTime $registrationDeadline)
755
    {
756
        $this->registrationDeadline = $registrationDeadline;
757
    }
758
759
    /**
760
     * Returns the registration deadline
761
     *
762
     * @return \DateTime
763
     */
764
    public function getRegistrationDeadline()
765
    {
766
        return $this->registrationDeadline;
767
    }
768
769
    /**
770
     * Sets the link
771
     *
772
     * @param string $link Link
773
     *
774
     * @return void
775
     */
776
    public function setLink($link)
777
    {
778
        $this->link = $link;
779
    }
780
781
    /**
782
     * Returns the link
783
     *
784
     * @return string
785
     */
786
    public function getLink()
787
    {
788
        return $this->link;
789
    }
790
791
    /**
792
     * Returns the uri of the link
793
     *
794
     * @return string
795
     */
796
    public function getLinkUrl()
797
    {
798
        return $this->getLinkPart(0);
799
    }
800
801
    /**
802
     * Returns the target of the link
803
     *
804
     * @return string
805
     */
806
    public function getLinkTarget()
807
    {
808
        return $this->getLinkPart(1);
809
    }
810
811
    /**
812
     * Returns the title of the link
813
     *
814
     * @return string
815
     */
816
    public function getLinkTitle()
817
    {
818
        return $this->getLinkPart(3);
819
    }
820
821
    /**
822
     * Splits link to an array respection that a title with more than one word is
823
     * surrounded by quotation marks. Returns part of the link for usage in fluid
824
     * viewhelpers.
825
     *
826
     * @param int $part The part
827
     *
828
     * @return string
829
     */
830
    public function getLinkPart($part)
831
    {
832
        $linkArray = str_getcsv($this->link, ' ', '"');
833
        $ret = '';
834
        if (count($linkArray) >= $part) {
835
            $ret = $linkArray[$part];
836
        }
837
        if ($ret === '-') {
838
            $ret = '';
839
        }
840
        return $ret;
841
    }
842
843
    /**
844
     * Sets topEvent
845
     *
846
     * @param bool $topEvent TopEvent
847
     *
848
     * @return void
849
     */
850
    public function setTopEvent($topEvent)
851
    {
852
        $this->topEvent = $topEvent;
853
    }
854
855
    /**
856
     * Returns if topEvent is checked
857
     *
858
     * @return bool
859
     */
860
    public function getTopEvent()
861
    {
862
        return $this->topEvent;
863
    }
864
865
    /**
866
     * Returns max regisrations per user
867
     *
868
     * @return int
869
     */
870
    public function getMaxRegistrationsPerUser()
871
    {
872
        return $this->maxRegistrationsPerUser;
873
    }
874
875
    /**
876
     * Sets max registrations per user
877
     *
878
     * @param int $maxRegistrationsPerUser MaxRegistrationsPerUser
879
     *
880
     * @return void
881
     */
882
    public function setMaxRegistrationsPerUser($maxRegistrationsPerUser)
883
    {
884
        $this->maxRegistrationsPerUser = $maxRegistrationsPerUser;
885
    }
886
887
888
    /**
889
     * Adds an additionalImage
890
     *
891
     * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $additionalImage The Image
892
     *
893
     * @return void
894
     */
895
    public function addAdditionalImage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $additionalImage)
896
    {
897
        $this->additionalImage->attach($additionalImage);
898
    }
899
900
    /**
901
     * Removes an additionalImage
902
     *
903
     * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $additionalImageToRemove The Image
904
     *
905
     * @return void
906
     */
907
    public function removeAdditionalImage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $additionalImageToRemove)
908
    {
909
        $this->additionalImage->detach($additionalImageToRemove);
910
    }
911
912
    /**
913
     * Returns the additionalImage
914
     *
915
     * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage $additionalImage
916
     */
917
    public function getAdditionalImage()
918
    {
919
        return $this->additionalImage;
920
    }
921
922
    /**
923
     * Sets the additionalImage
924
     *
925
     * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $additionalImage The Image
926
     *
927
     * @return void
928
     */
929
    public function setAdditionalImage(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $additionalImage)
930
    {
931
        $this->additionalImage = $additionalImage;
932
    }
933
934
    /**
935
     * Returns the organisator
936
     *
937
     * @return Organisator
938
     */
939
    public function getOrganisator()
940
    {
941
        return $this->organisator;
942
    }
943
944
    /**
945
     * Sets the organisator
946
     *
947
     * @param Organisator $organisator The organisator
948
     *
949
     * @return void
950
     */
951
    public function setOrganisator($organisator)
952
    {
953
        $this->organisator = $organisator;
954
    }
955
956
    /**
957
     * Returns notifyAdmin
958
     *
959
     * @return bool
960
     */
961
    public function getNotifyAdmin()
962
    {
963
        return $this->notifyAdmin;
964
    }
965
966
    /**
967
     * Sets notifyAdmin
968
     *
969
     * @param bool $notifyAdmin NotifyAdmin
970
     *
971
     * @return void
972
     */
973
    public function setNotifyAdmin($notifyAdmin)
974
    {
975
        $this->notifyAdmin = $notifyAdmin;
976
    }
977
978
    /**
979
     * Returns if notifyAdmin is set
980
     *
981
     * @return bool
982
     */
983
    public function getNotifyOrganisator()
984
    {
985
        return $this->notifyOrganisator;
986
    }
987
988
    /**
989
     * Sets notifyOrganisator
990
     *
991
     * @param bool $notifyOrganisator NotifyOrganisator
992
     *
993
     * @return void
994
     */
995
    public function setNotifyOrganisator($notifyOrganisator)
996
    {
997
        $this->notifyOrganisator = $notifyOrganisator;
998
    }
999
1000
    /**
1001
     * Sets enableCancel
1002
     *
1003
     * @param bool $enableCancel EnableCancel
1004
     *
1005
     * @return void
1006
     */
1007
    public function setEnableCancel($enableCancel)
1008
    {
1009
        $this->enableCancel = $enableCancel;
1010
    }
1011
1012
    /**
1013
     * Returns if registration can be canceled
1014
     *
1015
     * @return bool
1016
     */
1017
    public function getEnableCancel()
1018
    {
1019
        return $this->enableCancel;
1020
    }
1021
1022
    /**
1023
     * Sets the cancel deadline
1024
     *
1025
     * @param \DateTime $cancelDeadline RegistrationDeadline
1026
     *
1027
     * @return void
1028
     */
1029
    public function setCancelDeadline(\DateTime $cancelDeadline)
1030
    {
1031
        $this->cancelDeadline = $cancelDeadline;
1032
    }
1033
1034
    /**
1035
     * Returns the cancel deadline
1036
     *
1037
     * @return \DateTime
1038
     */
1039
    public function getCancelDeadline()
1040
    {
1041
        return $this->cancelDeadline;
1042
    }
1043
1044
    /**
1045
     * Returns uniqueEmailCheck
1046
     *
1047
     * @return boolean
1048
     */
1049
    public function getUniqueEmailCheck()
1050
    {
1051
        return $this->uniqueEmailCheck;
1052
    }
1053
1054
    /**
1055
     * Sets UniqueEmailCheck
1056
     *
1057
     * @param boolean $uniqueEmailCheck
1058
     * @return void
1059
     */
1060
    public function setUniqueEmailCheck($uniqueEmailCheck)
1061
    {
1062
        $this->uniqueEmailCheck = $uniqueEmailCheck;
1063
    }
1064
1065
1066
}