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 |
||
23 | class Event extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity |
||
24 | { |
||
25 | /** |
||
26 | * @var \DateTime |
||
27 | */ |
||
28 | protected $tstamp; |
||
29 | |||
30 | /** |
||
31 | * Title |
||
32 | * |
||
33 | * @var string |
||
34 | * @validate NotEmpty |
||
35 | */ |
||
36 | protected $title = ''; |
||
37 | |||
38 | /** |
||
39 | * Teaser |
||
40 | * |
||
41 | * @var string |
||
42 | */ |
||
43 | protected $teaser = ''; |
||
44 | |||
45 | /** |
||
46 | * Description |
||
47 | * |
||
48 | * @var string |
||
49 | */ |
||
50 | protected $description = ''; |
||
51 | |||
52 | /** |
||
53 | * Program/Schedule |
||
54 | * |
||
55 | * @var string |
||
56 | */ |
||
57 | protected $program = ''; |
||
58 | |||
59 | /** |
||
60 | * Startdate and time |
||
61 | * |
||
62 | * @var \DateTime |
||
63 | */ |
||
64 | protected $startdate = null; |
||
65 | |||
66 | /** |
||
67 | * Enddate and time |
||
68 | * |
||
69 | * @var \DateTime |
||
70 | */ |
||
71 | protected $enddate = null; |
||
72 | |||
73 | /** |
||
74 | * Max participants |
||
75 | * |
||
76 | * @var int |
||
77 | */ |
||
78 | protected $maxParticipants = 0; |
||
79 | |||
80 | /** |
||
81 | * Max registrations per user |
||
82 | * |
||
83 | * @var int |
||
84 | */ |
||
85 | protected $maxRegistrationsPerUser = 1; |
||
86 | |||
87 | /** |
||
88 | * Price |
||
89 | * |
||
90 | * @var float |
||
91 | */ |
||
92 | protected $price = 0.0; |
||
93 | |||
94 | /** |
||
95 | * Currency |
||
96 | * |
||
97 | * @var string |
||
98 | */ |
||
99 | protected $currency = ''; |
||
100 | |||
101 | /** |
||
102 | * Enable payment |
||
103 | * |
||
104 | * @var bool |
||
105 | */ |
||
106 | protected $enablePayment = false; |
||
107 | |||
108 | /** |
||
109 | * Restrict payment methods |
||
110 | * |
||
111 | * @var bool |
||
112 | */ |
||
113 | protected $restrictPaymentMethods = false; |
||
114 | |||
115 | /** |
||
116 | * Selected payment methods |
||
117 | * |
||
118 | * @var string |
||
119 | */ |
||
120 | protected $selectedPaymentMethods = ''; |
||
121 | |||
122 | /** |
||
123 | * Category |
||
124 | * |
||
125 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DERHANSEN\SfEventMgt\Domain\Model\Category> |
||
126 | * @lazy |
||
127 | */ |
||
128 | protected $category = null; |
||
129 | |||
130 | /** |
||
131 | * Related |
||
132 | * |
||
133 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DERHANSEN\SfEventMgt\Domain\Model\Event> |
||
134 | * @lazy |
||
135 | */ |
||
136 | protected $related; |
||
137 | |||
138 | /** |
||
139 | * Registration |
||
140 | * |
||
141 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DERHANSEN\SfEventMgt\Domain\Model\Registration> |
||
142 | * @cascade remove |
||
143 | * @lazy |
||
144 | */ |
||
145 | protected $registration = null; |
||
146 | |||
147 | /** |
||
148 | * Registration waitlist |
||
149 | * |
||
150 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DERHANSEN\SfEventMgt\Domain\Model\Registration> |
||
151 | * @lazy |
||
152 | */ |
||
153 | protected $registrationWaitlist; |
||
154 | |||
155 | /** |
||
156 | * Registration fields |
||
157 | * |
||
158 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DERHANSEN\SfEventMgt\Domain\Model\Registration\Field> |
||
159 | * @lazy |
||
160 | */ |
||
161 | protected $registrationFields; |
||
162 | |||
163 | /** |
||
164 | * Registration deadline date |
||
165 | * |
||
166 | * @var \DateTime |
||
167 | */ |
||
168 | protected $registrationDeadline = null; |
||
169 | |||
170 | /** |
||
171 | * The image |
||
172 | * |
||
173 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference> |
||
174 | * @lazy |
||
175 | */ |
||
176 | protected $image = null; |
||
177 | |||
178 | /** |
||
179 | * Additional files |
||
180 | * |
||
181 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference> |
||
182 | * @lazy |
||
183 | */ |
||
184 | protected $files = null; |
||
185 | |||
186 | /** |
||
187 | * The Location |
||
188 | * |
||
189 | * @var \DERHANSEN\SfEventMgt\Domain\Model\Location |
||
190 | */ |
||
191 | protected $location = null; |
||
192 | |||
193 | /** |
||
194 | * Room |
||
195 | * |
||
196 | * @var string |
||
197 | */ |
||
198 | protected $room; |
||
199 | |||
200 | /** |
||
201 | * Enable registration |
||
202 | * |
||
203 | * @var bool |
||
204 | */ |
||
205 | protected $enableRegistration = false; |
||
206 | |||
207 | /** |
||
208 | * Enable waitlist |
||
209 | * |
||
210 | * @var bool |
||
211 | */ |
||
212 | protected $enableWaitlist = false; |
||
213 | |||
214 | /** |
||
215 | * Link |
||
216 | * |
||
217 | * @var string |
||
218 | */ |
||
219 | protected $link; |
||
220 | |||
221 | /** |
||
222 | * Top event |
||
223 | * |
||
224 | * @var bool |
||
225 | */ |
||
226 | protected $topEvent = false; |
||
227 | |||
228 | /** |
||
229 | * The additionalImage |
||
230 | * |
||
231 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference> |
||
232 | * @lazy |
||
233 | */ |
||
234 | protected $additionalImage = null; |
||
235 | |||
236 | /** |
||
237 | * The organisator |
||
238 | * |
||
239 | * @var \DERHANSEN\SfEventMgt\Domain\Model\Organisator |
||
240 | */ |
||
241 | protected $organisator = null; |
||
242 | |||
243 | /** |
||
244 | * Notify admin |
||
245 | * |
||
246 | * @var bool |
||
247 | */ |
||
248 | protected $notifyAdmin = true; |
||
249 | |||
250 | /** |
||
251 | * Notify organisator |
||
252 | * |
||
253 | * @var bool |
||
254 | */ |
||
255 | protected $notifyOrganisator = false; |
||
256 | |||
257 | /** |
||
258 | * Enable cancel of registration |
||
259 | * |
||
260 | * @var bool |
||
261 | */ |
||
262 | protected $enableCancel = false; |
||
263 | |||
264 | /** |
||
265 | * Deadline for cancel |
||
266 | * |
||
267 | * @var \DateTime |
||
268 | */ |
||
269 | protected $cancelDeadline = null; |
||
270 | |||
271 | /** |
||
272 | * Enable auto confirmation |
||
273 | * |
||
274 | * @var bool |
||
275 | */ |
||
276 | protected $enableAutoconfirm = false; |
||
277 | |||
278 | /** |
||
279 | * Unique e-mail check |
||
280 | * |
||
281 | * @var bool |
||
282 | */ |
||
283 | protected $uniqueEmailCheck = false; |
||
284 | |||
285 | /** |
||
286 | * Price options |
||
287 | * |
||
288 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DERHANSEN\SfEventMgt\Domain\Model\PriceOption> |
||
289 | * @cascade remove |
||
290 | * @lazy |
||
291 | */ |
||
292 | protected $priceOptions = null; |
||
293 | |||
294 | /** |
||
295 | * Speaker |
||
296 | * |
||
297 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DERHANSEN\SfEventMgt\Domain\Model\Speaker> |
||
298 | * @lazy |
||
299 | */ |
||
300 | protected $speaker = null; |
||
301 | |||
302 | /** |
||
303 | * Constructor |
||
304 | */ |
||
305 | public function __construct() |
||
318 | |||
319 | /** |
||
320 | * Get timestamp |
||
321 | * |
||
322 | * @return \DateTime |
||
323 | */ |
||
324 | public function getTstamp() |
||
328 | |||
329 | /** |
||
330 | * Set time stamp |
||
331 | * |
||
332 | * @param \DateTime $tstamp time stamp |
||
333 | */ |
||
334 | public function setTstamp($tstamp) |
||
338 | |||
339 | /** |
||
340 | * Returns the title |
||
341 | * |
||
342 | * @return string $title |
||
343 | */ |
||
344 | public function getTitle() |
||
348 | |||
349 | /** |
||
350 | * Sets the title |
||
351 | * |
||
352 | * @param string $title Title |
||
353 | * |
||
354 | * @return void |
||
355 | */ |
||
356 | public function setTitle($title) |
||
360 | |||
361 | /** |
||
362 | * Returns the teaser |
||
363 | * |
||
364 | * @return string |
||
365 | */ |
||
366 | public function getTeaser() |
||
370 | |||
371 | /** |
||
372 | * Sets the teaser |
||
373 | * |
||
374 | * @param string $teaser Teaser |
||
375 | * |
||
376 | * @return void |
||
377 | */ |
||
378 | public function setTeaser($teaser) |
||
382 | |||
383 | /** |
||
384 | * Returns the description |
||
385 | * |
||
386 | * @return string $description |
||
387 | */ |
||
388 | public function getDescription() |
||
392 | |||
393 | /** |
||
394 | * Sets the description |
||
395 | * |
||
396 | * @param string $description Description |
||
397 | * |
||
398 | * @return void |
||
399 | */ |
||
400 | public function setDescription($description) |
||
404 | |||
405 | /** |
||
406 | * Returns the program |
||
407 | * |
||
408 | * @return string $program |
||
409 | */ |
||
410 | public function getProgram() |
||
414 | |||
415 | /** |
||
416 | * Sets the program |
||
417 | * |
||
418 | * @param string $program The program |
||
419 | * |
||
420 | * @return void |
||
421 | */ |
||
422 | public function setProgram($program) |
||
426 | |||
427 | /** |
||
428 | * Returns the startdate |
||
429 | * |
||
430 | * @return \DateTime $startdate |
||
431 | */ |
||
432 | public function getStartdate() |
||
436 | |||
437 | /** |
||
438 | * Sets the startdate |
||
439 | * |
||
440 | * @param \DateTime $startdate Startdate |
||
441 | * |
||
442 | * @return void |
||
443 | */ |
||
444 | public function setStartdate(\DateTime $startdate) |
||
448 | |||
449 | /** |
||
450 | * Returns the enddate |
||
451 | * |
||
452 | * @return \DateTime $enddate |
||
453 | */ |
||
454 | public function getEnddate() |
||
458 | |||
459 | /** |
||
460 | * Sets the enddate |
||
461 | * |
||
462 | * @param \DateTime $enddate Enddate |
||
463 | * |
||
464 | * @return void |
||
465 | */ |
||
466 | public function setEnddate(\DateTime $enddate) |
||
470 | |||
471 | /** |
||
472 | * Returns the participants |
||
473 | * |
||
474 | * @return int $participants |
||
475 | */ |
||
476 | public function getMaxParticipants() |
||
480 | |||
481 | /** |
||
482 | * Sets the participants |
||
483 | * |
||
484 | * @param int $participants Participants |
||
485 | * |
||
486 | * @return void |
||
487 | */ |
||
488 | public function setMaxParticipants($participants) |
||
492 | |||
493 | /** |
||
494 | * Returns the price |
||
495 | * |
||
496 | * @return float $price |
||
497 | */ |
||
498 | public function getPrice() |
||
502 | |||
503 | /** |
||
504 | * Sets the price |
||
505 | * |
||
506 | * @param float $price Price |
||
507 | * |
||
508 | * @return void |
||
509 | */ |
||
510 | public function setPrice($price) |
||
514 | |||
515 | /** |
||
516 | * Returns the currency |
||
517 | * |
||
518 | * @return string $currency |
||
519 | */ |
||
520 | public function getCurrency() |
||
524 | |||
525 | /** |
||
526 | * Sets the currency |
||
527 | * |
||
528 | * @param string $currency Currency |
||
529 | * |
||
530 | * @return void |
||
531 | */ |
||
532 | public function setCurrency($currency) |
||
536 | |||
537 | /** |
||
538 | * Returns if payment is enabled |
||
539 | * |
||
540 | * @return bool |
||
541 | */ |
||
542 | public function getEnablePayment() |
||
546 | |||
547 | /** |
||
548 | * Sets enablePayment |
||
549 | * |
||
550 | * @param bool $enablePayment |
||
551 | * @return void |
||
552 | */ |
||
553 | public function setEnablePayment($enablePayment) |
||
557 | |||
558 | /** |
||
559 | * Returns if payment methods should be restricted |
||
560 | * |
||
561 | * @return bool |
||
562 | */ |
||
563 | public function getRestrictPaymentMethods() |
||
567 | |||
568 | /** |
||
569 | * Sets if payment methods should be restricted |
||
570 | * |
||
571 | * @param bool $restrictPaymentMethods |
||
572 | * @return void |
||
573 | */ |
||
574 | public function setRestrictPaymentMethods($restrictPaymentMethods) |
||
578 | |||
579 | /** |
||
580 | * Returns selected payment methods |
||
581 | * |
||
582 | * @return string |
||
583 | */ |
||
584 | public function getSelectedPaymentMethods() |
||
588 | |||
589 | /** |
||
590 | * Sets selected payment methods |
||
591 | * |
||
592 | * @param string $selectedPaymentMethods |
||
593 | * @return void |
||
594 | */ |
||
595 | public function setSelectedPaymentMethods($selectedPaymentMethods) |
||
599 | |||
600 | /** |
||
601 | * Adds a Category |
||
602 | * |
||
603 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Category $category Category |
||
604 | * |
||
605 | * @return void |
||
606 | */ |
||
607 | public function addCategory(\DERHANSEN\SfEventMgt\Domain\Model\Category $category) |
||
611 | |||
612 | /** |
||
613 | * Removes a Category |
||
614 | * |
||
615 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Category $categoryToRemove The Category to be removed |
||
616 | * |
||
617 | * @return void |
||
618 | */ |
||
619 | public function removeCategory(\DERHANSEN\SfEventMgt\Domain\Model\Category $categoryToRemove) |
||
623 | |||
624 | /** |
||
625 | * Returns the category |
||
626 | * |
||
627 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
||
628 | */ |
||
629 | public function getCategory() |
||
633 | |||
634 | /** |
||
635 | * Sets the category |
||
636 | * |
||
637 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $category Category |
||
638 | * |
||
639 | * @return void |
||
640 | */ |
||
641 | public function setCategory(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $category) |
||
645 | |||
646 | /** |
||
647 | * Returns related events |
||
648 | * |
||
649 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
||
650 | */ |
||
651 | public function getRelated() |
||
655 | |||
656 | /** |
||
657 | * Sets related events |
||
658 | * |
||
659 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $related |
||
660 | * @return void |
||
661 | */ |
||
662 | public function setRelated($related) |
||
666 | |||
667 | /** |
||
668 | * Adds a related event |
||
669 | * |
||
670 | * @param Event $event |
||
671 | * @return void |
||
672 | */ |
||
673 | public function addRelated(\DERHANSEN\SfEventMgt\Domain\Model\Event $event) |
||
677 | |||
678 | /** |
||
679 | * Removes a related event |
||
680 | * |
||
681 | * @param Event $event |
||
682 | * @return void |
||
683 | */ |
||
684 | public function removeRelated(\DERHANSEN\SfEventMgt\Domain\Model\Event $event) |
||
688 | |||
689 | /** |
||
690 | * Adds a Registration |
||
691 | * |
||
692 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Registration $registration Registration |
||
693 | * |
||
694 | * @return void |
||
695 | */ |
||
696 | public function addRegistration(\DERHANSEN\SfEventMgt\Domain\Model\Registration $registration) |
||
700 | |||
701 | /** |
||
702 | * Removes a Registration |
||
703 | * |
||
704 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Registration $registrationToRemove Registration |
||
705 | * |
||
706 | * @return void |
||
707 | */ |
||
708 | public function removeRegistration(\DERHANSEN\SfEventMgt\Domain\Model\Registration $registrationToRemove) |
||
712 | |||
713 | /** |
||
714 | * Returns the Registration |
||
715 | * |
||
716 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage $registration |
||
717 | */ |
||
718 | public function getRegistration() |
||
722 | |||
723 | /** |
||
724 | * Sets the Registration |
||
725 | * |
||
726 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $registration Registration |
||
727 | * |
||
728 | * @return void |
||
729 | */ |
||
730 | public function setRegistration(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $registration) |
||
734 | |||
735 | /** |
||
736 | * Adds an image |
||
737 | * |
||
738 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $image Image |
||
739 | * |
||
740 | * @return void |
||
741 | */ |
||
742 | public function addImage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $image) |
||
746 | |||
747 | /** |
||
748 | * Removes an image |
||
749 | * |
||
750 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $imageToRemove Image |
||
751 | * |
||
752 | * @return void |
||
753 | */ |
||
754 | public function removeImage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $imageToRemove) |
||
758 | |||
759 | /** |
||
760 | * Returns the image |
||
761 | * |
||
762 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage $image |
||
763 | */ |
||
764 | public function getImage() |
||
768 | |||
769 | /** |
||
770 | * Sets the image |
||
771 | * |
||
772 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $image Image |
||
773 | * |
||
774 | * @return void |
||
775 | */ |
||
776 | public function setImage(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $image) |
||
780 | |||
781 | /** |
||
782 | * Adds a file |
||
783 | * |
||
784 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $file File |
||
785 | * |
||
786 | * @return void |
||
787 | */ |
||
788 | public function addFiles(\TYPO3\CMS\Extbase\Domain\Model\FileReference $file) |
||
792 | |||
793 | /** |
||
794 | * Removes a file |
||
795 | * |
||
796 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $fileToRemove File |
||
797 | * |
||
798 | * @return void |
||
799 | */ |
||
800 | public function removeFiles(\TYPO3\CMS\Extbase\Domain\Model\FileReference $fileToRemove) |
||
804 | |||
805 | /** |
||
806 | * Returns the files |
||
807 | * |
||
808 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage $files |
||
809 | */ |
||
810 | public function getFiles() |
||
814 | |||
815 | /** |
||
816 | * Sets the files |
||
817 | * |
||
818 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $files Files |
||
819 | * |
||
820 | * @return void |
||
821 | */ |
||
822 | public function setFiles(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $files) |
||
826 | |||
827 | /** |
||
828 | * Returns if the registration for this event is logically possible |
||
829 | * |
||
830 | * @return bool |
||
831 | */ |
||
832 | public function getRegistrationPossible() |
||
847 | |||
848 | /** |
||
849 | * Returns the amount of free places |
||
850 | * |
||
851 | * @return int |
||
852 | */ |
||
853 | public function getFreePlaces() |
||
857 | |||
858 | /** |
||
859 | * Sets the location |
||
860 | * |
||
861 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Location $location Location |
||
862 | * |
||
863 | * @return void |
||
864 | */ |
||
865 | public function setLocation($location) |
||
869 | |||
870 | /** |
||
871 | * Returns the location |
||
872 | * |
||
873 | * @return \DERHANSEN\SfEventMgt\Domain\Model\Location |
||
874 | */ |
||
875 | public function getLocation() |
||
879 | |||
880 | /** |
||
881 | * Returns the room |
||
882 | * |
||
883 | * @return string |
||
884 | */ |
||
885 | public function getRoom() |
||
889 | |||
890 | /** |
||
891 | * Sets the room |
||
892 | * |
||
893 | * @param string $room |
||
894 | */ |
||
895 | public function setRoom($room) |
||
899 | |||
900 | /** |
||
901 | * Sets enableRegistration |
||
902 | * |
||
903 | * @param bool $enableRegistration EnableRegistration |
||
904 | * |
||
905 | * @return void |
||
906 | */ |
||
907 | public function setEnableRegistration($enableRegistration) |
||
911 | |||
912 | /** |
||
913 | * Returns if registration is enabled |
||
914 | * |
||
915 | * @return bool |
||
916 | */ |
||
917 | public function getEnableRegistration() |
||
921 | |||
922 | /** |
||
923 | * Returns enableWaitlist |
||
924 | * |
||
925 | * @return bool |
||
926 | */ |
||
927 | public function getEnableWaitlist() |
||
931 | |||
932 | /** |
||
933 | * Sets enableWaitlist |
||
934 | * |
||
935 | * @param bool $enableWaitlist |
||
936 | * @return void |
||
937 | */ |
||
938 | public function setEnableWaitlist($enableWaitlist) |
||
942 | |||
943 | /** |
||
944 | * Sets the registration deadline |
||
945 | * |
||
946 | * @param \DateTime $registrationDeadline RegistrationDeadline |
||
947 | * |
||
948 | * @return void |
||
949 | */ |
||
950 | public function setRegistrationDeadline(\DateTime $registrationDeadline) |
||
954 | |||
955 | /** |
||
956 | * Returns the registration deadline |
||
957 | * |
||
958 | * @return \DateTime |
||
959 | */ |
||
960 | public function getRegistrationDeadline() |
||
964 | |||
965 | /** |
||
966 | * Sets the link |
||
967 | * |
||
968 | * @param string $link Link |
||
969 | * |
||
970 | * @return void |
||
971 | */ |
||
972 | public function setLink($link) |
||
976 | |||
977 | /** |
||
978 | * Returns the link |
||
979 | * |
||
980 | * @return string |
||
981 | */ |
||
982 | public function getLink() |
||
986 | |||
987 | /** |
||
988 | * Sets topEvent |
||
989 | * |
||
990 | * @param bool $topEvent TopEvent |
||
991 | * |
||
992 | * @return void |
||
993 | */ |
||
994 | public function setTopEvent($topEvent) |
||
998 | |||
999 | /** |
||
1000 | * Returns if topEvent is checked |
||
1001 | * |
||
1002 | * @return bool |
||
1003 | */ |
||
1004 | public function getTopEvent() |
||
1008 | |||
1009 | /** |
||
1010 | * Returns max regisrations per user |
||
1011 | * |
||
1012 | * @return int |
||
1013 | */ |
||
1014 | public function getMaxRegistrationsPerUser() |
||
1018 | |||
1019 | /** |
||
1020 | * Sets max registrations per user |
||
1021 | * |
||
1022 | * @param int $maxRegistrationsPerUser MaxRegistrationsPerUser |
||
1023 | * |
||
1024 | * @return void |
||
1025 | */ |
||
1026 | public function setMaxRegistrationsPerUser($maxRegistrationsPerUser) |
||
1030 | |||
1031 | /** |
||
1032 | * Adds an additionalImage |
||
1033 | * |
||
1034 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $additionalImage The Image |
||
1035 | * |
||
1036 | * @return void |
||
1037 | */ |
||
1038 | public function addAdditionalImage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $additionalImage) |
||
1042 | |||
1043 | /** |
||
1044 | * Removes an additionalImage |
||
1045 | * |
||
1046 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $additionalImageToRemove The Image |
||
1047 | * |
||
1048 | * @return void |
||
1049 | */ |
||
1050 | public function removeAdditionalImage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $additionalImageToRemove) |
||
1054 | |||
1055 | /** |
||
1056 | * Returns the additionalImage |
||
1057 | * |
||
1058 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage $additionalImage |
||
1059 | */ |
||
1060 | public function getAdditionalImage() |
||
1064 | |||
1065 | /** |
||
1066 | * Sets the additionalImage |
||
1067 | * |
||
1068 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $additionalImage The Image |
||
1069 | * |
||
1070 | * @return void |
||
1071 | */ |
||
1072 | public function setAdditionalImage(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $additionalImage) |
||
1076 | |||
1077 | /** |
||
1078 | * Returns the organisator |
||
1079 | * |
||
1080 | * @return Organisator |
||
1081 | */ |
||
1082 | public function getOrganisator() |
||
1086 | |||
1087 | /** |
||
1088 | * Sets the organisator |
||
1089 | * |
||
1090 | * @param Organisator $organisator The organisator |
||
1091 | * |
||
1092 | * @return void |
||
1093 | */ |
||
1094 | public function setOrganisator($organisator) |
||
1098 | |||
1099 | /** |
||
1100 | * Returns notifyAdmin |
||
1101 | * |
||
1102 | * @return bool |
||
1103 | */ |
||
1104 | public function getNotifyAdmin() |
||
1108 | |||
1109 | /** |
||
1110 | * Sets notifyAdmin |
||
1111 | * |
||
1112 | * @param bool $notifyAdmin NotifyAdmin |
||
1113 | * |
||
1114 | * @return void |
||
1115 | */ |
||
1116 | public function setNotifyAdmin($notifyAdmin) |
||
1120 | |||
1121 | /** |
||
1122 | * Returns if notifyAdmin is set |
||
1123 | * |
||
1124 | * @return bool |
||
1125 | */ |
||
1126 | public function getNotifyOrganisator() |
||
1130 | |||
1131 | /** |
||
1132 | * Sets notifyOrganisator |
||
1133 | * |
||
1134 | * @param bool $notifyOrganisator NotifyOrganisator |
||
1135 | * |
||
1136 | * @return void |
||
1137 | */ |
||
1138 | public function setNotifyOrganisator($notifyOrganisator) |
||
1142 | |||
1143 | /** |
||
1144 | * Sets enableCancel |
||
1145 | * |
||
1146 | * @param bool $enableCancel EnableCancel |
||
1147 | * |
||
1148 | * @return void |
||
1149 | */ |
||
1150 | public function setEnableCancel($enableCancel) |
||
1154 | |||
1155 | /** |
||
1156 | * Returns if registration can be canceled |
||
1157 | * |
||
1158 | * @return bool |
||
1159 | */ |
||
1160 | public function getEnableCancel() |
||
1164 | |||
1165 | /** |
||
1166 | * Sets the cancel deadline |
||
1167 | * |
||
1168 | * @param \DateTime $cancelDeadline CancelDeadline |
||
1169 | * |
||
1170 | * @return void |
||
1171 | */ |
||
1172 | public function setCancelDeadline(\DateTime $cancelDeadline) |
||
1176 | |||
1177 | /** |
||
1178 | * Returns the cancel deadline |
||
1179 | * |
||
1180 | * @return \DateTime |
||
1181 | */ |
||
1182 | public function getCancelDeadline() |
||
1186 | |||
1187 | /** |
||
1188 | * Returns if autoconfirmation is enabled |
||
1189 | * |
||
1190 | * @return bool |
||
1191 | */ |
||
1192 | public function getEnableAutoconfirm() |
||
1196 | |||
1197 | /** |
||
1198 | * Sets enable autoconfirm |
||
1199 | * |
||
1200 | * @param bool $enableAutoconfirm |
||
1201 | * @return void |
||
1202 | */ |
||
1203 | public function setEnableAutoconfirm($enableAutoconfirm) |
||
1207 | |||
1208 | /** |
||
1209 | * Returns uniqueEmailCheck |
||
1210 | * |
||
1211 | * @return bool |
||
1212 | */ |
||
1213 | public function getUniqueEmailCheck() |
||
1217 | |||
1218 | /** |
||
1219 | * Sets UniqueEmailCheck |
||
1220 | * |
||
1221 | * @param bool $uniqueEmailCheck |
||
1222 | * @return void |
||
1223 | */ |
||
1224 | public function setUniqueEmailCheck($uniqueEmailCheck) |
||
1228 | |||
1229 | /** |
||
1230 | * Returns price options |
||
1231 | * |
||
1232 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
||
1233 | */ |
||
1234 | public function getPriceOptions() |
||
1238 | |||
1239 | /** |
||
1240 | * Sets price options |
||
1241 | * |
||
1242 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $priceOptions |
||
1243 | * @return void |
||
1244 | */ |
||
1245 | public function setPriceOptions($priceOptions) |
||
1249 | |||
1250 | /** |
||
1251 | * Adds a price option |
||
1252 | * |
||
1253 | * @param \DERHANSEN\SfEventMgt\Domain\Model\PriceOption $priceOption Price option |
||
1254 | * |
||
1255 | * @return void |
||
1256 | */ |
||
1257 | public function addPriceOptions(\DERHANSEN\SfEventMgt\Domain\Model\PriceOption $priceOption) |
||
1261 | |||
1262 | /** |
||
1263 | * Removes a Registration |
||
1264 | * |
||
1265 | * @param \DERHANSEN\SfEventMgt\Domain\Model\PriceOption $priceOption Price option |
||
1266 | * |
||
1267 | * @return void |
||
1268 | */ |
||
1269 | public function removePriceOptions(\DERHANSEN\SfEventMgt\Domain\Model\PriceOption $priceOption) |
||
1273 | |||
1274 | /** |
||
1275 | * Returns all active price options sorted by date ASC |
||
1276 | * |
||
1277 | * @return array |
||
1278 | */ |
||
1279 | public function getActivePriceOptions() |
||
1294 | |||
1295 | /** |
||
1296 | * Returns the current price of the event respecting possible price options |
||
1297 | * |
||
1298 | * @return float |
||
1299 | */ |
||
1300 | public function getCurrentPrice() |
||
1310 | |||
1311 | /** |
||
1312 | * Returns registrationWaitlist |
||
1313 | * |
||
1314 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
||
1315 | */ |
||
1316 | public function getRegistrationWaitlist() |
||
1320 | |||
1321 | /** |
||
1322 | * Sets registrationWaitlist |
||
1323 | * |
||
1324 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $registration Registration |
||
1325 | * |
||
1326 | * @return void |
||
1327 | */ |
||
1328 | public function setRegistrationWaitlist(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $registration) |
||
1332 | |||
1333 | /** |
||
1334 | * Adds a Registration to the waitlist |
||
1335 | * |
||
1336 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Registration $registration Registration |
||
1337 | * |
||
1338 | * @return void |
||
1339 | */ |
||
1340 | public function addRegistrationWaitlist(\DERHANSEN\SfEventMgt\Domain\Model\Registration $registration) |
||
1344 | |||
1345 | /** |
||
1346 | * Removes a Registration from the waitlist |
||
1347 | * |
||
1348 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Registration $registrationToRemove Registration |
||
1349 | * |
||
1350 | * @return void |
||
1351 | */ |
||
1352 | public function removeRegistrationWaitlist(\DERHANSEN\SfEventMgt\Domain\Model\Registration $registrationToRemove) |
||
1356 | |||
1357 | /** |
||
1358 | * Returns, if cancellation for registrations of the event is possible |
||
1359 | * |
||
1360 | * @return bool |
||
1361 | */ |
||
1362 | public function getCancellationPossible() |
||
1367 | |||
1368 | /** |
||
1369 | * Returns speaker |
||
1370 | * |
||
1371 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
||
1372 | */ |
||
1373 | public function getSpeaker() |
||
1377 | |||
1378 | /** |
||
1379 | * Sets speaker |
||
1380 | * |
||
1381 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $speaker |
||
1382 | * @return void |
||
1383 | */ |
||
1384 | public function setSpeaker($speaker) |
||
1388 | |||
1389 | /** |
||
1390 | * Adds a speaker |
||
1391 | * |
||
1392 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Speaker $speaker |
||
1393 | * |
||
1394 | * @return void |
||
1395 | */ |
||
1396 | public function addSpeaker(\DERHANSEN\SfEventMgt\Domain\Model\Speaker $speaker) |
||
1400 | |||
1401 | /** |
||
1402 | * Removes a speaker |
||
1403 | * |
||
1404 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Speaker $speaker |
||
1405 | * |
||
1406 | * @return void |
||
1407 | */ |
||
1408 | public function removeSpeaker(\DERHANSEN\SfEventMgt\Domain\Model\Speaker $speaker) |
||
1412 | |||
1413 | /** |
||
1414 | * Returns registrationFields |
||
1415 | * |
||
1416 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
||
1417 | */ |
||
1418 | public function getRegistrationFields() |
||
1422 | |||
1423 | /** |
||
1424 | * Sets registrationWaitlist |
||
1425 | * |
||
1426 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $registrationFields |
||
1427 | * |
||
1428 | * @return void |
||
1429 | */ |
||
1430 | public function setRegistrationFields(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $registrationFields) |
||
1434 | |||
1435 | /** |
||
1436 | * Adds a registrationField |
||
1437 | * |
||
1438 | * @param Field $registrationField |
||
1439 | */ |
||
1440 | public function addRegistrationFields(Field $registrationField) |
||
1444 | |||
1445 | /** |
||
1446 | * Removed a registrationField |
||
1447 | * |
||
1448 | * @param Field $registrationField |
||
1449 | */ |
||
1450 | public function removeRegistrationFields(Field $registrationField) |
||
1454 | |||
1455 | /** |
||
1456 | * Returns an array with registration field uids |
||
1457 | * |
||
1458 | * @return array |
||
1459 | */ |
||
1460 | public function getRegistrationFieldsUids() |
||
1469 | |||
1470 | /** |
||
1471 | * Returns an array with registration field uids and titles |
||
1472 | * [uid => title] |
||
1473 | * |
||
1474 | * @return array |
||
1475 | */ |
||
1476 | public function getRegistrationFieldUidsWithTitle() |
||
1485 | |||
1486 | /** |
||
1487 | * Special getter to return the amount of registrations that are saved to default language |
||
1488 | * Required since TYPO3 9.5 (#82363) |
||
1489 | * |
||
1490 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
||
1491 | */ |
||
1492 | public function getRegistrations() |
||
1500 | |||
1501 | /** |
||
1502 | * Special getter to return the amount of waitlist registrations that are saved to default language |
||
1503 | * Required since TYPO3 9.5 (#82363) |
||
1504 | * |
||
1505 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
||
1506 | */ |
||
1507 | public function getRegistrationsWaitlist() |
||
1516 | |||
1517 | /** |
||
1518 | * Returns an objectStorage object holding all registrations in the default language. |
||
1519 | * Ensures expected behavior of getRegistration() and getRegistrationWaitlist() since TYPO3 issue #82363 |
||
1520 | * |
||
1521 | * @param bool $waitlist |
||
1522 | * @return ObjectStorage |
||
1523 | */ |
||
1524 | protected function getRegistrationsDefaultLanguage(bool $waitlist = false) |
||
1536 | |||
1537 | /** |
||
1538 | * Returns if the event ends on the same day |
||
1539 | * |
||
1540 | * @return bool |
||
1541 | */ |
||
1542 | public function getEndsSameDay(): bool |
||
1550 | |||
1551 | /** |
||
1552 | * Returns the challenge for the challenge/response spam check |
||
1553 | * |
||
1554 | * @return string |
||
1555 | */ |
||
1556 | public function getSpamCheckChallenge(): string |
||
1560 | } |
||
1561 |