Completed
Push — payment ( a2694a )
by Torben
42:06
created

Event   D

Complexity

Total Complexity 81

Size/Duplication

Total Lines 1017
Duplicated Lines 0 %

Coupling/Cohesion

Components 2
Dependencies 0

Importance

Changes 10
Bugs 1 Features 6
Metric Value
wmc 81
c 10
b 1
f 6
lcom 2
cbo 0
dl 0
loc 1017
rs 4.4382

72 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A initStorageObjects() 0 8 1
A getTitle() 0 4 1
A setTitle() 0 4 1
A getTeaser() 0 4 1
A setTeaser() 0 4 1
A getDescription() 0 4 1
A setDescription() 0 4 1
A getProgram() 0 4 1
A setProgram() 0 4 1
A getStartdate() 0 4 1
A setStartdate() 0 4 1
A getEnddate() 0 4 1
A setEnddate() 0 4 1
A getMaxParticipants() 0 4 1
A setMaxParticipants() 0 4 1
A getPrice() 0 4 1
A setPrice() 0 4 1
A getCurrency() 0 4 1
A setCurrency() 0 4 1
A addCategory() 0 4 1
A removeCategory() 0 4 1
A getCategory() 0 4 1
A setCategory() 0 4 1
A addRegistration() 0 4 1
A removeRegistration() 0 4 1
A getRegistration() 0 4 1
A setRegistration() 0 4 1
A addImage() 0 4 1
A removeImage() 0 4 1
A getImage() 0 4 1
A setImage() 0 4 1
A addFiles() 0 4 1
A removeFiles() 0 4 1
A getFiles() 0 4 1
A setFiles() 0 4 1
A getYoutube() 0 4 1
A setYoutube() 0 4 1
B getRegistrationPossible() 0 13 8
A getFreePlaces() 0 4 1
A setLocation() 0 4 1
A getLocation() 0 4 1
A setEnableRegistration() 0 4 1
A getEnableRegistration() 0 4 1
A setRegistrationDeadline() 0 4 1
A getRegistrationDeadline() 0 4 1
A setLink() 0 4 1
A getLink() 0 4 1
A getLinkUrl() 0 4 1
A getLinkTarget() 0 4 1
A getLinkTitle() 0 4 1
A getLinkPart() 0 12 3
A setTopEvent() 0 4 1
A getTopEvent() 0 4 1
A getMaxRegistrationsPerUser() 0 4 1
A setMaxRegistrationsPerUser() 0 4 1
A addAdditionalImage() 0 4 1
A removeAdditionalImage() 0 4 1
A getAdditionalImage() 0 4 1
A setAdditionalImage() 0 4 1
A getOrganisator() 0 4 1
A setOrganisator() 0 4 1
A getNotifyAdmin() 0 4 1
A setNotifyAdmin() 0 4 1
A getNotifyOrganisator() 0 4 1
A setNotifyOrganisator() 0 4 1
A setEnableCancel() 0 4 1
A getEnableCancel() 0 4 1
A setCancelDeadline() 0 4 1
A getCancelDeadline() 0 4 1
A getUniqueEmailCheck() 0 4 1
A setUniqueEmailCheck() 0 4 1

How to fix   Complexity   

Complex Class

Complex classes like Event often do a lot of different things. To break such a class down, we need to identify a cohesive component within that class. A common approach to find such a component is to look for fields/methods that share the same prefixes, or suffixes. You can also have a look at the cohesion graph to spot any un-connected, or weakly-connected components.

Once you have determined the fields that belong together, you can apply the Extract Class refactoring. If the component makes sense as a sub-class, Extract Subclass is also a candidate, and is often faster.

While breaking up the class, it is a good idea to analyze how other classes use Event, and based on these observations, apply Extract Interface, too.

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