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 |
||
22 | class Event extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity |
||
23 | { |
||
24 | /** |
||
25 | * @var \DateTime |
||
26 | */ |
||
27 | protected $tstamp; |
||
28 | |||
29 | /** |
||
30 | * Title |
||
31 | * |
||
32 | * @var string |
||
33 | * @validate NotEmpty |
||
34 | */ |
||
35 | protected $title = ''; |
||
36 | |||
37 | /** |
||
38 | * Teaser |
||
39 | * |
||
40 | * @var string |
||
41 | */ |
||
42 | protected $teaser = ''; |
||
43 | |||
44 | /** |
||
45 | * Description |
||
46 | * |
||
47 | * @var string |
||
48 | */ |
||
49 | protected $description = ''; |
||
50 | |||
51 | /** |
||
52 | * Program/Schedule |
||
53 | * |
||
54 | * @var string |
||
55 | */ |
||
56 | protected $program = ''; |
||
57 | |||
58 | /** |
||
59 | * Startdate and time |
||
60 | * |
||
61 | * @var \DateTime |
||
62 | */ |
||
63 | protected $startdate = null; |
||
64 | |||
65 | /** |
||
66 | * Enddate and time |
||
67 | * |
||
68 | * @var \DateTime |
||
69 | */ |
||
70 | protected $enddate = null; |
||
71 | |||
72 | /** |
||
73 | * Max participants |
||
74 | * |
||
75 | * @var int |
||
76 | */ |
||
77 | protected $maxParticipants = 0; |
||
78 | |||
79 | /** |
||
80 | * Max registrations per user |
||
81 | * |
||
82 | * @var int |
||
83 | */ |
||
84 | protected $maxRegistrationsPerUser = 1; |
||
85 | |||
86 | /** |
||
87 | * Price |
||
88 | * |
||
89 | * @var float |
||
90 | */ |
||
91 | protected $price = 0.0; |
||
92 | |||
93 | /** |
||
94 | * Currency |
||
95 | * |
||
96 | * @var string |
||
97 | */ |
||
98 | protected $currency = ''; |
||
99 | |||
100 | /** |
||
101 | * Enable payment |
||
102 | * |
||
103 | * @var bool |
||
104 | */ |
||
105 | protected $enablePayment = false; |
||
106 | |||
107 | /** |
||
108 | * Restrict payment methods |
||
109 | * |
||
110 | * @var bool |
||
111 | */ |
||
112 | protected $restrictPaymentMethods = false; |
||
113 | |||
114 | /** |
||
115 | * Selected payment methods |
||
116 | * |
||
117 | * @var string |
||
118 | */ |
||
119 | protected $selectedPaymentMethods = ''; |
||
120 | |||
121 | /** |
||
122 | * Category |
||
123 | * |
||
124 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DERHANSEN\SfEventMgt\Domain\Model\Category> |
||
125 | * @lazy |
||
126 | */ |
||
127 | protected $category = null; |
||
128 | |||
129 | /** |
||
130 | * Related |
||
131 | * |
||
132 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DERHANSEN\SfEventMgt\Domain\Model\Event> |
||
133 | * @lazy |
||
134 | */ |
||
135 | protected $related; |
||
136 | |||
137 | /** |
||
138 | * Registration |
||
139 | * |
||
140 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DERHANSEN\SfEventMgt\Domain\Model\Registration> |
||
141 | * @cascade remove |
||
142 | * @lazy |
||
143 | */ |
||
144 | protected $registration = null; |
||
145 | |||
146 | /** |
||
147 | * Registration waitlist |
||
148 | * |
||
149 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DERHANSEN\SfEventMgt\Domain\Model\Registration> |
||
150 | * @lazy |
||
151 | */ |
||
152 | protected $registrationWaitlist; |
||
153 | |||
154 | /** |
||
155 | * Registration fields |
||
156 | * |
||
157 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DERHANSEN\SfEventMgt\Domain\Model\Registration\Field> |
||
158 | * @lazy |
||
159 | */ |
||
160 | protected $registrationFields; |
||
161 | |||
162 | /** |
||
163 | * Registration deadline date |
||
164 | * |
||
165 | * @var \DateTime |
||
166 | */ |
||
167 | protected $registrationDeadline = null; |
||
168 | |||
169 | /** |
||
170 | * The image |
||
171 | * |
||
172 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference> |
||
173 | * @lazy |
||
174 | */ |
||
175 | protected $image = null; |
||
176 | |||
177 | /** |
||
178 | * Additional files |
||
179 | * |
||
180 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference> |
||
181 | * @lazy |
||
182 | */ |
||
183 | protected $files = null; |
||
184 | |||
185 | /** |
||
186 | * The Location |
||
187 | * |
||
188 | * @var \DERHANSEN\SfEventMgt\Domain\Model\Location |
||
189 | */ |
||
190 | protected $location = null; |
||
191 | |||
192 | /** |
||
193 | * Enable registration |
||
194 | * |
||
195 | * @var bool |
||
196 | */ |
||
197 | protected $enableRegistration = false; |
||
198 | |||
199 | /** |
||
200 | * Enable waitlist |
||
201 | * |
||
202 | * @var bool |
||
203 | */ |
||
204 | protected $enableWaitlist = false; |
||
205 | |||
206 | /** |
||
207 | * Link |
||
208 | * |
||
209 | * @var string |
||
210 | */ |
||
211 | protected $link; |
||
212 | |||
213 | /** |
||
214 | * Top event |
||
215 | * |
||
216 | * @var bool |
||
217 | */ |
||
218 | protected $topEvent = false; |
||
219 | |||
220 | /** |
||
221 | * The additionalImage |
||
222 | * |
||
223 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference> |
||
224 | * @lazy |
||
225 | */ |
||
226 | protected $additionalImage = null; |
||
227 | |||
228 | /** |
||
229 | * The organisator |
||
230 | * |
||
231 | * @var \DERHANSEN\SfEventMgt\Domain\Model\Organisator |
||
232 | */ |
||
233 | protected $organisator = null; |
||
234 | |||
235 | /** |
||
236 | * Notify admin |
||
237 | * |
||
238 | * @var bool |
||
239 | */ |
||
240 | protected $notifyAdmin = true; |
||
241 | |||
242 | /** |
||
243 | * Notify organisator |
||
244 | * |
||
245 | * @var bool |
||
246 | */ |
||
247 | protected $notifyOrganisator = false; |
||
248 | |||
249 | /** |
||
250 | * Enable cancel of registration |
||
251 | * |
||
252 | * @var bool |
||
253 | */ |
||
254 | protected $enableCancel = false; |
||
255 | |||
256 | /** |
||
257 | * Deadline for cancel |
||
258 | * |
||
259 | * @var \DateTime |
||
260 | */ |
||
261 | protected $cancelDeadline = null; |
||
262 | |||
263 | /** |
||
264 | * Enable auto confirmation |
||
265 | * |
||
266 | * @var bool |
||
267 | */ |
||
268 | protected $enableAutoconfirm = false; |
||
269 | |||
270 | /** |
||
271 | * Unique e-mail check |
||
272 | * |
||
273 | * @var bool |
||
274 | */ |
||
275 | protected $uniqueEmailCheck = false; |
||
276 | |||
277 | /** |
||
278 | * Price options |
||
279 | * |
||
280 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DERHANSEN\SfEventMgt\Domain\Model\PriceOption> |
||
281 | * @cascade remove |
||
282 | * @lazy |
||
283 | */ |
||
284 | protected $priceOptions = null; |
||
285 | |||
286 | /** |
||
287 | * Speaker |
||
288 | * |
||
289 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DERHANSEN\SfEventMgt\Domain\Model\Speaker> |
||
290 | * @lazy |
||
291 | */ |
||
292 | protected $speaker = null; |
||
293 | |||
294 | /** |
||
295 | * Constructor |
||
296 | */ |
||
297 | public function __construct() |
||
310 | |||
311 | /** |
||
312 | * Get timestamp |
||
313 | * |
||
314 | * @return \DateTime |
||
315 | */ |
||
316 | public function getTstamp() |
||
320 | |||
321 | /** |
||
322 | * Set time stamp |
||
323 | * |
||
324 | * @param \DateTime $tstamp time stamp |
||
325 | */ |
||
326 | public function setTstamp($tstamp) |
||
330 | |||
331 | /** |
||
332 | * Returns the title |
||
333 | * |
||
334 | * @return string $title |
||
335 | */ |
||
336 | public function getTitle() |
||
340 | |||
341 | /** |
||
342 | * Sets the title |
||
343 | * |
||
344 | * @param string $title Title |
||
345 | * |
||
346 | * @return void |
||
347 | */ |
||
348 | public function setTitle($title) |
||
352 | |||
353 | /** |
||
354 | * Returns the teaser |
||
355 | * |
||
356 | * @return string |
||
357 | */ |
||
358 | public function getTeaser() |
||
362 | |||
363 | /** |
||
364 | * Sets the teaser |
||
365 | * |
||
366 | * @param string $teaser Teaser |
||
367 | * |
||
368 | * @return void |
||
369 | */ |
||
370 | public function setTeaser($teaser) |
||
374 | |||
375 | /** |
||
376 | * Returns the description |
||
377 | * |
||
378 | * @return string $description |
||
379 | */ |
||
380 | public function getDescription() |
||
384 | |||
385 | /** |
||
386 | * Sets the description |
||
387 | * |
||
388 | * @param string $description Description |
||
389 | * |
||
390 | * @return void |
||
391 | */ |
||
392 | public function setDescription($description) |
||
396 | |||
397 | /** |
||
398 | * Returns the program |
||
399 | * |
||
400 | * @return string $program |
||
401 | */ |
||
402 | public function getProgram() |
||
406 | |||
407 | /** |
||
408 | * Sets the program |
||
409 | * |
||
410 | * @param string $program The program |
||
411 | * |
||
412 | * @return void |
||
413 | */ |
||
414 | public function setProgram($program) |
||
418 | |||
419 | /** |
||
420 | * Returns the startdate |
||
421 | * |
||
422 | * @return \DateTime $startdate |
||
423 | */ |
||
424 | public function getStartdate() |
||
428 | |||
429 | /** |
||
430 | * Sets the startdate |
||
431 | * |
||
432 | * @param \DateTime $startdate Startdate |
||
433 | * |
||
434 | * @return void |
||
435 | */ |
||
436 | public function setStartdate(\DateTime $startdate) |
||
440 | |||
441 | /** |
||
442 | * Returns the enddate |
||
443 | * |
||
444 | * @return \DateTime $enddate |
||
445 | */ |
||
446 | public function getEnddate() |
||
450 | |||
451 | /** |
||
452 | * Sets the enddate |
||
453 | * |
||
454 | * @param \DateTime $enddate Enddate |
||
455 | * |
||
456 | * @return void |
||
457 | */ |
||
458 | public function setEnddate(\DateTime $enddate) |
||
462 | |||
463 | /** |
||
464 | * Returns the participants |
||
465 | * |
||
466 | * @return int $participants |
||
467 | */ |
||
468 | public function getMaxParticipants() |
||
472 | |||
473 | /** |
||
474 | * Sets the participants |
||
475 | * |
||
476 | * @param int $participants Participants |
||
477 | * |
||
478 | * @return void |
||
479 | */ |
||
480 | public function setMaxParticipants($participants) |
||
484 | |||
485 | /** |
||
486 | * Returns the price |
||
487 | * |
||
488 | * @return float $price |
||
489 | */ |
||
490 | public function getPrice() |
||
494 | |||
495 | /** |
||
496 | * Sets the price |
||
497 | * |
||
498 | * @param float $price Price |
||
499 | * |
||
500 | * @return void |
||
501 | */ |
||
502 | public function setPrice($price) |
||
506 | |||
507 | /** |
||
508 | * Returns the currency |
||
509 | * |
||
510 | * @return string $currency |
||
511 | */ |
||
512 | public function getCurrency() |
||
516 | |||
517 | /** |
||
518 | * Sets the currency |
||
519 | * |
||
520 | * @param string $currency Currency |
||
521 | * |
||
522 | * @return void |
||
523 | */ |
||
524 | public function setCurrency($currency) |
||
528 | |||
529 | /** |
||
530 | * Returns if payment is enabled |
||
531 | * |
||
532 | * @return bool |
||
533 | */ |
||
534 | public function getEnablePayment() |
||
538 | |||
539 | /** |
||
540 | * Sets enablePayment |
||
541 | * |
||
542 | * @param bool $enablePayment |
||
543 | * @return void |
||
544 | */ |
||
545 | public function setEnablePayment($enablePayment) |
||
549 | |||
550 | /** |
||
551 | * Returns if payment methods should be restricted |
||
552 | * |
||
553 | * @return bool |
||
554 | */ |
||
555 | public function getRestrictPaymentMethods() |
||
559 | |||
560 | /** |
||
561 | * Sets if payment methods should be restricted |
||
562 | * |
||
563 | * @param bool $restrictPaymentMethods |
||
564 | * @return void |
||
565 | */ |
||
566 | public function setRestrictPaymentMethods($restrictPaymentMethods) |
||
570 | |||
571 | /** |
||
572 | * Returns selected payment methods |
||
573 | * |
||
574 | * @return string |
||
575 | */ |
||
576 | public function getSelectedPaymentMethods() |
||
580 | |||
581 | /** |
||
582 | * Sets selected payment methods |
||
583 | * |
||
584 | * @param string $selectedPaymentMethods |
||
585 | * @return void |
||
586 | */ |
||
587 | public function setSelectedPaymentMethods($selectedPaymentMethods) |
||
591 | |||
592 | /** |
||
593 | * Adds a Category |
||
594 | * |
||
595 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Category $category Category |
||
596 | * |
||
597 | * @return void |
||
598 | */ |
||
599 | public function addCategory(\DERHANSEN\SfEventMgt\Domain\Model\Category $category) |
||
603 | |||
604 | /** |
||
605 | * Removes a Category |
||
606 | * |
||
607 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Category $categoryToRemove The Category to be removed |
||
608 | * |
||
609 | * @return void |
||
610 | */ |
||
611 | public function removeCategory(\DERHANSEN\SfEventMgt\Domain\Model\Category $categoryToRemove) |
||
615 | |||
616 | /** |
||
617 | * Returns the category |
||
618 | * |
||
619 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
||
620 | */ |
||
621 | public function getCategory() |
||
625 | |||
626 | /** |
||
627 | * Sets the category |
||
628 | * |
||
629 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $category Category |
||
630 | * |
||
631 | * @return void |
||
632 | */ |
||
633 | public function setCategory(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $category) |
||
637 | |||
638 | /** |
||
639 | * Returns related events |
||
640 | * |
||
641 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
||
642 | */ |
||
643 | public function getRelated() |
||
647 | |||
648 | /** |
||
649 | * Sets related events |
||
650 | * |
||
651 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $related |
||
652 | * @return void |
||
653 | */ |
||
654 | public function setRelated($related) |
||
658 | |||
659 | /** |
||
660 | * Adds a related event |
||
661 | * |
||
662 | * @param Event $event |
||
663 | * @return void |
||
664 | */ |
||
665 | public function addRelated(\DERHANSEN\SfEventMgt\Domain\Model\Event $event) |
||
669 | |||
670 | /** |
||
671 | * Removes a related event |
||
672 | * |
||
673 | * @param Event $event |
||
674 | * @return void |
||
675 | */ |
||
676 | public function removeRelated(\DERHANSEN\SfEventMgt\Domain\Model\Event $event) |
||
680 | |||
681 | /** |
||
682 | * Adds a Registration |
||
683 | * |
||
684 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Registration $registration Registration |
||
685 | * |
||
686 | * @return void |
||
687 | */ |
||
688 | public function addRegistration(\DERHANSEN\SfEventMgt\Domain\Model\Registration $registration) |
||
692 | |||
693 | /** |
||
694 | * Removes a Registration |
||
695 | * |
||
696 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Registration $registrationToRemove Registration |
||
697 | * |
||
698 | * @return void |
||
699 | */ |
||
700 | public function removeRegistration(\DERHANSEN\SfEventMgt\Domain\Model\Registration $registrationToRemove) |
||
704 | |||
705 | /** |
||
706 | * Returns the Registration |
||
707 | * |
||
708 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage $registration |
||
709 | */ |
||
710 | public function getRegistration() |
||
719 | |||
720 | /** |
||
721 | * Sets the Registration |
||
722 | * |
||
723 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $registration Registration |
||
724 | * |
||
725 | * @return void |
||
726 | */ |
||
727 | public function setRegistration(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $registration) |
||
731 | |||
732 | /** |
||
733 | * Adds an image |
||
734 | * |
||
735 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $image Image |
||
736 | * |
||
737 | * @return void |
||
738 | */ |
||
739 | public function addImage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $image) |
||
743 | |||
744 | /** |
||
745 | * Removes an image |
||
746 | * |
||
747 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $imageToRemove Image |
||
748 | * |
||
749 | * @return void |
||
750 | */ |
||
751 | public function removeImage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $imageToRemove) |
||
755 | |||
756 | /** |
||
757 | * Returns the image |
||
758 | * |
||
759 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage $image |
||
760 | */ |
||
761 | public function getImage() |
||
765 | |||
766 | /** |
||
767 | * Sets the image |
||
768 | * |
||
769 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $image Image |
||
770 | * |
||
771 | * @return void |
||
772 | */ |
||
773 | public function setImage(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $image) |
||
777 | |||
778 | /** |
||
779 | * Adds a file |
||
780 | * |
||
781 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $file File |
||
782 | * |
||
783 | * @return void |
||
784 | */ |
||
785 | public function addFiles(\TYPO3\CMS\Extbase\Domain\Model\FileReference $file) |
||
789 | |||
790 | /** |
||
791 | * Removes a file |
||
792 | * |
||
793 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $fileToRemove File |
||
794 | * |
||
795 | * @return void |
||
796 | */ |
||
797 | public function removeFiles(\TYPO3\CMS\Extbase\Domain\Model\FileReference $fileToRemove) |
||
801 | |||
802 | /** |
||
803 | * Returns the files |
||
804 | * |
||
805 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage $files |
||
806 | */ |
||
807 | public function getFiles() |
||
811 | |||
812 | /** |
||
813 | * Sets the files |
||
814 | * |
||
815 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $files Files |
||
816 | * |
||
817 | * @return void |
||
818 | */ |
||
819 | public function setFiles(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $files) |
||
823 | |||
824 | /** |
||
825 | * Returns if the registration for this event is logically possible |
||
826 | * |
||
827 | * @return bool |
||
828 | */ |
||
829 | public function getRegistrationPossible() |
||
844 | |||
845 | /** |
||
846 | * Returns the amount of free places |
||
847 | * |
||
848 | * @return int |
||
849 | */ |
||
850 | public function getFreePlaces() |
||
854 | |||
855 | /** |
||
856 | * Sets the location |
||
857 | * |
||
858 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Location $location Location |
||
859 | * |
||
860 | * @return void |
||
861 | */ |
||
862 | public function setLocation($location) |
||
866 | |||
867 | /** |
||
868 | * Returns the location |
||
869 | * |
||
870 | * @return \DERHANSEN\SfEventMgt\Domain\Model\Location |
||
871 | */ |
||
872 | public function getLocation() |
||
876 | |||
877 | /** |
||
878 | * Sets enableRegistration |
||
879 | * |
||
880 | * @param bool $enableRegistration EnableRegistration |
||
881 | * |
||
882 | * @return void |
||
883 | */ |
||
884 | public function setEnableRegistration($enableRegistration) |
||
888 | |||
889 | /** |
||
890 | * Returns if registration is enabled |
||
891 | * |
||
892 | * @return bool |
||
893 | */ |
||
894 | public function getEnableRegistration() |
||
898 | |||
899 | /** |
||
900 | * Returns enableWaitlist |
||
901 | * |
||
902 | * @return bool |
||
903 | */ |
||
904 | public function getEnableWaitlist() |
||
908 | |||
909 | /** |
||
910 | * Sets enableWaitlist |
||
911 | * |
||
912 | * @param bool $enableWaitlist |
||
913 | * @return void |
||
914 | */ |
||
915 | public function setEnableWaitlist($enableWaitlist) |
||
919 | |||
920 | /** |
||
921 | * Sets the registration deadline |
||
922 | * |
||
923 | * @param \DateTime $registrationDeadline RegistrationDeadline |
||
924 | * |
||
925 | * @return void |
||
926 | */ |
||
927 | public function setRegistrationDeadline(\DateTime $registrationDeadline) |
||
931 | |||
932 | /** |
||
933 | * Returns the registration deadline |
||
934 | * |
||
935 | * @return \DateTime |
||
936 | */ |
||
937 | public function getRegistrationDeadline() |
||
941 | |||
942 | /** |
||
943 | * Sets the link |
||
944 | * |
||
945 | * @param string $link Link |
||
946 | * |
||
947 | * @return void |
||
948 | */ |
||
949 | public function setLink($link) |
||
953 | |||
954 | /** |
||
955 | * Returns the link |
||
956 | * |
||
957 | * @return string |
||
958 | */ |
||
959 | public function getLink() |
||
963 | |||
964 | /** |
||
965 | * Sets topEvent |
||
966 | * |
||
967 | * @param bool $topEvent TopEvent |
||
968 | * |
||
969 | * @return void |
||
970 | */ |
||
971 | public function setTopEvent($topEvent) |
||
975 | |||
976 | /** |
||
977 | * Returns if topEvent is checked |
||
978 | * |
||
979 | * @return bool |
||
980 | */ |
||
981 | public function getTopEvent() |
||
985 | |||
986 | /** |
||
987 | * Returns max regisrations per user |
||
988 | * |
||
989 | * @return int |
||
990 | */ |
||
991 | public function getMaxRegistrationsPerUser() |
||
995 | |||
996 | /** |
||
997 | * Sets max registrations per user |
||
998 | * |
||
999 | * @param int $maxRegistrationsPerUser MaxRegistrationsPerUser |
||
1000 | * |
||
1001 | * @return void |
||
1002 | */ |
||
1003 | public function setMaxRegistrationsPerUser($maxRegistrationsPerUser) |
||
1007 | |||
1008 | /** |
||
1009 | * Adds an additionalImage |
||
1010 | * |
||
1011 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $additionalImage The Image |
||
1012 | * |
||
1013 | * @return void |
||
1014 | */ |
||
1015 | public function addAdditionalImage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $additionalImage) |
||
1019 | |||
1020 | /** |
||
1021 | * Removes an additionalImage |
||
1022 | * |
||
1023 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $additionalImageToRemove The Image |
||
1024 | * |
||
1025 | * @return void |
||
1026 | */ |
||
1027 | public function removeAdditionalImage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $additionalImageToRemove) |
||
1031 | |||
1032 | /** |
||
1033 | * Returns the additionalImage |
||
1034 | * |
||
1035 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage $additionalImage |
||
1036 | */ |
||
1037 | public function getAdditionalImage() |
||
1041 | |||
1042 | /** |
||
1043 | * Sets the additionalImage |
||
1044 | * |
||
1045 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $additionalImage The Image |
||
1046 | * |
||
1047 | * @return void |
||
1048 | */ |
||
1049 | public function setAdditionalImage(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $additionalImage) |
||
1053 | |||
1054 | /** |
||
1055 | * Returns the organisator |
||
1056 | * |
||
1057 | * @return Organisator |
||
1058 | */ |
||
1059 | public function getOrganisator() |
||
1063 | |||
1064 | /** |
||
1065 | * Sets the organisator |
||
1066 | * |
||
1067 | * @param Organisator $organisator The organisator |
||
1068 | * |
||
1069 | * @return void |
||
1070 | */ |
||
1071 | public function setOrganisator($organisator) |
||
1075 | |||
1076 | /** |
||
1077 | * Returns notifyAdmin |
||
1078 | * |
||
1079 | * @return bool |
||
1080 | */ |
||
1081 | public function getNotifyAdmin() |
||
1085 | |||
1086 | /** |
||
1087 | * Sets notifyAdmin |
||
1088 | * |
||
1089 | * @param bool $notifyAdmin NotifyAdmin |
||
1090 | * |
||
1091 | * @return void |
||
1092 | */ |
||
1093 | public function setNotifyAdmin($notifyAdmin) |
||
1097 | |||
1098 | /** |
||
1099 | * Returns if notifyAdmin is set |
||
1100 | * |
||
1101 | * @return bool |
||
1102 | */ |
||
1103 | public function getNotifyOrganisator() |
||
1107 | |||
1108 | /** |
||
1109 | * Sets notifyOrganisator |
||
1110 | * |
||
1111 | * @param bool $notifyOrganisator NotifyOrganisator |
||
1112 | * |
||
1113 | * @return void |
||
1114 | */ |
||
1115 | public function setNotifyOrganisator($notifyOrganisator) |
||
1119 | |||
1120 | /** |
||
1121 | * Sets enableCancel |
||
1122 | * |
||
1123 | * @param bool $enableCancel EnableCancel |
||
1124 | * |
||
1125 | * @return void |
||
1126 | */ |
||
1127 | public function setEnableCancel($enableCancel) |
||
1131 | |||
1132 | /** |
||
1133 | * Returns if registration can be canceled |
||
1134 | * |
||
1135 | * @return bool |
||
1136 | */ |
||
1137 | public function getEnableCancel() |
||
1141 | |||
1142 | /** |
||
1143 | * Sets the cancel deadline |
||
1144 | * |
||
1145 | * @param \DateTime $cancelDeadline CancelDeadline |
||
1146 | * |
||
1147 | * @return void |
||
1148 | */ |
||
1149 | public function setCancelDeadline(\DateTime $cancelDeadline) |
||
1153 | |||
1154 | /** |
||
1155 | * Returns the cancel deadline |
||
1156 | * |
||
1157 | * @return \DateTime |
||
1158 | */ |
||
1159 | public function getCancelDeadline() |
||
1163 | |||
1164 | /** |
||
1165 | * Returns if autoconfirmation is enabled |
||
1166 | * |
||
1167 | * @return bool |
||
1168 | */ |
||
1169 | public function getEnableAutoconfirm() |
||
1173 | |||
1174 | /** |
||
1175 | * Sets enable autoconfirm |
||
1176 | * |
||
1177 | * @param bool $enableAutoconfirm |
||
1178 | * @return void |
||
1179 | */ |
||
1180 | public function setEnableAutoconfirm($enableAutoconfirm) |
||
1184 | |||
1185 | /** |
||
1186 | * Returns uniqueEmailCheck |
||
1187 | * |
||
1188 | * @return bool |
||
1189 | */ |
||
1190 | public function getUniqueEmailCheck() |
||
1194 | |||
1195 | /** |
||
1196 | * Sets UniqueEmailCheck |
||
1197 | * |
||
1198 | * @param bool $uniqueEmailCheck |
||
1199 | * @return void |
||
1200 | */ |
||
1201 | public function setUniqueEmailCheck($uniqueEmailCheck) |
||
1205 | |||
1206 | /** |
||
1207 | * Returns price options |
||
1208 | * |
||
1209 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
||
1210 | */ |
||
1211 | public function getPriceOptions() |
||
1215 | |||
1216 | /** |
||
1217 | * Sets price options |
||
1218 | * |
||
1219 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $priceOptions |
||
1220 | * @return void |
||
1221 | */ |
||
1222 | public function setPriceOptions($priceOptions) |
||
1226 | |||
1227 | /** |
||
1228 | * Adds a price option |
||
1229 | * |
||
1230 | * @param \DERHANSEN\SfEventMgt\Domain\Model\PriceOption $priceOption Price option |
||
1231 | * |
||
1232 | * @return void |
||
1233 | */ |
||
1234 | public function addPriceOptions(\DERHANSEN\SfEventMgt\Domain\Model\PriceOption $priceOption) |
||
1238 | |||
1239 | /** |
||
1240 | * Removes a Registration |
||
1241 | * |
||
1242 | * @param \DERHANSEN\SfEventMgt\Domain\Model\PriceOption $priceOption Price option |
||
1243 | * |
||
1244 | * @return void |
||
1245 | */ |
||
1246 | public function removePriceOptions(\DERHANSEN\SfEventMgt\Domain\Model\PriceOption $priceOption) |
||
1250 | |||
1251 | /** |
||
1252 | * Returns all active price options sorted by date ASC |
||
1253 | * |
||
1254 | * @return array |
||
1255 | */ |
||
1256 | public function getActivePriceOptions() |
||
1271 | |||
1272 | /** |
||
1273 | * Returns the current price of the event respecting possible price options |
||
1274 | * |
||
1275 | * @return float |
||
1276 | */ |
||
1277 | public function getCurrentPrice() |
||
1287 | |||
1288 | /** |
||
1289 | * Returns registrationWaitlist |
||
1290 | * |
||
1291 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
||
1292 | */ |
||
1293 | public function getRegistrationWaitlist() |
||
1302 | |||
1303 | /** |
||
1304 | * Sets registrationWaitlist |
||
1305 | * |
||
1306 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $registration Registration |
||
1307 | * |
||
1308 | * @return void |
||
1309 | */ |
||
1310 | public function setRegistrationWaitlist(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $registration) |
||
1314 | |||
1315 | /** |
||
1316 | * Adds a Registration to the waitlist |
||
1317 | * |
||
1318 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Registration $registration Registration |
||
1319 | * |
||
1320 | * @return void |
||
1321 | */ |
||
1322 | public function addRegistrationWaitlist(\DERHANSEN\SfEventMgt\Domain\Model\Registration $registration) |
||
1326 | |||
1327 | /** |
||
1328 | * Removes a Registration from the waitlist |
||
1329 | * |
||
1330 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Registration $registrationToRemove Registration |
||
1331 | * |
||
1332 | * @return void |
||
1333 | */ |
||
1334 | public function removeRegistrationWaitlist(\DERHANSEN\SfEventMgt\Domain\Model\Registration $registrationToRemove) |
||
1338 | |||
1339 | /** |
||
1340 | * Returns, if cancellation for registrations of the event is possible |
||
1341 | * |
||
1342 | * @return bool |
||
1343 | */ |
||
1344 | public function getCancellationPossible() |
||
1349 | |||
1350 | /** |
||
1351 | * Returns speaker |
||
1352 | * |
||
1353 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
||
1354 | */ |
||
1355 | public function getSpeaker() |
||
1359 | |||
1360 | /** |
||
1361 | * Sets speaker |
||
1362 | * |
||
1363 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $speaker |
||
1364 | * @return void |
||
1365 | */ |
||
1366 | public function setSpeaker($speaker) |
||
1370 | |||
1371 | /** |
||
1372 | * Adds a speaker |
||
1373 | * |
||
1374 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Speaker $speaker |
||
1375 | * |
||
1376 | * @return void |
||
1377 | */ |
||
1378 | public function addSpeaker(\DERHANSEN\SfEventMgt\Domain\Model\Speaker $speaker) |
||
1382 | |||
1383 | /** |
||
1384 | * Removes a speaker |
||
1385 | * |
||
1386 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Speaker $speaker |
||
1387 | * |
||
1388 | * @return void |
||
1389 | */ |
||
1390 | public function removeSpeaker(\DERHANSEN\SfEventMgt\Domain\Model\Speaker $speaker) |
||
1394 | |||
1395 | /** |
||
1396 | * Returns registrationFields |
||
1397 | * |
||
1398 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
||
1399 | */ |
||
1400 | public function getRegistrationFields() |
||
1404 | |||
1405 | /** |
||
1406 | * Sets registrationWaitlist |
||
1407 | * |
||
1408 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $registrationFields |
||
1409 | * |
||
1410 | * @return void |
||
1411 | */ |
||
1412 | public function setRegistrationFields(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $registrationFields) |
||
1416 | |||
1417 | /** |
||
1418 | * Adds a registrationField |
||
1419 | * |
||
1420 | * @param Field $registrationField |
||
1421 | */ |
||
1422 | public function addRegistrationFields(Field $registrationField) |
||
1426 | |||
1427 | /** |
||
1428 | * Removed a registrationField |
||
1429 | * |
||
1430 | * @param Field $registrationField |
||
1431 | */ |
||
1432 | public function removeRegistrationFields(Field $registrationField) |
||
1436 | |||
1437 | /** |
||
1438 | * Returns an array with registration field uids |
||
1439 | * |
||
1440 | * @return array |
||
1441 | */ |
||
1442 | public function getRegistrationFieldsUids() |
||
1451 | |||
1452 | /** |
||
1453 | * Returns an array with registration field uids and titles |
||
1454 | * [uid => title] |
||
1455 | * |
||
1456 | * @return array |
||
1457 | */ |
||
1458 | public function getRegistrationFieldUidsWithTitle() |
||
1467 | |||
1468 | /** |
||
1469 | * Returns an objectStorage object holding all registrations in the default language. |
||
1470 | * Ensures expected behavior of getRegistration() and getRegistrationWaitlist() since TYPO3 issue #82363 |
||
1471 | * |
||
1472 | * @param bool $waitlist |
||
1473 | * @return ObjectStorage |
||
1474 | */ |
||
1475 | protected function getRegistrations(bool $waitlist = false) |
||
1486 | } |
||
1487 |