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 |
||
18 | class Event extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity |
||
19 | { |
||
20 | /** |
||
21 | * @var \DateTime |
||
22 | */ |
||
23 | protected $tstamp; |
||
24 | |||
25 | /** |
||
26 | * Title |
||
27 | * |
||
28 | * @var string |
||
29 | * @validate NotEmpty |
||
30 | */ |
||
31 | protected $title = ''; |
||
32 | |||
33 | /** |
||
34 | * Teaser |
||
35 | * |
||
36 | * @var string |
||
37 | */ |
||
38 | protected $teaser = ''; |
||
39 | |||
40 | /** |
||
41 | * Description |
||
42 | * |
||
43 | * @var string |
||
44 | */ |
||
45 | protected $description = ''; |
||
46 | |||
47 | /** |
||
48 | * Program/Schedule |
||
49 | * |
||
50 | * @var string |
||
51 | */ |
||
52 | protected $program = ''; |
||
53 | |||
54 | /** |
||
55 | * Startdate and time |
||
56 | * |
||
57 | * @var \DateTime |
||
58 | */ |
||
59 | protected $startdate = null; |
||
60 | |||
61 | /** |
||
62 | * Enddate and time |
||
63 | * |
||
64 | * @var \DateTime |
||
65 | */ |
||
66 | protected $enddate = null; |
||
67 | |||
68 | /** |
||
69 | * Max participants |
||
70 | * |
||
71 | * @var int |
||
72 | */ |
||
73 | protected $maxParticipants = 0; |
||
74 | |||
75 | /** |
||
76 | * Max registrations per user |
||
77 | * |
||
78 | * @var int |
||
79 | */ |
||
80 | protected $maxRegistrationsPerUser = 1; |
||
81 | |||
82 | /** |
||
83 | * Price |
||
84 | * |
||
85 | * @var float |
||
86 | */ |
||
87 | protected $price = 0.0; |
||
88 | |||
89 | /** |
||
90 | * Currency |
||
91 | * |
||
92 | * @var string |
||
93 | */ |
||
94 | protected $currency = ''; |
||
95 | |||
96 | /** |
||
97 | * Enable payment |
||
98 | * |
||
99 | * @var bool |
||
100 | */ |
||
101 | protected $enablePayment = false; |
||
102 | |||
103 | /** |
||
104 | * Restrict payment methods |
||
105 | * |
||
106 | * @var bool |
||
107 | */ |
||
108 | protected $restrictPaymentMethods = false; |
||
109 | |||
110 | /** |
||
111 | * Selected payment methods |
||
112 | * |
||
113 | * @var string |
||
114 | */ |
||
115 | protected $selectedPaymentMethods = ''; |
||
116 | |||
117 | /** |
||
118 | * Category |
||
119 | * |
||
120 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DERHANSEN\SfEventMgt\Domain\Model\Category> |
||
121 | * @lazy |
||
122 | */ |
||
123 | protected $category = null; |
||
124 | |||
125 | /** |
||
126 | * Related |
||
127 | * |
||
128 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DERHANSEN\SfEventMgt\Domain\Model\Event> |
||
129 | * @lazy |
||
130 | */ |
||
131 | protected $related; |
||
132 | |||
133 | /** |
||
134 | * Registration |
||
135 | * |
||
136 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DERHANSEN\SfEventMgt\Domain\Model\Registration> |
||
137 | * @cascade remove |
||
138 | * @lazy |
||
139 | */ |
||
140 | protected $registration = null; |
||
141 | |||
142 | /** |
||
143 | * Registration waitlist |
||
144 | * |
||
145 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DERHANSEN\SfEventMgt\Domain\Model\Registration> |
||
146 | * @lazy |
||
147 | */ |
||
148 | protected $registrationWaitlist; |
||
149 | |||
150 | /** |
||
151 | * Registration fields |
||
152 | * |
||
153 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DERHANSEN\SfEventMgt\Domain\Model\Registration\Field> |
||
154 | * @lazy |
||
155 | */ |
||
156 | protected $registrationFields; |
||
157 | |||
158 | /** |
||
159 | * Registration deadline date |
||
160 | * |
||
161 | * @var \DateTime |
||
162 | */ |
||
163 | protected $registrationDeadline = null; |
||
164 | |||
165 | /** |
||
166 | * The image |
||
167 | * |
||
168 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference> |
||
169 | * @lazy |
||
170 | */ |
||
171 | protected $image = null; |
||
172 | |||
173 | /** |
||
174 | * Additional files |
||
175 | * |
||
176 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference> |
||
177 | * @lazy |
||
178 | */ |
||
179 | protected $files = null; |
||
180 | |||
181 | /** |
||
182 | * The Location |
||
183 | * |
||
184 | * @var \DERHANSEN\SfEventMgt\Domain\Model\Location |
||
185 | */ |
||
186 | protected $location = null; |
||
187 | |||
188 | /** |
||
189 | * Enable registration |
||
190 | * |
||
191 | * @var bool |
||
192 | */ |
||
193 | protected $enableRegistration = false; |
||
194 | |||
195 | /** |
||
196 | * Enable waitlist |
||
197 | * |
||
198 | * @var bool |
||
199 | */ |
||
200 | protected $enableWaitlist = false; |
||
201 | |||
202 | /** |
||
203 | * Link |
||
204 | * |
||
205 | * @var string |
||
206 | */ |
||
207 | protected $link; |
||
208 | |||
209 | /** |
||
210 | * Top event |
||
211 | * |
||
212 | * @var bool |
||
213 | */ |
||
214 | protected $topEvent = false; |
||
215 | |||
216 | /** |
||
217 | * The additionalImage |
||
218 | * |
||
219 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference> |
||
220 | * @lazy |
||
221 | */ |
||
222 | protected $additionalImage = null; |
||
223 | |||
224 | /** |
||
225 | * The organisator |
||
226 | * |
||
227 | * @var \DERHANSEN\SfEventMgt\Domain\Model\Organisator |
||
228 | */ |
||
229 | protected $organisator = null; |
||
230 | |||
231 | /** |
||
232 | * Notify admin |
||
233 | * |
||
234 | * @var bool |
||
235 | */ |
||
236 | protected $notifyAdmin = true; |
||
237 | |||
238 | /** |
||
239 | * Notify organisator |
||
240 | * |
||
241 | * @var bool |
||
242 | */ |
||
243 | protected $notifyOrganisator = false; |
||
244 | |||
245 | /** |
||
246 | * Enable cancel of registration |
||
247 | * |
||
248 | * @var bool |
||
249 | */ |
||
250 | protected $enableCancel = false; |
||
251 | |||
252 | /** |
||
253 | * Deadline for cancel |
||
254 | * |
||
255 | * @var \DateTime |
||
256 | */ |
||
257 | protected $cancelDeadline = null; |
||
258 | |||
259 | /** |
||
260 | * Enable auto confirmation |
||
261 | * |
||
262 | * @var bool |
||
263 | */ |
||
264 | protected $enableAutoconfirm = false; |
||
265 | |||
266 | /** |
||
267 | * Unique e-mail check |
||
268 | * |
||
269 | * @var bool |
||
270 | */ |
||
271 | protected $uniqueEmailCheck = false; |
||
272 | |||
273 | /** |
||
274 | * Price options |
||
275 | * |
||
276 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DERHANSEN\SfEventMgt\Domain\Model\PriceOption> |
||
277 | 181 | * @cascade remove |
|
278 | * @lazy |
||
279 | 181 | */ |
|
280 | 181 | protected $priceOptions = null; |
|
281 | 181 | ||
282 | 181 | /** |
|
283 | 181 | * Speaker |
|
284 | 181 | * |
|
285 | 181 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DERHANSEN\SfEventMgt\Domain\Model\Speaker> |
|
286 | 181 | * @lazy |
|
287 | 181 | */ |
|
288 | protected $speaker = null; |
||
289 | |||
290 | /** |
||
291 | * Constructor |
||
292 | */ |
||
293 | public function __construct() |
||
306 | 1 | ||
307 | /** |
||
308 | 1 | * Get timestamp |
|
309 | 1 | * |
|
310 | * @return \DateTime |
||
311 | */ |
||
312 | public function getTstamp() |
||
316 | 1 | ||
317 | /** |
||
318 | 1 | * Set time stamp |
|
319 | * |
||
320 | * @param \DateTime $tstamp time stamp |
||
321 | */ |
||
322 | public function setTstamp($tstamp) |
||
326 | |||
327 | /** |
||
328 | 1 | * Returns the title |
|
329 | * |
||
330 | 1 | * @return string $title |
|
331 | 1 | */ |
|
332 | public function getTitle() |
||
336 | |||
337 | /** |
||
338 | 1 | * Sets the title |
|
339 | * |
||
340 | 1 | * @param string $title Title |
|
341 | * |
||
342 | * @return void |
||
343 | */ |
||
344 | public function setTitle($title) |
||
348 | |||
349 | /** |
||
350 | 1 | * Returns the teaser |
|
351 | * |
||
352 | 1 | * @return string |
|
353 | 1 | */ |
|
354 | public function getTeaser() |
||
358 | |||
359 | /** |
||
360 | 1 | * Sets the teaser |
|
361 | * |
||
362 | 1 | * @param string $teaser Teaser |
|
363 | * |
||
364 | * @return void |
||
365 | */ |
||
366 | public function setTeaser($teaser) |
||
370 | |||
371 | /** |
||
372 | 1 | * Returns the description |
|
373 | * |
||
374 | 1 | * @return string $description |
|
375 | 1 | */ |
|
376 | public function getDescription() |
||
380 | |||
381 | /** |
||
382 | 11 | * Sets the description |
|
383 | * |
||
384 | 11 | * @param string $description Description |
|
385 | * |
||
386 | * @return void |
||
387 | */ |
||
388 | public function setDescription($description) |
||
392 | |||
393 | /** |
||
394 | 11 | * Returns the program |
|
395 | * |
||
396 | 11 | * @return string $program |
|
397 | 11 | */ |
|
398 | public function getProgram() |
||
402 | |||
403 | /** |
||
404 | 1 | * Sets the program |
|
405 | * |
||
406 | 1 | * @param string $program The program |
|
407 | * |
||
408 | * @return void |
||
409 | */ |
||
410 | public function setProgram($program) |
||
414 | |||
415 | /** |
||
416 | 1 | * Returns the startdate |
|
417 | * |
||
418 | 1 | * @return \DateTime $startdate |
|
419 | 1 | */ |
|
420 | public function getStartdate() |
||
424 | |||
425 | /** |
||
426 | 14 | * Sets the startdate |
|
427 | * |
||
428 | 14 | * @param \DateTime $startdate Startdate |
|
429 | * |
||
430 | * @return void |
||
431 | */ |
||
432 | public function setStartdate(\DateTime $startdate) |
||
436 | |||
437 | /** |
||
438 | 13 | * Returns the enddate |
|
439 | * |
||
440 | 13 | * @return \DateTime $enddate |
|
441 | 13 | */ |
|
442 | public function getEnddate() |
||
446 | |||
447 | /** |
||
448 | 1 | * Sets the enddate |
|
449 | * |
||
450 | 1 | * @param \DateTime $enddate Enddate |
|
451 | * |
||
452 | * @return void |
||
453 | */ |
||
454 | public function setEnddate(\DateTime $enddate) |
||
458 | |||
459 | /** |
||
460 | 3 | * Returns the participants |
|
461 | * |
||
462 | 3 | * @return int $participants |
|
463 | 3 | */ |
|
464 | public function getMaxParticipants() |
||
468 | |||
469 | /** |
||
470 | 1 | * Sets the participants |
|
471 | * |
||
472 | 1 | * @param int $participants Participants |
|
473 | * |
||
474 | * @return void |
||
475 | */ |
||
476 | public function setMaxParticipants($participants) |
||
480 | |||
481 | /** |
||
482 | 1 | * Returns the price |
|
483 | * |
||
484 | 1 | * @return float $price |
|
485 | 1 | */ |
|
486 | public function getPrice() |
||
490 | |||
491 | /** |
||
492 | 4 | * Sets the price |
|
493 | * |
||
494 | 4 | * @param float $price Price |
|
495 | * |
||
496 | * @return void |
||
497 | */ |
||
498 | public function setPrice($price) |
||
502 | |||
503 | 3 | /** |
|
504 | * Returns the currency |
||
505 | 3 | * |
|
506 | 3 | * @return string $currency |
|
507 | */ |
||
508 | public function getCurrency() |
||
512 | |||
513 | 3 | /** |
|
514 | * Sets the currency |
||
515 | 3 | * |
|
516 | * @param string $currency Currency |
||
517 | * |
||
518 | * @return void |
||
519 | */ |
||
520 | public function setCurrency($currency) |
||
524 | 1 | ||
525 | /** |
||
526 | 1 | * Returns if payment is enabled |
|
527 | 1 | * |
|
528 | * @return bool |
||
529 | */ |
||
530 | public function getEnablePayment() |
||
534 | 2 | ||
535 | /** |
||
536 | 2 | * Sets enablePayment |
|
537 | * |
||
538 | * @param bool $enablePayment |
||
539 | * @return void |
||
540 | */ |
||
541 | public function setEnablePayment($enablePayment) |
||
545 | 1 | ||
546 | /** |
||
547 | 1 | * Returns if payment methods should be restricted |
|
548 | 1 | * |
|
549 | * @return bool |
||
550 | */ |
||
551 | public function getRestrictPaymentMethods() |
||
555 | |||
556 | /** |
||
557 | 1 | * Sets if payment methods should be restricted |
|
558 | * |
||
559 | 1 | * @param bool $restrictPaymentMethods |
|
560 | 1 | * @return void |
|
561 | */ |
||
562 | public function setRestrictPaymentMethods($restrictPaymentMethods) |
||
566 | |||
567 | /** |
||
568 | * Returns selected payment methods |
||
569 | 1 | * |
|
570 | * @return string |
||
571 | 1 | */ |
|
572 | 1 | public function getSelectedPaymentMethods() |
|
576 | |||
577 | /** |
||
578 | * Sets selected payment methods |
||
579 | 1 | * |
|
580 | * @param string $selectedPaymentMethods |
||
581 | 1 | * @return void |
|
582 | */ |
||
583 | public function setSelectedPaymentMethods($selectedPaymentMethods) |
||
587 | |||
588 | /** |
||
589 | * Adds a Category |
||
590 | * |
||
591 | 3 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Category $category Category |
|
592 | * |
||
593 | 3 | * @return void |
|
594 | 3 | */ |
|
595 | public function addCategory(\DERHANSEN\SfEventMgt\Domain\Model\Category $category) |
||
599 | |||
600 | /** |
||
601 | 2 | * Removes a Category |
|
602 | * |
||
603 | 2 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Category $categoryToRemove The Category to be removed |
|
604 | * |
||
605 | * @return void |
||
606 | */ |
||
607 | public function removeCategory(\DERHANSEN\SfEventMgt\Domain\Model\Category $categoryToRemove) |
||
611 | |||
612 | 3 | /** |
|
613 | * Returns the category |
||
614 | 3 | * |
|
615 | 3 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
|
616 | */ |
||
617 | public function getCategory() |
||
621 | |||
622 | /** |
||
623 | 1 | * Sets the category |
|
624 | * |
||
625 | 1 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $category Category |
|
626 | 1 | * |
|
627 | * @return void |
||
628 | */ |
||
629 | public function setCategory(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $category) |
||
633 | |||
634 | 1 | /** |
|
635 | * Returns related events |
||
636 | 1 | * |
|
637 | 1 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
|
638 | */ |
||
639 | public function getRelated() |
||
643 | |||
644 | /** |
||
645 | * Sets related events |
||
646 | 2 | * |
|
647 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $related |
||
648 | 2 | * @return void |
|
649 | 2 | */ |
|
650 | public function setRelated($related) |
||
654 | |||
655 | /** |
||
656 | * Adds a related event |
||
657 | * |
||
658 | 1 | * @param Event $event |
|
659 | * @return void |
||
660 | 1 | */ |
|
661 | 1 | public function addRelated(\DERHANSEN\SfEventMgt\Domain\Model\Event $event) |
|
665 | |||
666 | /** |
||
667 | * Removes a related event |
||
668 | 12 | * |
|
669 | * @param Event $event |
||
670 | 12 | * @return void |
|
671 | */ |
||
672 | public function removeRelated(\DERHANSEN\SfEventMgt\Domain\Model\Event $event) |
||
676 | |||
677 | /** |
||
678 | * Adds a Registration |
||
679 | * |
||
680 | 9 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Registration $registration Registration |
|
681 | * |
||
682 | 9 | * @return void |
|
683 | 9 | */ |
|
684 | public function addRegistration(\DERHANSEN\SfEventMgt\Domain\Model\Registration $registration) |
||
688 | |||
689 | /** |
||
690 | * Removes a Registration |
||
691 | * |
||
692 | 1 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Registration $registrationToRemove Registration |
|
693 | * |
||
694 | 1 | * @return void |
|
695 | 1 | */ |
|
696 | public function removeRegistration(\DERHANSEN\SfEventMgt\Domain\Model\Registration $registrationToRemove) |
||
700 | |||
701 | /** |
||
702 | * Returns the Registration |
||
703 | * |
||
704 | 1 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage $registration |
|
705 | */ |
||
706 | 1 | public function getRegistration() |
|
710 | |||
711 | /** |
||
712 | * Sets the Registration |
||
713 | * |
||
714 | 1 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $registration Registration |
|
715 | * |
||
716 | 1 | * @return void |
|
717 | */ |
||
718 | public function setRegistration(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $registration) |
||
722 | |||
723 | /** |
||
724 | * Adds an image |
||
725 | * |
||
726 | 3 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $image Image |
|
727 | * |
||
728 | 3 | * @return void |
|
729 | 3 | */ |
|
730 | public function addImage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $image) |
||
734 | |||
735 | /** |
||
736 | * Removes an image |
||
737 | * |
||
738 | 2 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $imageToRemove Image |
|
739 | * |
||
740 | 2 | * @return void |
|
741 | 2 | */ |
|
742 | public function removeImage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $imageToRemove) |
||
746 | |||
747 | /** |
||
748 | * Returns the image |
||
749 | * |
||
750 | 1 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage $image |
|
751 | */ |
||
752 | 1 | public function getImage() |
|
756 | |||
757 | /** |
||
758 | * Sets the image |
||
759 | * |
||
760 | 1 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $image Image |
|
761 | * |
||
762 | 1 | * @return void |
|
763 | */ |
||
764 | public function setImage(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $image) |
||
768 | |||
769 | /** |
||
770 | * Adds a file |
||
771 | * |
||
772 | 3 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $file File |
|
773 | * |
||
774 | 3 | * @return void |
|
775 | 3 | */ |
|
776 | public function addFiles(\TYPO3\CMS\Extbase\Domain\Model\FileReference $file) |
||
780 | |||
781 | /** |
||
782 | 2 | * Removes a file |
|
783 | * |
||
784 | 2 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $fileToRemove File |
|
785 | * |
||
786 | * @return void |
||
787 | */ |
||
788 | public function removeFiles(\TYPO3\CMS\Extbase\Domain\Model\FileReference $fileToRemove) |
||
792 | |||
793 | /** |
||
794 | 1 | * Returns the files |
|
795 | * |
||
796 | 1 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage $files |
|
797 | 1 | */ |
|
798 | public function getFiles() |
||
802 | |||
803 | /** |
||
804 | 10 | * Sets the files |
|
805 | * |
||
806 | 10 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $files Files |
|
807 | 10 | * |
|
808 | 3 | * @return void |
|
809 | 3 | */ |
|
810 | 10 | public function setFiles(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $files) |
|
814 | 10 | ||
815 | 10 | /** |
|
816 | 10 | * Returns if the registration for this event is logically possible |
|
817 | * |
||
818 | * @return bool |
||
819 | */ |
||
820 | public function getRegistrationPossible() |
||
835 | |||
836 | 1 | /** |
|
837 | * Returns the amount of free places |
||
838 | 1 | * |
|
839 | 1 | * @return int |
|
840 | */ |
||
841 | public function getFreePlaces() |
||
845 | |||
846 | 1 | /** |
|
847 | * Sets the location |
||
848 | 1 | * |
|
849 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Location $location Location |
||
850 | * |
||
851 | * @return void |
||
852 | */ |
||
853 | public function setLocation($location) |
||
857 | |||
858 | 10 | /** |
|
859 | * Returns the location |
||
860 | 10 | * |
|
861 | 10 | * @return \DERHANSEN\SfEventMgt\Domain\Model\Location |
|
862 | */ |
||
863 | public function getLocation() |
||
867 | |||
868 | 8 | /** |
|
869 | * Sets enableRegistration |
||
870 | 8 | * |
|
871 | * @param bool $enableRegistration EnableRegistration |
||
872 | * |
||
873 | * @return void |
||
874 | */ |
||
875 | public function setEnableRegistration($enableRegistration) |
||
879 | |||
880 | 4 | /** |
|
881 | * Returns if registration is enabled |
||
882 | * |
||
883 | * @return bool |
||
884 | */ |
||
885 | public function getEnableRegistration() |
||
889 | 5 | ||
890 | /** |
||
891 | 5 | * Returns enableWaitlist |
|
892 | 5 | * |
|
893 | * @return bool |
||
894 | */ |
||
895 | public function getEnableWaitlist() |
||
899 | |||
900 | /** |
||
901 | 3 | * Sets enableWaitlist |
|
902 | * |
||
903 | 3 | * @param bool $enableWaitlist |
|
904 | 3 | * @return void |
|
905 | */ |
||
906 | public function setEnableWaitlist($enableWaitlist) |
||
910 | |||
911 | 11 | /** |
|
912 | * Sets the registration deadline |
||
913 | 11 | * |
|
914 | * @param \DateTime $registrationDeadline RegistrationDeadline |
||
915 | * |
||
916 | * @return void |
||
917 | */ |
||
918 | public function setRegistrationDeadline(\DateTime $registrationDeadline) |
||
922 | |||
923 | 12 | /** |
|
924 | * Returns the registration deadline |
||
925 | 12 | * |
|
926 | 12 | * @return \DateTime |
|
927 | */ |
||
928 | public function getRegistrationDeadline() |
||
932 | |||
933 | 1 | /** |
|
934 | * Sets the link |
||
935 | 1 | * |
|
936 | * @param string $link Link |
||
937 | * |
||
938 | * @return void |
||
939 | */ |
||
940 | public function setLink($link) |
||
944 | |||
945 | 1 | /** |
|
946 | * Returns the link |
||
947 | * |
||
948 | * @return string |
||
949 | */ |
||
950 | public function getLink() |
||
954 | |||
955 | 1 | /** |
|
956 | * Returns the uri of the link |
||
957 | * |
||
958 | * @return string |
||
959 | */ |
||
960 | public function getLinkUrl() |
||
964 | |||
965 | 1 | /** |
|
966 | * Returns the target of the link |
||
967 | * |
||
968 | * @return string |
||
969 | */ |
||
970 | public function getLinkTarget() |
||
974 | |||
975 | /** |
||
976 | * Returns the title of the link |
||
977 | 11 | * |
|
978 | * @return string |
||
979 | 11 | */ |
|
980 | 11 | public function getLinkTitle() |
|
984 | 11 | ||
985 | 1 | /** |
|
986 | 1 | * Splits link to an array respection that a title with more than one word is |
|
987 | 11 | * surrounded by quotation marks. Returns part of the link for usage in fluid |
|
988 | * viewhelpers. |
||
989 | * |
||
990 | * @param int $part The part |
||
991 | * |
||
992 | * @return string |
||
993 | */ |
||
994 | public function getLinkPart($part) |
||
1007 | 1 | ||
1008 | /** |
||
1009 | 1 | * Sets topEvent |
|
1010 | * |
||
1011 | * @param bool $topEvent TopEvent |
||
1012 | * |
||
1013 | * @return void |
||
1014 | */ |
||
1015 | public function setTopEvent($topEvent) |
||
1019 | 2 | ||
1020 | /** |
||
1021 | * Returns if topEvent is checked |
||
1022 | * |
||
1023 | * @return bool |
||
1024 | */ |
||
1025 | public function getTopEvent() |
||
1029 | 1 | ||
1030 | /** |
||
1031 | 1 | * Returns max regisrations per user |
|
1032 | 1 | * |
|
1033 | * @return int |
||
1034 | */ |
||
1035 | public function getMaxRegistrationsPerUser() |
||
1039 | |||
1040 | /** |
||
1041 | * Sets max registrations per user |
||
1042 | 1 | * |
|
1043 | * @param int $maxRegistrationsPerUser MaxRegistrationsPerUser |
||
1044 | 1 | * |
|
1045 | 1 | * @return void |
|
1046 | */ |
||
1047 | public function setMaxRegistrationsPerUser($maxRegistrationsPerUser) |
||
1051 | |||
1052 | /** |
||
1053 | * Adds an additionalImage |
||
1054 | 1 | * |
|
1055 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $additionalImage The Image |
||
1056 | 1 | * |
|
1057 | 1 | * @return void |
|
1058 | */ |
||
1059 | public function addAdditionalImage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $additionalImage) |
||
1063 | |||
1064 | 1 | /** |
|
1065 | * Removes an additionalImage |
||
1066 | 1 | * |
|
1067 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $additionalImageToRemove The Image |
||
1068 | * |
||
1069 | * @return void |
||
1070 | */ |
||
1071 | public function removeAdditionalImage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $additionalImageToRemove) |
||
1075 | |||
1076 | 3 | /** |
|
1077 | * Returns the additionalImage |
||
1078 | 3 | * |
|
1079 | 3 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage $additionalImage |
|
1080 | */ |
||
1081 | public function getAdditionalImage() |
||
1085 | |||
1086 | 6 | /** |
|
1087 | * Sets the additionalImage |
||
1088 | 6 | * |
|
1089 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $additionalImage The Image |
||
1090 | * |
||
1091 | * @return void |
||
1092 | */ |
||
1093 | public function setAdditionalImage(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $additionalImage) |
||
1097 | |||
1098 | 6 | /** |
|
1099 | * Returns the organisator |
||
1100 | 6 | * |
|
1101 | 6 | * @return Organisator |
|
1102 | */ |
||
1103 | public function getOrganisator() |
||
1107 | |||
1108 | 27 | /** |
|
1109 | * Sets the organisator |
||
1110 | 27 | * |
|
1111 | * @param Organisator $organisator The organisator |
||
1112 | * |
||
1113 | * @return void |
||
1114 | */ |
||
1115 | public function setOrganisator($organisator) |
||
1119 | |||
1120 | 11 | /** |
|
1121 | * Returns notifyAdmin |
||
1122 | 11 | * |
|
1123 | 11 | * @return bool |
|
1124 | */ |
||
1125 | public function getNotifyAdmin() |
||
1129 | |||
1130 | 27 | /** |
|
1131 | * Sets notifyAdmin |
||
1132 | 27 | * |
|
1133 | * @param bool $notifyAdmin NotifyAdmin |
||
1134 | * |
||
1135 | * @return void |
||
1136 | */ |
||
1137 | public function setNotifyAdmin($notifyAdmin) |
||
1141 | |||
1142 | 11 | /** |
|
1143 | * Returns if notifyAdmin is set |
||
1144 | 11 | * |
|
1145 | 11 | * @return bool |
|
1146 | */ |
||
1147 | public function getNotifyOrganisator() |
||
1151 | |||
1152 | /** |
||
1153 | * Sets notifyOrganisator |
||
1154 | 4 | * |
|
1155 | * @param bool $notifyOrganisator NotifyOrganisator |
||
1156 | 4 | * |
|
1157 | 4 | * @return void |
|
1158 | */ |
||
1159 | public function setNotifyOrganisator($notifyOrganisator) |
||
1163 | |||
1164 | 5 | /** |
|
1165 | * Sets enableCancel |
||
1166 | 5 | * |
|
1167 | * @param bool $enableCancel EnableCancel |
||
1168 | * |
||
1169 | * @return void |
||
1170 | */ |
||
1171 | public function setEnableCancel($enableCancel) |
||
1175 | |||
1176 | 4 | /** |
|
1177 | * Returns if registration can be canceled |
||
1178 | 4 | * |
|
1179 | 4 | * @return bool |
|
1180 | */ |
||
1181 | public function getEnableCancel() |
||
1185 | |||
1186 | 4 | /** |
|
1187 | * Sets the cancel deadline |
||
1188 | 4 | * |
|
1189 | * @param \DateTime $cancelDeadline CancelDeadline |
||
1190 | * |
||
1191 | * @return void |
||
1192 | */ |
||
1193 | public function setCancelDeadline(\DateTime $cancelDeadline) |
||
1197 | |||
1198 | 2 | /** |
|
1199 | * Returns the cancel deadline |
||
1200 | * |
||
1201 | * @return \DateTime |
||
1202 | */ |
||
1203 | public function getCancelDeadline() |
||
1207 | 1 | ||
1208 | /** |
||
1209 | 1 | * Returns if autoconfirmation is enabled |
|
1210 | 1 | * |
|
1211 | * @return bool |
||
1212 | */ |
||
1213 | public function getEnableAutoconfirm() |
||
1217 | 5 | ||
1218 | /** |
||
1219 | 5 | * Sets enable autoconfirm |
|
1220 | * |
||
1221 | * @param bool $enableAutoconfirm |
||
1222 | * @return void |
||
1223 | */ |
||
1224 | public function setEnableAutoconfirm($enableAutoconfirm) |
||
1228 | 3 | ||
1229 | /** |
||
1230 | 3 | * Returns uniqueEmailCheck |
|
1231 | 3 | * |
|
1232 | * @return bool |
||
1233 | */ |
||
1234 | public function getUniqueEmailCheck() |
||
1238 | |||
1239 | /** |
||
1240 | 3 | * Sets UniqueEmailCheck |
|
1241 | * |
||
1242 | 3 | * @param bool $uniqueEmailCheck |
|
1243 | 3 | * @return void |
|
1244 | */ |
||
1245 | public function setUniqueEmailCheck($uniqueEmailCheck) |
||
1249 | |||
1250 | /** |
||
1251 | * Returns price options |
||
1252 | 1 | * |
|
1253 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
||
1254 | 1 | */ |
|
1255 | 1 | public function getPriceOptions() |
|
1259 | |||
1260 | /** |
||
1261 | * Sets price options |
||
1262 | 3 | * |
|
1263 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $priceOptions |
||
1264 | 3 | * @return void |
|
1265 | 3 | */ |
|
1266 | 3 | public function setPriceOptions($priceOptions) |
|
1270 | 2 | ||
1271 | 3 | /** |
|
1272 | 3 | * Adds a price option |
|
1273 | 3 | * |
|
1274 | 3 | * @param \DERHANSEN\SfEventMgt\Domain\Model\PriceOption $priceOption Price option |
|
1275 | * |
||
1276 | * @return void |
||
1277 | */ |
||
1278 | public function addPriceOptions(\DERHANSEN\SfEventMgt\Domain\Model\PriceOption $priceOption) |
||
1282 | 2 | ||
1283 | /** |
||
1284 | 2 | * Removes a Registration |
|
1285 | 2 | * |
|
1286 | * @param \DERHANSEN\SfEventMgt\Domain\Model\PriceOption $priceOption Price option |
||
1287 | 1 | * |
|
1288 | * @return void |
||
1289 | */ |
||
1290 | 1 | public function removePriceOptions(\DERHANSEN\SfEventMgt\Domain\Model\PriceOption $priceOption) |
|
1294 | |||
1295 | /** |
||
1296 | * Returns all active price options sorted by date ASC |
||
1297 | * |
||
1298 | * @return array |
||
1299 | 1 | */ |
|
1300 | public function getActivePriceOptions() |
||
1315 | |||
1316 | /** |
||
1317 | * Returns the current price of the event respecting possible price options |
||
1318 | * |
||
1319 | * @return float |
||
1320 | */ |
||
1321 | public function getCurrentPrice() |
||
1331 | |||
1332 | /** |
||
1333 | * Returns registrationWaitlist |
||
1334 | * |
||
1335 | 1 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
|
1336 | */ |
||
1337 | 1 | public function getRegistrationWaitlist() |
|
1341 | |||
1342 | /** |
||
1343 | * Sets registrationWaitlist |
||
1344 | * |
||
1345 | 3 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $registration Registration |
|
1346 | * |
||
1347 | 3 | * @return void |
|
1348 | */ |
||
1349 | public function setRegistrationWaitlist(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $registration) |
||
1353 | |||
1354 | /** |
||
1355 | * Adds a Registration to the waitlist |
||
1356 | * |
||
1357 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Registration $registration Registration |
||
1358 | * |
||
1359 | * @return void |
||
1360 | */ |
||
1361 | public function addRegistrationWaitlist(\DERHANSEN\SfEventMgt\Domain\Model\Registration $registration) |
||
1365 | |||
1366 | /** |
||
1367 | * Removes a Registration from the waitlist |
||
1368 | * |
||
1369 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Registration $registrationToRemove Registration |
||
1370 | * |
||
1371 | * @return void |
||
1372 | */ |
||
1373 | public function removeRegistrationWaitlist(\DERHANSEN\SfEventMgt\Domain\Model\Registration $registrationToRemove) |
||
1377 | |||
1378 | /** |
||
1379 | * Returns, if cancellation for registrations of the event is possible |
||
1380 | * |
||
1381 | * @return bool |
||
1382 | */ |
||
1383 | public function getCancellationPossible() |
||
1388 | |||
1389 | /** |
||
1390 | * Returns speaker |
||
1391 | * |
||
1392 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
||
1393 | */ |
||
1394 | public function getSpeaker() |
||
1398 | |||
1399 | /** |
||
1400 | * Sets speaker |
||
1401 | * |
||
1402 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $speaker |
||
1403 | * @return void |
||
1404 | */ |
||
1405 | public function setSpeaker($speaker) |
||
1409 | |||
1410 | /** |
||
1411 | * Adds a speaker |
||
1412 | * |
||
1413 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Speaker $speaker |
||
1414 | * |
||
1415 | * @return void |
||
1416 | */ |
||
1417 | public function addSpeaker(\DERHANSEN\SfEventMgt\Domain\Model\Speaker $speaker) |
||
1421 | |||
1422 | /** |
||
1423 | * Removes a speaker |
||
1424 | * |
||
1425 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Speaker $speaker |
||
1426 | * |
||
1427 | * @return void |
||
1428 | */ |
||
1429 | public function removeSpeaker(\DERHANSEN\SfEventMgt\Domain\Model\Speaker $speaker) |
||
1433 | |||
1434 | /** |
||
1435 | * Returns registrationFields |
||
1436 | * |
||
1437 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
||
1438 | */ |
||
1439 | public function getRegistrationFields() |
||
1443 | |||
1444 | /** |
||
1445 | * Sets registrationWaitlist |
||
1446 | * |
||
1447 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $registrationFields |
||
1448 | * |
||
1449 | * @return void |
||
1450 | */ |
||
1451 | public function setRegistrationFields(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $registrationFields) |
||
1455 | |||
1456 | /** |
||
1457 | * Adds a registrationField |
||
1458 | * |
||
1459 | * @param Field $registrationField |
||
1460 | */ |
||
1461 | public function addRegistrationFields(Field $registrationField) |
||
1465 | |||
1466 | /** |
||
1467 | * Removed a registrationField |
||
1468 | * |
||
1469 | * @param Field $registrationField |
||
1470 | */ |
||
1471 | public function removeRegistrationFields(Field $registrationField) |
||
1475 | |||
1476 | /** |
||
1477 | * Returns an array with registration field uids |
||
1478 | * |
||
1479 | * @return array |
||
1480 | */ |
||
1481 | public function getRegistrationFieldsUids() |
||
1490 | |||
1491 | /** |
||
1492 | * Returns an array with registration field uids and titles |
||
1493 | * [uid => title] |
||
1494 | * |
||
1495 | * @return array |
||
1496 | */ |
||
1497 | public function getRegistrationFieldUidsWithTitle() |
||
1506 | } |
||
1507 |