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 | 362 | /** |
|
278 | * Price options |
||
279 | 362 | * |
|
280 | 362 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DERHANSEN\SfEventMgt\Domain\Model\PriceOption> |
|
281 | 362 | * @cascade remove |
|
282 | 362 | * @lazy |
|
283 | 362 | */ |
|
284 | 362 | protected $priceOptions = null; |
|
285 | 362 | ||
286 | 362 | /** |
|
287 | 362 | * Speaker |
|
288 | * |
||
289 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DERHANSEN\SfEventMgt\Domain\Model\Speaker> |
||
290 | * @lazy |
||
291 | */ |
||
292 | protected $speaker = null; |
||
293 | |||
294 | 10 | /** |
|
295 | * Constructor |
||
296 | 10 | */ |
|
297 | public function __construct() |
||
310 | |||
311 | /** |
||
312 | * Get timestamp |
||
313 | * |
||
314 | * @return \DateTime |
||
315 | */ |
||
316 | 2 | public function getTstamp() |
|
320 | |||
321 | /** |
||
322 | * Set time stamp |
||
323 | * |
||
324 | * @param \DateTime $tstamp time stamp |
||
325 | */ |
||
326 | public function setTstamp($tstamp) |
||
330 | 2 | ||
331 | 2 | /** |
|
332 | * Returns the title |
||
333 | * |
||
334 | * @return string $title |
||
335 | */ |
||
336 | public function getTitle() |
||
340 | 2 | ||
341 | /** |
||
342 | * Sets the title |
||
343 | * |
||
344 | * @param string $title Title |
||
345 | * |
||
346 | * @return void |
||
347 | */ |
||
348 | public function setTitle($title) |
||
352 | 2 | ||
353 | 2 | /** |
|
354 | * Returns the teaser |
||
355 | * |
||
356 | * @return string |
||
357 | */ |
||
358 | public function getTeaser() |
||
362 | 2 | ||
363 | /** |
||
364 | * Sets the teaser |
||
365 | * |
||
366 | * @param string $teaser Teaser |
||
367 | * |
||
368 | * @return void |
||
369 | */ |
||
370 | public function setTeaser($teaser) |
||
374 | 2 | ||
375 | 2 | /** |
|
376 | * Returns the description |
||
377 | * |
||
378 | * @return string $description |
||
379 | */ |
||
380 | public function getDescription() |
||
384 | 22 | ||
385 | /** |
||
386 | * Sets the description |
||
387 | * |
||
388 | * @param string $description Description |
||
389 | * |
||
390 | * @return void |
||
391 | */ |
||
392 | public function setDescription($description) |
||
396 | 22 | ||
397 | 22 | /** |
|
398 | * Returns the program |
||
399 | * |
||
400 | * @return string $program |
||
401 | */ |
||
402 | public function getProgram() |
||
406 | 2 | ||
407 | /** |
||
408 | * Sets the program |
||
409 | * |
||
410 | * @param string $program The program |
||
411 | * |
||
412 | * @return void |
||
413 | */ |
||
414 | public function setProgram($program) |
||
418 | 2 | ||
419 | 2 | /** |
|
420 | * Returns the startdate |
||
421 | * |
||
422 | * @return \DateTime $startdate |
||
423 | */ |
||
424 | public function getStartdate() |
||
428 | 28 | ||
429 | /** |
||
430 | * Sets the startdate |
||
431 | * |
||
432 | * @param \DateTime $startdate Startdate |
||
433 | * |
||
434 | * @return void |
||
435 | */ |
||
436 | public function setStartdate(\DateTime $startdate) |
||
440 | 26 | ||
441 | 26 | /** |
|
442 | * Returns the enddate |
||
443 | * |
||
444 | * @return \DateTime $enddate |
||
445 | */ |
||
446 | public function getEnddate() |
||
450 | 2 | ||
451 | /** |
||
452 | * Sets the enddate |
||
453 | * |
||
454 | * @param \DateTime $enddate Enddate |
||
455 | * |
||
456 | * @return void |
||
457 | */ |
||
458 | public function setEnddate(\DateTime $enddate) |
||
462 | 6 | ||
463 | 6 | /** |
|
464 | * Returns the participants |
||
465 | * |
||
466 | * @return int $participants |
||
467 | */ |
||
468 | public function getMaxParticipants() |
||
472 | 2 | ||
473 | /** |
||
474 | * Sets the participants |
||
475 | * |
||
476 | * @param int $participants Participants |
||
477 | * |
||
478 | * @return void |
||
479 | */ |
||
480 | public function setMaxParticipants($participants) |
||
484 | 2 | ||
485 | 2 | /** |
|
486 | * Returns the price |
||
487 | * |
||
488 | * @return float $price |
||
489 | */ |
||
490 | public function getPrice() |
||
494 | 8 | ||
495 | /** |
||
496 | * Sets the price |
||
497 | * |
||
498 | * @param float $price Price |
||
499 | * |
||
500 | * @return void |
||
501 | */ |
||
502 | public function setPrice($price) |
||
506 | 6 | ||
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 | 2 | public function setCurrency($currency) |
|
528 | |||
529 | /** |
||
530 | * Returns if payment is enabled |
||
531 | * |
||
532 | * @return bool |
||
533 | */ |
||
534 | 4 | public function getEnablePayment() |
|
538 | |||
539 | /** |
||
540 | * Sets enablePayment |
||
541 | * |
||
542 | * @param bool $enablePayment |
||
543 | * @return void |
||
544 | */ |
||
545 | 2 | public function setEnablePayment($enablePayment) |
|
549 | |||
550 | /** |
||
551 | * Returns if payment methods should be restricted |
||
552 | * |
||
553 | * @return bool |
||
554 | */ |
||
555 | public function getRestrictPaymentMethods() |
||
559 | 2 | ||
560 | 2 | /** |
|
561 | * Sets if payment methods should be restricted |
||
562 | * |
||
563 | * @param bool $restrictPaymentMethods |
||
564 | * @return void |
||
565 | */ |
||
566 | public function setRestrictPaymentMethods($restrictPaymentMethods) |
||
570 | |||
571 | 2 | /** |
|
572 | 2 | * Returns selected payment methods |
|
573 | * |
||
574 | * @return string |
||
575 | */ |
||
576 | public function getSelectedPaymentMethods() |
||
580 | |||
581 | 2 | /** |
|
582 | * Sets selected payment methods |
||
583 | * |
||
584 | * @param string $selectedPaymentMethods |
||
585 | * @return void |
||
586 | */ |
||
587 | public function setSelectedPaymentMethods($selectedPaymentMethods) |
||
591 | 6 | ||
592 | /** |
||
593 | 6 | * Adds a Category |
|
594 | 6 | * |
|
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 | 4 | ||
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 | 6 | ||
616 | /** |
||
617 | * Returns the category |
||
618 | * |
||
619 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
||
620 | */ |
||
621 | public function getCategory() |
||
625 | 2 | ||
626 | 2 | /** |
|
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 | 2 | ||
638 | /** |
||
639 | * Returns related events |
||
640 | * |
||
641 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
||
642 | */ |
||
643 | public function getRelated() |
||
647 | |||
648 | 4 | /** |
|
649 | 4 | * Sets related events |
|
650 | * |
||
651 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $related |
||
652 | * @return void |
||
653 | */ |
||
654 | public function setRelated($related) |
||
658 | 2 | ||
659 | /** |
||
660 | 2 | * Adds a related event |
|
661 | 2 | * |
|
662 | * @param Event $event |
||
663 | * @return void |
||
664 | */ |
||
665 | public function addRelated(\DERHANSEN\SfEventMgt\Domain\Model\Event $event) |
||
669 | |||
670 | 24 | /** |
|
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 | 18 | ||
681 | /** |
||
682 | 18 | * Adds a Registration |
|
683 | 18 | * |
|
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 | 2 | ||
693 | /** |
||
694 | 2 | * Removes a Registration |
|
695 | 2 | * |
|
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 | 2 | ||
705 | /** |
||
706 | 2 | * Returns the Registration |
|
707 | 2 | * |
|
708 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage $registration |
||
709 | */ |
||
710 | public function getRegistration() |
||
714 | 2 | ||
715 | /** |
||
716 | 2 | * Sets the Registration |
|
717 | * |
||
718 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $registration Registration |
||
719 | * |
||
720 | * @return void |
||
721 | */ |
||
722 | public function setRegistration(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $registration) |
||
726 | 6 | ||
727 | /** |
||
728 | 6 | * Adds an image |
|
729 | 6 | * |
|
730 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $image Image |
||
731 | * |
||
732 | * @return void |
||
733 | */ |
||
734 | public function addImage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $image) |
||
738 | 4 | ||
739 | /** |
||
740 | 4 | * Removes an image |
|
741 | 4 | * |
|
742 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $imageToRemove Image |
||
743 | * |
||
744 | * @return void |
||
745 | */ |
||
746 | public function removeImage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $imageToRemove) |
||
750 | 2 | ||
751 | /** |
||
752 | 2 | * Returns the image |
|
753 | 2 | * |
|
754 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage $image |
||
755 | */ |
||
756 | public function getImage() |
||
760 | 2 | ||
761 | /** |
||
762 | 2 | * Sets the image |
|
763 | * |
||
764 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $image Image |
||
765 | * |
||
766 | * @return void |
||
767 | */ |
||
768 | public function setImage(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $image) |
||
772 | 6 | ||
773 | /** |
||
774 | 6 | * Adds a file |
|
775 | 6 | * |
|
776 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $file File |
||
777 | * |
||
778 | * @return void |
||
779 | */ |
||
780 | public function addFiles(\TYPO3\CMS\Extbase\Domain\Model\FileReference $file) |
||
784 | 4 | ||
785 | /** |
||
786 | * Removes a file |
||
787 | * |
||
788 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $fileToRemove File |
||
789 | * |
||
790 | * @return void |
||
791 | */ |
||
792 | public function removeFiles(\TYPO3\CMS\Extbase\Domain\Model\FileReference $fileToRemove) |
||
796 | 2 | ||
797 | 2 | /** |
|
798 | * Returns the files |
||
799 | * |
||
800 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage $files |
||
801 | */ |
||
802 | public function getFiles() |
||
806 | 20 | ||
807 | 20 | /** |
|
808 | 6 | * Sets the files |
|
809 | 6 | * |
|
810 | 20 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $files Files |
|
811 | 20 | * |
|
812 | 2 | * @return void |
|
813 | 2 | */ |
|
814 | 20 | public function setFiles(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $files) |
|
818 | |||
819 | /** |
||
820 | * Returns if the registration for this event is logically possible |
||
821 | * |
||
822 | * @return bool |
||
823 | */ |
||
824 | 10 | public function getRegistrationPossible() |
|
839 | 2 | ||
840 | /** |
||
841 | * Returns the amount of free places |
||
842 | * |
||
843 | * @return int |
||
844 | */ |
||
845 | public function getFreePlaces() |
||
849 | |||
850 | /** |
||
851 | * Sets the location |
||
852 | * |
||
853 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Location $location Location |
||
854 | * |
||
855 | * @return void |
||
856 | */ |
||
857 | public function setLocation($location) |
||
861 | 20 | ||
862 | /** |
||
863 | * Returns the location |
||
864 | * |
||
865 | * @return \DERHANSEN\SfEventMgt\Domain\Model\Location |
||
866 | */ |
||
867 | public function getLocation() |
||
871 | |||
872 | /** |
||
873 | * Sets enableRegistration |
||
874 | * |
||
875 | * @param bool $enableRegistration EnableRegistration |
||
876 | * |
||
877 | * @return void |
||
878 | 8 | */ |
|
879 | public function setEnableRegistration($enableRegistration) |
||
883 | |||
884 | /** |
||
885 | * Returns if registration is enabled |
||
886 | * |
||
887 | * @return bool |
||
888 | */ |
||
889 | 10 | public function getEnableRegistration() |
|
893 | |||
894 | /** |
||
895 | * Returns enableWaitlist |
||
896 | * |
||
897 | * @return bool |
||
898 | */ |
||
899 | public function getEnableWaitlist() |
||
903 | 6 | ||
904 | 6 | /** |
|
905 | * Sets enableWaitlist |
||
906 | * |
||
907 | * @param bool $enableWaitlist |
||
908 | * @return void |
||
909 | */ |
||
910 | public function setEnableWaitlist($enableWaitlist) |
||
914 | |||
915 | /** |
||
916 | * Sets the registration deadline |
||
917 | * |
||
918 | * @param \DateTime $registrationDeadline RegistrationDeadline |
||
919 | * |
||
920 | * @return void |
||
921 | */ |
||
922 | public function setRegistrationDeadline(\DateTime $registrationDeadline) |
||
926 | 24 | ||
927 | /** |
||
928 | * Returns the registration deadline |
||
929 | * |
||
930 | * @return \DateTime |
||
931 | */ |
||
932 | public function getRegistrationDeadline() |
||
936 | |||
937 | /** |
||
938 | * Sets the link |
||
939 | * |
||
940 | * @param string $link Link |
||
941 | * |
||
942 | * @return void |
||
943 | 2 | */ |
|
944 | public function setLink($link) |
||
948 | |||
949 | /** |
||
950 | * Returns the link |
||
951 | * |
||
952 | * @return string |
||
953 | 2 | */ |
|
954 | public function getLink() |
||
958 | |||
959 | /** |
||
960 | * Sets topEvent |
||
961 | * |
||
962 | * @param bool $topEvent TopEvent |
||
963 | 2 | * |
|
964 | * @return void |
||
965 | 2 | */ |
|
966 | public function setTopEvent($topEvent) |
||
970 | |||
971 | /** |
||
972 | * Returns if topEvent is checked |
||
973 | * |
||
974 | * @return bool |
||
975 | */ |
||
976 | public function getTopEvent() |
||
980 | 22 | ||
981 | 22 | /** |
|
982 | 22 | * Returns max regisrations per user |
|
983 | 22 | * |
|
984 | 22 | * @return int |
|
985 | 2 | */ |
|
986 | 2 | public function getMaxRegistrationsPerUser() |
|
990 | |||
991 | /** |
||
992 | * Sets max registrations per user |
||
993 | * |
||
994 | * @param int $maxRegistrationsPerUser MaxRegistrationsPerUser |
||
995 | * |
||
996 | * @return void |
||
997 | 2 | */ |
|
998 | public function setMaxRegistrationsPerUser($maxRegistrationsPerUser) |
||
1002 | |||
1003 | /** |
||
1004 | * Adds an additionalImage |
||
1005 | * |
||
1006 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $additionalImage The Image |
||
1007 | 2 | * |
|
1008 | * @return void |
||
1009 | 2 | */ |
|
1010 | public function addAdditionalImage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $additionalImage) |
||
1014 | |||
1015 | /** |
||
1016 | * Removes an additionalImage |
||
1017 | 4 | * |
|
1018 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $additionalImageToRemove The Image |
||
1019 | 4 | * |
|
1020 | * @return void |
||
1021 | */ |
||
1022 | public function removeAdditionalImage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $additionalImageToRemove) |
||
1026 | |||
1027 | /** |
||
1028 | * Returns the additionalImage |
||
1029 | 2 | * |
|
1030 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage $additionalImage |
||
1031 | 2 | */ |
|
1032 | 2 | public function getAdditionalImage() |
|
1036 | |||
1037 | /** |
||
1038 | * Sets the additionalImage |
||
1039 | * |
||
1040 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $additionalImage The Image |
||
1041 | * |
||
1042 | 2 | * @return void |
|
1043 | */ |
||
1044 | 2 | public function setAdditionalImage(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $additionalImage) |
|
1048 | |||
1049 | /** |
||
1050 | * Returns the organisator |
||
1051 | * |
||
1052 | * @return Organisator |
||
1053 | */ |
||
1054 | 2 | public function getOrganisator() |
|
1058 | |||
1059 | /** |
||
1060 | * Sets the organisator |
||
1061 | * |
||
1062 | * @param Organisator $organisator The organisator |
||
1063 | * |
||
1064 | 2 | * @return void |
|
1065 | */ |
||
1066 | 2 | public function setOrganisator($organisator) |
|
1070 | |||
1071 | /** |
||
1072 | * Returns notifyAdmin |
||
1073 | * |
||
1074 | * @return bool |
||
1075 | */ |
||
1076 | 6 | public function getNotifyAdmin() |
|
1080 | |||
1081 | /** |
||
1082 | * Sets notifyAdmin |
||
1083 | * |
||
1084 | * @param bool $notifyAdmin NotifyAdmin |
||
1085 | * |
||
1086 | 12 | * @return void |
|
1087 | */ |
||
1088 | 12 | public function setNotifyAdmin($notifyAdmin) |
|
1092 | |||
1093 | /** |
||
1094 | * Returns if notifyAdmin is set |
||
1095 | * |
||
1096 | * @return bool |
||
1097 | */ |
||
1098 | 12 | public function getNotifyOrganisator() |
|
1102 | |||
1103 | /** |
||
1104 | * Sets notifyOrganisator |
||
1105 | * |
||
1106 | * @param bool $notifyOrganisator NotifyOrganisator |
||
1107 | * |
||
1108 | 54 | * @return void |
|
1109 | */ |
||
1110 | 54 | public function setNotifyOrganisator($notifyOrganisator) |
|
1114 | |||
1115 | /** |
||
1116 | * Sets enableCancel |
||
1117 | * |
||
1118 | * @param bool $enableCancel EnableCancel |
||
1119 | * |
||
1120 | 22 | * @return void |
|
1121 | */ |
||
1122 | 22 | public function setEnableCancel($enableCancel) |
|
1126 | |||
1127 | /** |
||
1128 | * Returns if registration can be canceled |
||
1129 | * |
||
1130 | 54 | * @return bool |
|
1131 | */ |
||
1132 | 54 | public function getEnableCancel() |
|
1136 | |||
1137 | /** |
||
1138 | * Sets the cancel deadline |
||
1139 | * |
||
1140 | * @param \DateTime $cancelDeadline CancelDeadline |
||
1141 | * |
||
1142 | 22 | * @return void |
|
1143 | */ |
||
1144 | 22 | public function setCancelDeadline(\DateTime $cancelDeadline) |
|
1148 | |||
1149 | /** |
||
1150 | * Returns the cancel deadline |
||
1151 | * |
||
1152 | * @return \DateTime |
||
1153 | */ |
||
1154 | 8 | public function getCancelDeadline() |
|
1158 | |||
1159 | /** |
||
1160 | * Returns if autoconfirmation is enabled |
||
1161 | * |
||
1162 | * @return bool |
||
1163 | */ |
||
1164 | 10 | public function getEnableAutoconfirm() |
|
1168 | |||
1169 | /** |
||
1170 | * Sets enable autoconfirm |
||
1171 | * |
||
1172 | * @param bool $enableAutoconfirm |
||
1173 | * @return void |
||
1174 | */ |
||
1175 | public function setEnableAutoconfirm($enableAutoconfirm) |
||
1179 | 8 | ||
1180 | /** |
||
1181 | * Returns uniqueEmailCheck |
||
1182 | * |
||
1183 | * @return bool |
||
1184 | */ |
||
1185 | public function getUniqueEmailCheck() |
||
1189 | |||
1190 | /** |
||
1191 | * Sets UniqueEmailCheck |
||
1192 | * |
||
1193 | * @param bool $uniqueEmailCheck |
||
1194 | * @return void |
||
1195 | */ |
||
1196 | 4 | public function setUniqueEmailCheck($uniqueEmailCheck) |
|
1200 | |||
1201 | /** |
||
1202 | * Returns price options |
||
1203 | * |
||
1204 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
||
1205 | */ |
||
1206 | public function getPriceOptions() |
||
1210 | 2 | ||
1211 | /** |
||
1212 | * Sets price options |
||
1213 | * |
||
1214 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $priceOptions |
||
1215 | * @return void |
||
1216 | */ |
||
1217 | 10 | public function setPriceOptions($priceOptions) |
|
1221 | |||
1222 | /** |
||
1223 | * Adds a price option |
||
1224 | * |
||
1225 | * @param \DERHANSEN\SfEventMgt\Domain\Model\PriceOption $priceOption Price option |
||
1226 | * |
||
1227 | * @return void |
||
1228 | 6 | */ |
|
1229 | public function addPriceOptions(\DERHANSEN\SfEventMgt\Domain\Model\PriceOption $priceOption) |
||
1233 | |||
1234 | /** |
||
1235 | * Removes a Registration |
||
1236 | * |
||
1237 | * @param \DERHANSEN\SfEventMgt\Domain\Model\PriceOption $priceOption Price option |
||
1238 | * |
||
1239 | * @return void |
||
1240 | 6 | */ |
|
1241 | public function removePriceOptions(\DERHANSEN\SfEventMgt\Domain\Model\PriceOption $priceOption) |
||
1245 | |||
1246 | /** |
||
1247 | * Returns all active price options sorted by date ASC |
||
1248 | * |
||
1249 | * @return array |
||
1250 | */ |
||
1251 | public function getActivePriceOptions() |
||
1266 | 6 | ||
1267 | 6 | /** |
|
1268 | 4 | * Returns the current price of the event respecting possible price options |
|
1269 | 4 | * |
|
1270 | 4 | * @return float |
|
1271 | 6 | */ |
|
1272 | 6 | public function getCurrentPrice() |
|
1282 | 4 | ||
1283 | /** |
||
1284 | 4 | * Returns registrationWaitlist |
|
1285 | 4 | * |
|
1286 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
||
1287 | 2 | */ |
|
1288 | public function getRegistrationWaitlist() |
||
1292 | |||
1293 | /** |
||
1294 | * Sets registrationWaitlist |
||
1295 | * |
||
1296 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $registration Registration |
||
1297 | * |
||
1298 | * @return void |
||
1299 | 2 | */ |
|
1300 | public function setRegistrationWaitlist(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $registration) |
||
1304 | |||
1305 | /** |
||
1306 | * Adds a Registration to the waitlist |
||
1307 | * |
||
1308 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Registration $registration Registration |
||
1309 | * |
||
1310 | * @return void |
||
1311 | 6 | */ |
|
1312 | public function addRegistrationWaitlist(\DERHANSEN\SfEventMgt\Domain\Model\Registration $registration) |
||
1316 | |||
1317 | /** |
||
1318 | * Removes a Registration from the waitlist |
||
1319 | * |
||
1320 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Registration $registrationToRemove Registration |
||
1321 | * |
||
1322 | * @return void |
||
1323 | 2 | */ |
|
1324 | public function removeRegistrationWaitlist(\DERHANSEN\SfEventMgt\Domain\Model\Registration $registrationToRemove) |
||
1328 | |||
1329 | /** |
||
1330 | * Returns, if cancellation for registrations of the event is possible |
||
1331 | * |
||
1332 | * @return bool |
||
1333 | */ |
||
1334 | public function getCancellationPossible() |
||
1339 | |||
1340 | /** |
||
1341 | * Returns speaker |
||
1342 | * |
||
1343 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
||
1344 | */ |
||
1345 | 6 | public function getSpeaker() |
|
1349 | |||
1350 | /** |
||
1351 | * Sets speaker |
||
1352 | * |
||
1353 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $speaker |
||
1354 | * @return void |
||
1355 | */ |
||
1356 | public function setSpeaker($speaker) |
||
1360 | |||
1361 | /** |
||
1362 | * Adds a speaker |
||
1363 | * |
||
1364 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Speaker $speaker |
||
1365 | * |
||
1366 | * @return void |
||
1367 | */ |
||
1368 | public function addSpeaker(\DERHANSEN\SfEventMgt\Domain\Model\Speaker $speaker) |
||
1372 | |||
1373 | /** |
||
1374 | * Removes a speaker |
||
1375 | * |
||
1376 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Speaker $speaker |
||
1377 | * |
||
1378 | * @return void |
||
1379 | */ |
||
1380 | public function removeSpeaker(\DERHANSEN\SfEventMgt\Domain\Model\Speaker $speaker) |
||
1384 | |||
1385 | /** |
||
1386 | * Returns registrationFields |
||
1387 | * |
||
1388 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
||
1389 | */ |
||
1390 | public function getRegistrationFields() |
||
1394 | |||
1395 | /** |
||
1396 | * Sets registrationWaitlist |
||
1397 | * |
||
1398 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $registrationFields |
||
1399 | * |
||
1400 | * @return void |
||
1401 | */ |
||
1402 | public function setRegistrationFields(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $registrationFields) |
||
1406 | |||
1407 | /** |
||
1408 | * Adds a registrationField |
||
1409 | * |
||
1410 | * @param Field $registrationField |
||
1411 | */ |
||
1412 | public function addRegistrationFields(Field $registrationField) |
||
1416 | |||
1417 | /** |
||
1418 | * Removed a registrationField |
||
1419 | * |
||
1420 | * @param Field $registrationField |
||
1421 | */ |
||
1422 | public function removeRegistrationFields(Field $registrationField) |
||
1426 | |||
1427 | /** |
||
1428 | * Returns an array with registration field uids |
||
1429 | * |
||
1430 | * @return array |
||
1431 | */ |
||
1432 | public function getRegistrationFieldsUids() |
||
1441 | |||
1442 | /** |
||
1443 | * Returns an array with registration field uids and titles |
||
1444 | * [uid => title] |
||
1445 | * |
||
1446 | * @return array |
||
1447 | */ |
||
1448 | public function getRegistrationFieldUidsWithTitle() |
||
1457 | |||
1458 | /** |
||
1459 | * Special getter to return the amount of registrations that are saved to default language |
||
1460 | * Required since TYPO3 9.5 (#82363) |
||
1461 | * |
||
1462 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
||
1463 | */ |
||
1464 | public function getRegistrations() |
||
1472 | |||
1473 | /** |
||
1474 | * Special getter to return the amount of waitlist registrations that are saved to default language |
||
1475 | * Required since TYPO3 9.5 (#82363) |
||
1476 | * |
||
1477 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
||
1478 | */ |
||
1479 | public function getRegistrationsWaitlist() |
||
1488 | |||
1489 | /** |
||
1490 | * Returns an objectStorage object holding all registrations in the default language. |
||
1491 | * Ensures expected behavior of getRegistration() and getRegistrationWaitlist() since TYPO3 issue #82363 |
||
1492 | * |
||
1493 | * @param bool $waitlist |
||
1494 | * @return ObjectStorage |
||
1495 | */ |
||
1496 | protected function getRegistrationsDefaultLanguage(bool $waitlist = false) |
||
1508 | |||
1509 | /** |
||
1510 | * Returns if the event ends on the same day |
||
1511 | * |
||
1512 | * @return bool |
||
1513 | */ |
||
1514 | public function getEndsSameDay(): bool |
||
1522 | } |
||
1523 |