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 |
||
26 | class Event extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity |
||
27 | { |
||
28 | /** |
||
29 | * @var \DateTime |
||
30 | */ |
||
31 | protected $tstamp; |
||
32 | |||
33 | /** |
||
34 | * @var bool |
||
35 | */ |
||
36 | protected $hidden = false; |
||
37 | |||
38 | /** |
||
39 | * @var \DateTime |
||
40 | */ |
||
41 | protected $starttime; |
||
42 | |||
43 | /** |
||
44 | * @var \DateTime |
||
45 | */ |
||
46 | protected $endtime; |
||
47 | |||
48 | /** |
||
49 | * Title |
||
50 | * |
||
51 | * @var string |
||
52 | */ |
||
53 | protected $title = ''; |
||
54 | |||
55 | /** |
||
56 | * Teaser |
||
57 | * |
||
58 | * @var string |
||
59 | */ |
||
60 | protected $teaser = ''; |
||
61 | |||
62 | /** |
||
63 | * Description |
||
64 | * |
||
65 | * @var string |
||
66 | */ |
||
67 | protected $description = ''; |
||
68 | |||
69 | /** |
||
70 | * Program/Schedule |
||
71 | * |
||
72 | * @var string |
||
73 | */ |
||
74 | protected $program = ''; |
||
75 | |||
76 | /** |
||
77 | * Startdate and time |
||
78 | * |
||
79 | * @var \DateTime |
||
80 | */ |
||
81 | protected $startdate; |
||
82 | |||
83 | /** |
||
84 | * Enddate and time |
||
85 | * |
||
86 | * @var \DateTime |
||
87 | */ |
||
88 | protected $enddate; |
||
89 | |||
90 | /** |
||
91 | * Max participants |
||
92 | * |
||
93 | * @var int |
||
94 | */ |
||
95 | protected $maxParticipants = 0; |
||
96 | |||
97 | /** |
||
98 | * Max registrations per user |
||
99 | * |
||
100 | * @var int |
||
101 | */ |
||
102 | protected $maxRegistrationsPerUser = 1; |
||
103 | |||
104 | /** |
||
105 | * Price |
||
106 | * |
||
107 | * @var float |
||
108 | */ |
||
109 | protected $price = 0.0; |
||
110 | |||
111 | /** |
||
112 | * Currency |
||
113 | * |
||
114 | * @var string |
||
115 | */ |
||
116 | protected $currency = ''; |
||
117 | |||
118 | /** |
||
119 | * Enable payment |
||
120 | * |
||
121 | * @var bool |
||
122 | */ |
||
123 | protected $enablePayment = false; |
||
124 | |||
125 | /** |
||
126 | * Restrict payment methods |
||
127 | * |
||
128 | * @var bool |
||
129 | */ |
||
130 | protected $restrictPaymentMethods = false; |
||
131 | |||
132 | /** |
||
133 | * Selected payment methods |
||
134 | * |
||
135 | * @var string |
||
136 | */ |
||
137 | protected $selectedPaymentMethods = ''; |
||
138 | |||
139 | /** |
||
140 | * Category |
||
141 | * |
||
142 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DERHANSEN\SfEventMgt\Domain\Model\Category> |
||
143 | * @Extbase\ORM\Lazy |
||
144 | */ |
||
145 | protected $category; |
||
146 | |||
147 | /** |
||
148 | * Related |
||
149 | * |
||
150 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DERHANSEN\SfEventMgt\Domain\Model\Event> |
||
151 | * @Extbase\ORM\Lazy |
||
152 | */ |
||
153 | protected $related; |
||
154 | |||
155 | /** |
||
156 | * Registration |
||
157 | * |
||
158 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DERHANSEN\SfEventMgt\Domain\Model\Registration> |
||
159 | * @Extbase\ORM\Cascade("remove") |
||
160 | * @Extbase\ORM\Lazy |
||
161 | */ |
||
162 | protected $registration; |
||
163 | |||
164 | /** |
||
165 | * Registration waitlist |
||
166 | * |
||
167 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DERHANSEN\SfEventMgt\Domain\Model\Registration> |
||
168 | * @Extbase\ORM\Lazy |
||
169 | */ |
||
170 | protected $registrationWaitlist; |
||
171 | |||
172 | /** |
||
173 | * Registration fields |
||
174 | * |
||
175 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DERHANSEN\SfEventMgt\Domain\Model\Registration\Field> |
||
176 | * @Extbase\ORM\Lazy |
||
177 | */ |
||
178 | protected $registrationFields; |
||
179 | |||
180 | /** |
||
181 | * Registration start date |
||
182 | * |
||
183 | * @var \DateTime |
||
184 | */ |
||
185 | protected $registrationStartdate; |
||
186 | |||
187 | /** |
||
188 | * Registration deadline date |
||
189 | * |
||
190 | * @var \DateTime |
||
191 | */ |
||
192 | protected $registrationDeadline; |
||
193 | |||
194 | /** |
||
195 | * The image |
||
196 | * |
||
197 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference> |
||
198 | * @Extbase\ORM\Lazy |
||
199 | */ |
||
200 | protected $image; |
||
201 | |||
202 | /** |
||
203 | * Additional files |
||
204 | * |
||
205 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference> |
||
206 | * @Extbase\ORM\Lazy |
||
207 | */ |
||
208 | protected $files; |
||
209 | |||
210 | /** |
||
211 | * The Location |
||
212 | * |
||
213 | * @var \DERHANSEN\SfEventMgt\Domain\Model\Location |
||
214 | */ |
||
215 | protected $location; |
||
216 | |||
217 | /** |
||
218 | * Room |
||
219 | * |
||
220 | * @var string |
||
221 | */ |
||
222 | protected $room; |
||
223 | |||
224 | /** |
||
225 | * Enable registration |
||
226 | * |
||
227 | * @var bool |
||
228 | */ |
||
229 | protected $enableRegistration = false; |
||
230 | |||
231 | /** |
||
232 | * Enable waitlist |
||
233 | * |
||
234 | * @var bool |
||
235 | */ |
||
236 | protected $enableWaitlist = false; |
||
237 | |||
238 | /** |
||
239 | * Enable waitlist |
||
240 | * |
||
241 | * @var bool |
||
242 | */ |
||
243 | protected $enableWaitlistMoveup = false; |
||
244 | |||
245 | /** |
||
246 | * Link |
||
247 | * |
||
248 | * @var string |
||
249 | */ |
||
250 | protected $link; |
||
251 | |||
252 | /** |
||
253 | * Top event |
||
254 | * |
||
255 | * @var bool |
||
256 | */ |
||
257 | protected $topEvent = false; |
||
258 | |||
259 | /** |
||
260 | * The additionalImage |
||
261 | * |
||
262 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference> |
||
263 | * @Extbase\ORM\Lazy |
||
264 | */ |
||
265 | protected $additionalImage; |
||
266 | |||
267 | /** |
||
268 | * The organisator |
||
269 | * |
||
270 | * @var \DERHANSEN\SfEventMgt\Domain\Model\Organisator |
||
271 | */ |
||
272 | protected $organisator; |
||
273 | |||
274 | /** |
||
275 | * Notify admin |
||
276 | * |
||
277 | 362 | * @var bool |
|
278 | */ |
||
279 | 362 | protected $notifyAdmin = true; |
|
280 | 362 | ||
281 | 362 | /** |
|
282 | 362 | * Notify organisator |
|
283 | 362 | * |
|
284 | 362 | * @var bool |
|
285 | 362 | */ |
|
286 | 362 | protected $notifyOrganisator = false; |
|
287 | 362 | ||
288 | /** |
||
289 | * Enable cancel of registration |
||
290 | * |
||
291 | * @var bool |
||
292 | */ |
||
293 | protected $enableCancel = false; |
||
294 | 10 | ||
295 | /** |
||
296 | 10 | * Deadline for cancel |
|
297 | * |
||
298 | * @var \DateTime |
||
299 | */ |
||
300 | protected $cancelDeadline; |
||
301 | |||
302 | /** |
||
303 | * Enable auto confirmation |
||
304 | * |
||
305 | * @var bool |
||
306 | 2 | */ |
|
307 | protected $enableAutoconfirm = false; |
||
308 | 2 | ||
309 | 2 | /** |
|
310 | * Unique email check |
||
311 | * |
||
312 | * @var bool |
||
313 | */ |
||
314 | protected $uniqueEmailCheck = false; |
||
315 | |||
316 | 2 | /** |
|
317 | * Price options |
||
318 | 2 | * |
|
319 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DERHANSEN\SfEventMgt\Domain\Model\PriceOption> |
||
320 | * @Extbase\ORM\Cascade("remove") |
||
321 | * @Extbase\ORM\Lazy |
||
322 | */ |
||
323 | protected $priceOptions; |
||
324 | |||
325 | /** |
||
326 | * Speaker |
||
327 | * |
||
328 | 2 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DERHANSEN\SfEventMgt\Domain\Model\Speaker> |
|
329 | * @Extbase\ORM\Lazy |
||
330 | 2 | */ |
|
331 | 2 | protected $speaker; |
|
332 | |||
333 | /** |
||
334 | * Constructor |
||
335 | */ |
||
336 | public function __construct() |
||
349 | |||
350 | 2 | /** |
|
351 | * Get timestamp |
||
352 | 2 | * |
|
353 | 2 | * @return \DateTime |
|
354 | */ |
||
355 | public function getTstamp() |
||
359 | |||
360 | 2 | /** |
|
361 | * Set time stamp |
||
362 | 2 | * |
|
363 | * @param \DateTime $tstamp time stamp |
||
364 | */ |
||
365 | public function setTstamp($tstamp) |
||
369 | |||
370 | /** |
||
371 | * Get hidden flag |
||
372 | 2 | * |
|
373 | * @return bool |
||
374 | 2 | */ |
|
375 | 2 | public function getHidden() |
|
379 | |||
380 | /** |
||
381 | * Set hidden flag |
||
382 | 22 | * |
|
383 | * @param bool $hidden hidden flag |
||
384 | 22 | */ |
|
385 | public function setHidden($hidden) |
||
389 | |||
390 | /** |
||
391 | * Get start time |
||
392 | * |
||
393 | * @return \DateTime |
||
394 | 22 | */ |
|
395 | public function getStarttime() |
||
399 | |||
400 | /** |
||
401 | * Set start time |
||
402 | * |
||
403 | * @param \DateTime $starttime start time |
||
404 | 2 | */ |
|
405 | public function setStarttime($starttime) |
||
409 | |||
410 | /** |
||
411 | * Get endtime |
||
412 | * |
||
413 | * @return \DateTime |
||
414 | */ |
||
415 | public function getEndtime() |
||
419 | 2 | ||
420 | /** |
||
421 | * Set end time |
||
422 | * |
||
423 | * @param \DateTime $endtime end time |
||
424 | */ |
||
425 | public function setEndtime($endtime) |
||
429 | |||
430 | /** |
||
431 | * Returns the title |
||
432 | * |
||
433 | * @return string $title |
||
434 | */ |
||
435 | public function getTitle() |
||
439 | |||
440 | 26 | /** |
|
441 | 26 | * Sets the title |
|
442 | * |
||
443 | * @param string $title Title |
||
444 | */ |
||
445 | public function setTitle($title) |
||
449 | |||
450 | 2 | /** |
|
451 | * Returns the teaser |
||
452 | * |
||
453 | * @return string |
||
454 | */ |
||
455 | public function getTeaser() |
||
459 | |||
460 | 6 | /** |
|
461 | * Sets the teaser |
||
462 | 6 | * |
|
463 | 6 | * @param string $teaser Teaser |
|
464 | */ |
||
465 | public function setTeaser($teaser) |
||
469 | |||
470 | 2 | /** |
|
471 | * Returns the description |
||
472 | 2 | * |
|
473 | * @return string $description |
||
474 | */ |
||
475 | public function getDescription() |
||
479 | |||
480 | /** |
||
481 | * Sets the description |
||
482 | 2 | * |
|
483 | * @param string $description Description |
||
484 | 2 | */ |
|
485 | 2 | public function setDescription($description) |
|
489 | |||
490 | /** |
||
491 | * Returns the program |
||
492 | 8 | * |
|
493 | * @return string $program |
||
494 | 8 | */ |
|
495 | public function getProgram() |
||
499 | |||
500 | /** |
||
501 | * Sets the program |
||
502 | * |
||
503 | 6 | * @param string $program The program |
|
504 | */ |
||
505 | 6 | public function setProgram($program) |
|
509 | |||
510 | /** |
||
511 | * Returns the startdate |
||
512 | * |
||
513 | 6 | * @return \DateTime $startdate |
|
514 | */ |
||
515 | 6 | public function getStartdate() |
|
519 | |||
520 | /** |
||
521 | * Sets the startdate |
||
522 | * |
||
523 | * @param \DateTime $startdate Startdate |
||
524 | 2 | */ |
|
525 | public function setStartdate(\DateTime $startdate) |
||
529 | |||
530 | /** |
||
531 | * Returns the enddate |
||
532 | * |
||
533 | * @return \DateTime $enddate |
||
534 | 4 | */ |
|
535 | public function getEnddate() |
||
539 | |||
540 | /** |
||
541 | * Sets the enddate |
||
542 | * |
||
543 | * @param \DateTime $enddate Enddate |
||
544 | */ |
||
545 | 2 | public function setEnddate(\DateTime $enddate) |
|
549 | |||
550 | /** |
||
551 | * Returns the participants |
||
552 | * |
||
553 | * @return int $participants |
||
554 | */ |
||
555 | public function getMaxParticipants() |
||
559 | 2 | ||
560 | 2 | /** |
|
561 | * Sets the participants |
||
562 | * |
||
563 | * @param int $participants Participants |
||
564 | */ |
||
565 | public function setMaxParticipants($participants) |
||
569 | 2 | ||
570 | /** |
||
571 | 2 | * Returns the price |
|
572 | 2 | * |
|
573 | * @return float $price |
||
574 | */ |
||
575 | public function getPrice() |
||
579 | 2 | ||
580 | /** |
||
581 | 2 | * Sets the price |
|
582 | * |
||
583 | * @param float $price Price |
||
584 | */ |
||
585 | public function setPrice($price) |
||
589 | |||
590 | /** |
||
591 | 6 | * Returns the currency |
|
592 | * |
||
593 | 6 | * @return string $currency |
|
594 | 6 | */ |
|
595 | public function getCurrency() |
||
599 | |||
600 | /** |
||
601 | 4 | * Sets the currency |
|
602 | * |
||
603 | 4 | * @param string $currency Currency |
|
604 | */ |
||
605 | public function setCurrency($currency) |
||
609 | |||
610 | /** |
||
611 | * Returns if payment is enabled |
||
612 | 6 | * |
|
613 | * @return bool |
||
614 | 6 | */ |
|
615 | 6 | public function getEnablePayment() |
|
619 | |||
620 | /** |
||
621 | * Sets enablePayment |
||
622 | * |
||
623 | 2 | * @param bool $enablePayment |
|
624 | */ |
||
625 | 2 | public function setEnablePayment($enablePayment) |
|
629 | |||
630 | /** |
||
631 | * Returns if payment methods should be restricted |
||
632 | * |
||
633 | * @return bool |
||
634 | 2 | */ |
|
635 | public function getRestrictPaymentMethods() |
||
639 | |||
640 | /** |
||
641 | * Sets if payment methods should be restricted |
||
642 | * |
||
643 | * @param bool $restrictPaymentMethods |
||
644 | */ |
||
645 | public function setRestrictPaymentMethods($restrictPaymentMethods) |
||
649 | 4 | ||
650 | /** |
||
651 | * Returns selected payment methods |
||
652 | * |
||
653 | * @return string |
||
654 | */ |
||
655 | public function getSelectedPaymentMethods() |
||
659 | |||
660 | 2 | /** |
|
661 | 2 | * Sets selected payment methods |
|
662 | * |
||
663 | * @param string $selectedPaymentMethods |
||
664 | */ |
||
665 | public function setSelectedPaymentMethods($selectedPaymentMethods) |
||
669 | |||
670 | 24 | /** |
|
671 | * Adds a Category |
||
672 | * |
||
673 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Category $category Category |
||
674 | */ |
||
675 | public function addCategory(\DERHANSEN\SfEventMgt\Domain\Model\Category $category) |
||
679 | |||
680 | 18 | /** |
|
681 | * Removes a Category |
||
682 | 18 | * |
|
683 | 18 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Category $categoryToRemove The Category to be removed |
|
684 | */ |
||
685 | public function removeCategory(\DERHANSEN\SfEventMgt\Domain\Model\Category $categoryToRemove) |
||
689 | |||
690 | /** |
||
691 | * Returns the category |
||
692 | 2 | * |
|
693 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
||
694 | 2 | */ |
|
695 | 2 | public function getCategory() |
|
699 | |||
700 | /** |
||
701 | * Sets the category |
||
702 | * |
||
703 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $category Category |
||
704 | 2 | */ |
|
705 | public function setCategory(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $category) |
||
709 | |||
710 | /** |
||
711 | * Returns related events |
||
712 | * |
||
713 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
||
714 | 2 | */ |
|
715 | public function getRelated() |
||
719 | |||
720 | /** |
||
721 | * Sets related events |
||
722 | * |
||
723 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $related |
||
724 | */ |
||
725 | public function setRelated($related) |
||
729 | 6 | ||
730 | /** |
||
731 | * Adds a related event |
||
732 | * |
||
733 | * @param Event $event |
||
734 | */ |
||
735 | public function addRelated(\DERHANSEN\SfEventMgt\Domain\Model\Event $event) |
||
739 | |||
740 | 4 | /** |
|
741 | 4 | * Removes a related event |
|
742 | * |
||
743 | * @param Event $event |
||
744 | */ |
||
745 | public function removeRelated(\DERHANSEN\SfEventMgt\Domain\Model\Event $event) |
||
749 | |||
750 | 2 | /** |
|
751 | * Adds a Registration |
||
752 | 2 | * |
|
753 | 2 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Registration $registration Registration |
|
754 | */ |
||
755 | public function addRegistration(\DERHANSEN\SfEventMgt\Domain\Model\Registration $registration) |
||
759 | |||
760 | 2 | /** |
|
761 | * Removes a Registration |
||
762 | 2 | * |
|
763 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Registration $registrationToRemove Registration |
||
764 | */ |
||
765 | public function removeRegistration(\DERHANSEN\SfEventMgt\Domain\Model\Registration $registrationToRemove) |
||
769 | |||
770 | /** |
||
771 | * Returns the Registration |
||
772 | 6 | * |
|
773 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage $registration |
||
774 | 6 | */ |
|
775 | 6 | public function getRegistration() |
|
779 | |||
780 | /** |
||
781 | * Sets the Registration |
||
782 | 4 | * |
|
783 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $registration Registration |
||
784 | 4 | */ |
|
785 | public function setRegistration(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $registration) |
||
789 | |||
790 | /** |
||
791 | * Adds an image |
||
792 | * |
||
793 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $image Image |
||
794 | 2 | */ |
|
795 | public function addImage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $image) |
||
799 | |||
800 | /** |
||
801 | * Removes an image |
||
802 | * |
||
803 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $imageToRemove Image |
||
804 | 20 | */ |
|
805 | public function removeImage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $imageToRemove) |
||
809 | 6 | ||
810 | 20 | /** |
|
811 | 20 | * Returns the image |
|
812 | 2 | * |
|
813 | 2 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage $image |
|
814 | 20 | */ |
|
815 | 20 | public function getImage() |
|
819 | |||
820 | /** |
||
821 | * Sets the image |
||
822 | * |
||
823 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $image Image |
||
824 | 10 | */ |
|
825 | public function setImage(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $image) |
||
829 | |||
830 | /** |
||
831 | * Adds a file |
||
832 | * |
||
833 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $file File |
||
834 | */ |
||
835 | public function addFiles(\TYPO3\CMS\Extbase\Domain\Model\FileReference $file) |
||
839 | 2 | ||
840 | /** |
||
841 | * Removes a file |
||
842 | * |
||
843 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $fileToRemove File |
||
844 | */ |
||
845 | public function removeFiles(\TYPO3\CMS\Extbase\Domain\Model\FileReference $fileToRemove) |
||
849 | |||
850 | /** |
||
851 | * Returns the files |
||
852 | * |
||
853 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage $files |
||
854 | */ |
||
855 | public function getFiles() |
||
859 | |||
860 | 20 | /** |
|
861 | 20 | * Sets the files |
|
862 | * |
||
863 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $files Files |
||
864 | */ |
||
865 | public function setFiles(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $files) |
||
869 | |||
870 | 16 | /** |
|
871 | * Returns if the registration for this event is logically possible |
||
872 | * |
||
873 | * @return bool |
||
874 | */ |
||
875 | public function getRegistrationPossible() |
||
894 | |||
895 | /** |
||
896 | * Returns the amount of free places |
||
897 | * |
||
898 | * @return int |
||
899 | */ |
||
900 | public function getFreePlaces() |
||
904 | 6 | ||
905 | /** |
||
906 | * Sets the location |
||
907 | * |
||
908 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Location $location Location |
||
909 | */ |
||
910 | public function setLocation($location) |
||
914 | |||
915 | /** |
||
916 | * Returns the location |
||
917 | * |
||
918 | * @return \DERHANSEN\SfEventMgt\Domain\Model\Location |
||
919 | */ |
||
920 | public function getLocation() |
||
924 | |||
925 | 24 | /** |
|
926 | 24 | * Returns the room |
|
927 | * |
||
928 | * @return string |
||
929 | */ |
||
930 | public function getRoom() |
||
934 | |||
935 | 2 | /** |
|
936 | * Sets the room |
||
937 | * |
||
938 | * @param string $room |
||
939 | */ |
||
940 | public function setRoom($room) |
||
944 | |||
945 | 2 | /** |
|
946 | * Sets enableRegistration |
||
947 | * |
||
948 | * @param bool $enableRegistration EnableRegistration |
||
949 | */ |
||
950 | public function setEnableRegistration($enableRegistration) |
||
954 | |||
955 | 2 | /** |
|
956 | * Returns if registration is enabled |
||
957 | * |
||
958 | * @return bool |
||
959 | */ |
||
960 | public function getEnableRegistration() |
||
964 | |||
965 | 2 | /** |
|
966 | * Returns enableWaitlist |
||
967 | * |
||
968 | * @return bool |
||
969 | */ |
||
970 | public function getEnableWaitlist() |
||
974 | |||
975 | /** |
||
976 | * Sets enableWaitlist |
||
977 | 22 | * |
|
978 | * @param bool $enableWaitlist |
||
979 | 22 | */ |
|
980 | 22 | public function setEnableWaitlist($enableWaitlist) |
|
984 | 22 | ||
985 | 2 | /** |
|
986 | 2 | * @return bool |
|
987 | 22 | */ |
|
988 | public function getEnableWaitlistMoveup(): bool |
||
992 | |||
993 | /** |
||
994 | * @param bool $enableWaitlistMoveup |
||
995 | */ |
||
996 | public function setEnableWaitlistMoveup($enableWaitlistMoveup): void |
||
1000 | 2 | ||
1001 | /** |
||
1002 | * Sets the registration startdate |
||
1003 | * |
||
1004 | * @param \DateTime $registrationStartdate RegistrationStartdate |
||
1005 | */ |
||
1006 | public function setRegistrationStartdate(\DateTime $registrationStartdate) |
||
1010 | |||
1011 | /** |
||
1012 | * Returns the registration startdate |
||
1013 | * |
||
1014 | * @return \DateTime |
||
1015 | */ |
||
1016 | public function getRegistrationStartdate() |
||
1020 | |||
1021 | /** |
||
1022 | * Sets the registration deadline |
||
1023 | * |
||
1024 | * @param \DateTime $registrationDeadline RegistrationDeadline |
||
1025 | */ |
||
1026 | public function setRegistrationDeadline(\DateTime $registrationDeadline) |
||
1030 | |||
1031 | 2 | /** |
|
1032 | 2 | * Returns the registration deadline |
|
1033 | * |
||
1034 | * @return \DateTime |
||
1035 | */ |
||
1036 | public function getRegistrationDeadline() |
||
1040 | |||
1041 | /** |
||
1042 | 2 | * Sets the link |
|
1043 | * |
||
1044 | 2 | * @param string $link Link |
|
1045 | 2 | */ |
|
1046 | public function setLink($link) |
||
1050 | |||
1051 | /** |
||
1052 | * Returns the link |
||
1053 | * |
||
1054 | 2 | * @return string |
|
1055 | */ |
||
1056 | 2 | public function getLink() |
|
1060 | |||
1061 | /** |
||
1062 | * Sets topEvent |
||
1063 | * |
||
1064 | 2 | * @param bool $topEvent TopEvent |
|
1065 | */ |
||
1066 | 2 | public function setTopEvent($topEvent) |
|
1070 | |||
1071 | /** |
||
1072 | * Returns if topEvent is checked |
||
1073 | * |
||
1074 | * @return bool |
||
1075 | */ |
||
1076 | 6 | public function getTopEvent() |
|
1080 | |||
1081 | /** |
||
1082 | * Returns max regisrations per user |
||
1083 | * |
||
1084 | * @return int |
||
1085 | */ |
||
1086 | 12 | public function getMaxRegistrationsPerUser() |
|
1090 | |||
1091 | /** |
||
1092 | * Sets max registrations per user |
||
1093 | * |
||
1094 | * @param int $maxRegistrationsPerUser MaxRegistrationsPerUser |
||
1095 | */ |
||
1096 | public function setMaxRegistrationsPerUser($maxRegistrationsPerUser) |
||
1100 | 12 | ||
1101 | 12 | /** |
|
1102 | * Adds an additionalImage |
||
1103 | * |
||
1104 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $additionalImage The Image |
||
1105 | */ |
||
1106 | public function addAdditionalImage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $additionalImage) |
||
1110 | 54 | ||
1111 | /** |
||
1112 | * Removes an additionalImage |
||
1113 | * |
||
1114 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $additionalImageToRemove The Image |
||
1115 | */ |
||
1116 | public function removeAdditionalImage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $additionalImageToRemove) |
||
1120 | 22 | ||
1121 | /** |
||
1122 | 22 | * Returns the additionalImage |
|
1123 | 22 | * |
|
1124 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage $additionalImage |
||
1125 | */ |
||
1126 | public function getAdditionalImage() |
||
1130 | 54 | ||
1131 | /** |
||
1132 | 54 | * Sets the additionalImage |
|
1133 | * |
||
1134 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $additionalImage The Image |
||
1135 | */ |
||
1136 | public function setAdditionalImage(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $additionalImage) |
||
1140 | |||
1141 | /** |
||
1142 | 22 | * Returns the organisator |
|
1143 | * |
||
1144 | 22 | * @return Organisator |
|
1145 | 22 | */ |
|
1146 | public function getOrganisator() |
||
1150 | |||
1151 | /** |
||
1152 | * Sets the organisator |
||
1153 | * |
||
1154 | 8 | * @param Organisator $organisator The organisator |
|
1155 | */ |
||
1156 | 8 | public function setOrganisator($organisator) |
|
1160 | |||
1161 | /** |
||
1162 | * Returns notifyAdmin |
||
1163 | * |
||
1164 | 10 | * @return bool |
|
1165 | */ |
||
1166 | 10 | public function getNotifyAdmin() |
|
1170 | |||
1171 | /** |
||
1172 | * Sets notifyAdmin |
||
1173 | * |
||
1174 | * @param bool $notifyAdmin NotifyAdmin |
||
1175 | */ |
||
1176 | 8 | public function setNotifyAdmin($notifyAdmin) |
|
1180 | |||
1181 | /** |
||
1182 | * Returns if notifyAdmin is set |
||
1183 | * |
||
1184 | * @return bool |
||
1185 | */ |
||
1186 | 8 | public function getNotifyOrganisator() |
|
1190 | |||
1191 | /** |
||
1192 | * Sets notifyOrganisator |
||
1193 | * |
||
1194 | * @param bool $notifyOrganisator NotifyOrganisator |
||
1195 | */ |
||
1196 | 4 | public function setNotifyOrganisator($notifyOrganisator) |
|
1200 | |||
1201 | /** |
||
1202 | * Sets enableCancel |
||
1203 | * |
||
1204 | * @param bool $enableCancel EnableCancel |
||
1205 | */ |
||
1206 | public function setEnableCancel($enableCancel) |
||
1210 | 2 | ||
1211 | /** |
||
1212 | * Returns if registration can be canceled |
||
1213 | * |
||
1214 | * @return bool |
||
1215 | */ |
||
1216 | public function getEnableCancel() |
||
1220 | |||
1221 | /** |
||
1222 | * Sets the cancel deadline |
||
1223 | * |
||
1224 | * @param \DateTime $cancelDeadline CancelDeadline |
||
1225 | */ |
||
1226 | public function setCancelDeadline(\DateTime $cancelDeadline) |
||
1230 | 6 | ||
1231 | 6 | /** |
|
1232 | * Returns the cancel deadline |
||
1233 | * |
||
1234 | * @return \DateTime |
||
1235 | */ |
||
1236 | public function getCancelDeadline() |
||
1240 | 6 | ||
1241 | /** |
||
1242 | 6 | * Returns if autoconfirmation is enabled |
|
1243 | 6 | * |
|
1244 | * @return bool |
||
1245 | */ |
||
1246 | public function getEnableAutoconfirm() |
||
1250 | |||
1251 | /** |
||
1252 | 2 | * Sets enable autoconfirm |
|
1253 | * |
||
1254 | 2 | * @param bool $enableAutoconfirm |
|
1255 | 2 | */ |
|
1256 | public function setEnableAutoconfirm($enableAutoconfirm) |
||
1260 | |||
1261 | /** |
||
1262 | 6 | * Returns uniqueEmailCheck |
|
1263 | * |
||
1264 | 6 | * @return bool |
|
1265 | 6 | */ |
|
1266 | 6 | public function getUniqueEmailCheck() |
|
1270 | 4 | ||
1271 | 6 | /** |
|
1272 | 6 | * Sets UniqueEmailCheck |
|
1273 | 6 | * |
|
1274 | 6 | * @param bool $uniqueEmailCheck |
|
1275 | */ |
||
1276 | public function setUniqueEmailCheck($uniqueEmailCheck) |
||
1280 | |||
1281 | /** |
||
1282 | 4 | * Returns price options |
|
1283 | * |
||
1284 | 4 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
|
1285 | 4 | */ |
|
1286 | public function getPriceOptions() |
||
1290 | 2 | ||
1291 | /** |
||
1292 | * Sets price options |
||
1293 | * |
||
1294 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $priceOptions |
||
1295 | */ |
||
1296 | public function setPriceOptions($priceOptions) |
||
1300 | |||
1301 | 2 | /** |
|
1302 | * Adds a price option |
||
1303 | * |
||
1304 | * @param \DERHANSEN\SfEventMgt\Domain\Model\PriceOption $priceOption Price option |
||
1305 | */ |
||
1306 | public function addPriceOptions(\DERHANSEN\SfEventMgt\Domain\Model\PriceOption $priceOption) |
||
1310 | |||
1311 | 6 | /** |
|
1312 | * Removes a Registration |
||
1313 | 6 | * |
|
1314 | 6 | * @param \DERHANSEN\SfEventMgt\Domain\Model\PriceOption $priceOption Price option |
|
1315 | */ |
||
1316 | public function removePriceOptions(\DERHANSEN\SfEventMgt\Domain\Model\PriceOption $priceOption) |
||
1320 | |||
1321 | /** |
||
1322 | * Returns all active price options sorted by date ASC |
||
1323 | 2 | * |
|
1324 | * @return array |
||
1325 | 2 | */ |
|
1326 | 2 | public function getActivePriceOptions() |
|
1341 | |||
1342 | /** |
||
1343 | * Returns the current price of the event respecting possible price options |
||
1344 | * |
||
1345 | 6 | * @return float |
|
1346 | */ |
||
1347 | 6 | public function getCurrentPrice() |
|
1357 | |||
1358 | /** |
||
1359 | * Returns registrationWaitlist |
||
1360 | * |
||
1361 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
||
1362 | */ |
||
1363 | public function getRegistrationWaitlist() |
||
1367 | |||
1368 | /** |
||
1369 | * Sets registrationWaitlist |
||
1370 | * |
||
1371 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $registration Registration |
||
1372 | */ |
||
1373 | public function setRegistrationWaitlist(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $registration) |
||
1377 | |||
1378 | /** |
||
1379 | * Adds a Registration to the waitlist |
||
1380 | * |
||
1381 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Registration $registration Registration |
||
1382 | */ |
||
1383 | public function addRegistrationWaitlist(\DERHANSEN\SfEventMgt\Domain\Model\Registration $registration) |
||
1387 | |||
1388 | /** |
||
1389 | * Removes a Registration from the waitlist |
||
1390 | * |
||
1391 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Registration $registrationToRemove Registration |
||
1392 | */ |
||
1393 | public function removeRegistrationWaitlist(\DERHANSEN\SfEventMgt\Domain\Model\Registration $registrationToRemove) |
||
1397 | |||
1398 | /** |
||
1399 | * Returns, if cancellation for registrations of the event is possible |
||
1400 | * |
||
1401 | * @return bool |
||
1402 | */ |
||
1403 | public function getCancellationPossible() |
||
1410 | |||
1411 | /** |
||
1412 | * Returns speaker |
||
1413 | * |
||
1414 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
||
1415 | */ |
||
1416 | public function getSpeaker() |
||
1420 | |||
1421 | /** |
||
1422 | * Sets speaker |
||
1423 | * |
||
1424 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $speaker |
||
1425 | */ |
||
1426 | public function setSpeaker($speaker) |
||
1430 | |||
1431 | /** |
||
1432 | * Adds a speaker |
||
1433 | * |
||
1434 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Speaker $speaker |
||
1435 | */ |
||
1436 | public function addSpeaker(\DERHANSEN\SfEventMgt\Domain\Model\Speaker $speaker) |
||
1440 | |||
1441 | /** |
||
1442 | * Removes a speaker |
||
1443 | * |
||
1444 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Speaker $speaker |
||
1445 | */ |
||
1446 | public function removeSpeaker(\DERHANSEN\SfEventMgt\Domain\Model\Speaker $speaker) |
||
1450 | |||
1451 | /** |
||
1452 | * Returns registrationFields |
||
1453 | * |
||
1454 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
||
1455 | */ |
||
1456 | public function getRegistrationFields() |
||
1460 | |||
1461 | /** |
||
1462 | * Sets registrationWaitlist |
||
1463 | * |
||
1464 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $registrationFields |
||
1465 | */ |
||
1466 | public function setRegistrationFields(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $registrationFields) |
||
1470 | |||
1471 | /** |
||
1472 | * Adds a registrationField |
||
1473 | * |
||
1474 | * @param Field $registrationField |
||
1475 | */ |
||
1476 | public function addRegistrationFields(Field $registrationField) |
||
1480 | |||
1481 | /** |
||
1482 | * Removed a registrationField |
||
1483 | * |
||
1484 | * @param Field $registrationField |
||
1485 | */ |
||
1486 | public function removeRegistrationFields(Field $registrationField) |
||
1490 | |||
1491 | /** |
||
1492 | * Returns an array with registration field uids |
||
1493 | * |
||
1494 | * @return array |
||
1495 | */ |
||
1496 | public function getRegistrationFieldsUids() |
||
1505 | |||
1506 | /** |
||
1507 | * Returns an array with registration field uids and titles |
||
1508 | * [uid => title] |
||
1509 | * |
||
1510 | * @return array |
||
1511 | */ |
||
1512 | public function getRegistrationFieldUidsWithTitle() |
||
1521 | |||
1522 | /** |
||
1523 | * Special getter to return the amount of registrations that are saved to default language |
||
1524 | * Required since TYPO3 9.5 (#82363) |
||
1525 | * |
||
1526 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
||
1527 | */ |
||
1528 | public function getRegistrations() |
||
1537 | |||
1538 | /** |
||
1539 | * Special getter to return the amount of waitlist registrations that are saved to default language |
||
1540 | * Required since TYPO3 9.5 (#82363) |
||
1541 | * |
||
1542 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
||
1543 | */ |
||
1544 | public function getRegistrationsWaitlist() |
||
1553 | |||
1554 | /** |
||
1555 | * Returns an objectStorage object holding all registrations in the default language. |
||
1556 | * Ensures expected behavior of getRegistration() and getRegistrationWaitlist() since TYPO3 issue #82363 |
||
1557 | * |
||
1558 | * @param bool $waitlist |
||
1559 | * @return ObjectStorage |
||
1560 | */ |
||
1561 | protected function getRegistrationsDefaultLanguage(bool $waitlist = false) |
||
1573 | |||
1574 | /** |
||
1575 | * Returns if the event ends on the same day |
||
1576 | * |
||
1577 | * @return bool |
||
1578 | */ |
||
1579 | public function getEndsSameDay(): bool |
||
1587 | |||
1588 | /** |
||
1589 | * Returns the challenge for the challenge/response spam check |
||
1590 | * |
||
1591 | * @return string |
||
1592 | */ |
||
1593 | public function getSpamCheckChallenge(): string |
||
1597 | |||
1598 | /** |
||
1599 | * Returns a string to be used as overlay value for the <core:icon> ViewHelper in the Backend Modules |
||
1600 | * |
||
1601 | * @return string |
||
1602 | */ |
||
1603 | public function getBackendIconOverlay(): string |
||
1615 | } |
||
1616 |