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 |
||
24 | class Event extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity |
||
25 | { |
||
26 | |||
27 | /** |
||
28 | * Title |
||
29 | * |
||
30 | * @var string |
||
31 | * @validate NotEmpty |
||
32 | */ |
||
33 | protected $title = ''; |
||
34 | |||
35 | /** |
||
36 | * Teaser |
||
37 | * |
||
38 | * @var string |
||
39 | */ |
||
40 | protected $teaser = ''; |
||
41 | |||
42 | /** |
||
43 | * Description |
||
44 | * |
||
45 | * @var string |
||
46 | */ |
||
47 | protected $description = ''; |
||
48 | |||
49 | /** |
||
50 | * Program/Schedule |
||
51 | * |
||
52 | * @var string |
||
53 | */ |
||
54 | protected $program = ''; |
||
55 | |||
56 | /** |
||
57 | * Startdate and time |
||
58 | * |
||
59 | * @var \DateTime |
||
60 | */ |
||
61 | protected $startdate = null; |
||
62 | |||
63 | /** |
||
64 | * Enddate and time |
||
65 | * |
||
66 | * @var \DateTime |
||
67 | */ |
||
68 | protected $enddate = null; |
||
69 | |||
70 | /** |
||
71 | * Max participants |
||
72 | * |
||
73 | * @var int |
||
74 | */ |
||
75 | protected $maxParticipants = 0; |
||
76 | |||
77 | /** |
||
78 | * Max registrations per user |
||
79 | * |
||
80 | * @var int |
||
81 | */ |
||
82 | protected $maxRegistrationsPerUser = 1; |
||
83 | |||
84 | /** |
||
85 | * Price |
||
86 | * |
||
87 | * @var float |
||
88 | */ |
||
89 | protected $price = 0.0; |
||
90 | |||
91 | /** |
||
92 | * Currency |
||
93 | * |
||
94 | * @var string |
||
95 | */ |
||
96 | protected $currency = ''; |
||
97 | |||
98 | /** |
||
99 | * Enable payment |
||
100 | * |
||
101 | * @var bool |
||
102 | */ |
||
103 | protected $enablePayment = false; |
||
104 | |||
105 | /** |
||
106 | * Restrict payment methods |
||
107 | * |
||
108 | * @var bool |
||
109 | */ |
||
110 | protected $restrictPaymentMethods = false; |
||
111 | |||
112 | /** |
||
113 | * Selected payment methods |
||
114 | * |
||
115 | * @var string |
||
116 | */ |
||
117 | protected $selectedPaymentMethods = ''; |
||
118 | |||
119 | /** |
||
120 | * Category |
||
121 | * |
||
122 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\Category> |
||
123 | * @lazy |
||
124 | */ |
||
125 | protected $category = null; |
||
126 | |||
127 | /** |
||
128 | * Related |
||
129 | * |
||
130 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DERHANSEN\SfEventMgt\Domain\Model\Event> |
||
131 | * @lazy |
||
132 | */ |
||
133 | protected $related; |
||
134 | |||
135 | /** |
||
136 | * Registration |
||
137 | * |
||
138 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DERHANSEN\SfEventMgt\Domain\Model\Registration> |
||
139 | * @cascade remove |
||
140 | * @lazy |
||
141 | */ |
||
142 | protected $registration = null; |
||
143 | |||
144 | /** |
||
145 | * Registration waitlist |
||
146 | * |
||
147 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DERHANSEN\SfEventMgt\Domain\Model\Registration> |
||
148 | * @lazy |
||
149 | */ |
||
150 | protected $registrationWaitlist; |
||
151 | |||
152 | /** |
||
153 | * Registration fields |
||
154 | * |
||
155 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DERHANSEN\SfEventMgt\Domain\Model\Registration\Field> |
||
156 | * @lazy |
||
157 | */ |
||
158 | protected $registrationFields; |
||
159 | |||
160 | /** |
||
161 | * Registration deadline date |
||
162 | * |
||
163 | * @var \DateTime |
||
164 | */ |
||
165 | protected $registrationDeadline = null; |
||
166 | |||
167 | /** |
||
168 | * The image |
||
169 | * |
||
170 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference> |
||
171 | * @lazy |
||
172 | */ |
||
173 | protected $image = null; |
||
174 | |||
175 | /** |
||
176 | * Additional files |
||
177 | * |
||
178 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference> |
||
179 | * @lazy |
||
180 | */ |
||
181 | protected $files = null; |
||
182 | |||
183 | /** |
||
184 | * YouTube Embed code |
||
185 | * |
||
186 | * @var string |
||
187 | */ |
||
188 | protected $youtube = ''; |
||
189 | |||
190 | /** |
||
191 | * The Location |
||
192 | * |
||
193 | * @var \DERHANSEN\SfEventMgt\Domain\Model\Location |
||
194 | */ |
||
195 | protected $location = null; |
||
196 | |||
197 | /** |
||
198 | * Enable registration |
||
199 | * |
||
200 | * @var bool |
||
201 | */ |
||
202 | protected $enableRegistration = false; |
||
203 | |||
204 | /** |
||
205 | * Enable waitlist |
||
206 | * |
||
207 | * @var bool |
||
208 | */ |
||
209 | protected $enableWaitlist = false; |
||
210 | |||
211 | /** |
||
212 | * Link |
||
213 | * |
||
214 | * @var string |
||
215 | */ |
||
216 | protected $link; |
||
217 | |||
218 | /** |
||
219 | * Top event |
||
220 | * |
||
221 | * @var bool |
||
222 | */ |
||
223 | protected $topEvent = false; |
||
224 | |||
225 | /** |
||
226 | * The additionalImage |
||
227 | * |
||
228 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference> |
||
229 | * @lazy |
||
230 | */ |
||
231 | protected $additionalImage = null; |
||
232 | |||
233 | /** |
||
234 | * The organisator |
||
235 | * |
||
236 | * @var \DERHANSEN\SfEventMgt\Domain\Model\Organisator |
||
237 | */ |
||
238 | protected $organisator = null; |
||
239 | |||
240 | /** |
||
241 | * Notify admin |
||
242 | * |
||
243 | * @var bool |
||
244 | */ |
||
245 | protected $notifyAdmin = true; |
||
246 | |||
247 | /** |
||
248 | * Notify organisator |
||
249 | * |
||
250 | * @var bool |
||
251 | */ |
||
252 | protected $notifyOrganisator = false; |
||
253 | |||
254 | /** |
||
255 | * Enable cancel of registration |
||
256 | * |
||
257 | * @var bool |
||
258 | */ |
||
259 | protected $enableCancel = false; |
||
260 | |||
261 | /** |
||
262 | * Deadline for cancel |
||
263 | * |
||
264 | * @var \DateTime |
||
265 | */ |
||
266 | protected $cancelDeadline = null; |
||
267 | |||
268 | /** |
||
269 | * Enable auto confirmation |
||
270 | * |
||
271 | * @var bool |
||
272 | */ |
||
273 | protected $enableAutoconfirm = false; |
||
274 | |||
275 | /** |
||
276 | * Unique e-mail check |
||
277 | * |
||
278 | * @var bool |
||
279 | */ |
||
280 | protected $uniqueEmailCheck = false; |
||
281 | |||
282 | /** |
||
283 | * Price options |
||
284 | * |
||
285 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DERHANSEN\SfEventMgt\Domain\Model\PriceOption> |
||
286 | * @cascade remove |
||
287 | * @lazy |
||
288 | */ |
||
289 | protected $priceOptions = null; |
||
290 | |||
291 | /** |
||
292 | * Speaker |
||
293 | * |
||
294 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DERHANSEN\SfEventMgt\Domain\Model\Speaker> |
||
295 | * @lazy |
||
296 | */ |
||
297 | protected $speaker = null; |
||
298 | |||
299 | /** |
||
300 | * Constructor |
||
301 | */ |
||
302 | public function __construct() |
||
315 | |||
316 | /** |
||
317 | * Returns the title |
||
318 | * |
||
319 | * @return string $title |
||
320 | */ |
||
321 | public function getTitle() |
||
325 | |||
326 | /** |
||
327 | * Sets the title |
||
328 | * |
||
329 | * @param string $title Title |
||
330 | * |
||
331 | * @return void |
||
332 | */ |
||
333 | public function setTitle($title) |
||
337 | |||
338 | /** |
||
339 | * Returns the teaser |
||
340 | * |
||
341 | * @return string |
||
342 | */ |
||
343 | public function getTeaser() |
||
347 | |||
348 | /** |
||
349 | * Sets the teaser |
||
350 | * |
||
351 | * @param string $teaser Teaser |
||
352 | * |
||
353 | * @return void |
||
354 | */ |
||
355 | public function setTeaser($teaser) |
||
359 | |||
360 | /** |
||
361 | * Returns the description |
||
362 | * |
||
363 | * @return string $description |
||
364 | */ |
||
365 | public function getDescription() |
||
369 | |||
370 | /** |
||
371 | * Sets the description |
||
372 | * |
||
373 | * @param string $description Description |
||
374 | * |
||
375 | * @return void |
||
376 | */ |
||
377 | public function setDescription($description) |
||
381 | |||
382 | /** |
||
383 | * Returns the program |
||
384 | * |
||
385 | * @return string $program |
||
386 | */ |
||
387 | public function getProgram() |
||
391 | |||
392 | /** |
||
393 | * Sets the program |
||
394 | * |
||
395 | * @param string $program The program |
||
396 | * |
||
397 | * @return void |
||
398 | */ |
||
399 | public function setProgram($program) |
||
403 | |||
404 | /** |
||
405 | * Returns the startdate |
||
406 | * |
||
407 | * @return \DateTime $startdate |
||
408 | */ |
||
409 | public function getStartdate() |
||
413 | |||
414 | /** |
||
415 | * Sets the startdate |
||
416 | * |
||
417 | * @param \DateTime $startdate Startdate |
||
418 | * |
||
419 | * @return void |
||
420 | */ |
||
421 | public function setStartdate(\DateTime $startdate) |
||
425 | |||
426 | /** |
||
427 | * Returns the enddate |
||
428 | * |
||
429 | * @return \DateTime $enddate |
||
430 | */ |
||
431 | public function getEnddate() |
||
435 | |||
436 | /** |
||
437 | * Sets the enddate |
||
438 | * |
||
439 | * @param \DateTime $enddate Enddate |
||
440 | * |
||
441 | * @return void |
||
442 | */ |
||
443 | public function setEnddate(\DateTime $enddate) |
||
447 | |||
448 | /** |
||
449 | * Returns the participants |
||
450 | * |
||
451 | * @return int $participants |
||
452 | */ |
||
453 | public function getMaxParticipants() |
||
457 | |||
458 | /** |
||
459 | * Sets the participants |
||
460 | * |
||
461 | * @param int $participants Participants |
||
462 | * |
||
463 | * @return void |
||
464 | */ |
||
465 | public function setMaxParticipants($participants) |
||
469 | |||
470 | /** |
||
471 | * Returns the price |
||
472 | * |
||
473 | * @return float $price |
||
474 | */ |
||
475 | public function getPrice() |
||
479 | |||
480 | /** |
||
481 | * Sets the price |
||
482 | * |
||
483 | * @param float $price Price |
||
484 | * |
||
485 | * @return void |
||
486 | */ |
||
487 | public function setPrice($price) |
||
491 | |||
492 | /** |
||
493 | * Returns the currency |
||
494 | * |
||
495 | * @return string $currency |
||
496 | */ |
||
497 | public function getCurrency() |
||
501 | |||
502 | /** |
||
503 | * Sets the currency |
||
504 | * |
||
505 | * @param string $currency Currency |
||
506 | * |
||
507 | * @return void |
||
508 | */ |
||
509 | public function setCurrency($currency) |
||
513 | |||
514 | /** |
||
515 | * Returns if payment is enabled |
||
516 | * |
||
517 | * @return boolean |
||
518 | */ |
||
519 | public function getEnablePayment() |
||
523 | |||
524 | /** |
||
525 | * Sets enablePayment |
||
526 | * |
||
527 | * @param boolean $enablePayment |
||
528 | * @return void |
||
529 | */ |
||
530 | public function setEnablePayment($enablePayment) |
||
534 | |||
535 | /** |
||
536 | * Returns if payment methods should be restricted |
||
537 | * |
||
538 | * @return boolean |
||
539 | */ |
||
540 | public function getRestrictPaymentMethods() |
||
544 | |||
545 | /** |
||
546 | * Sets if payment methods should be restricted |
||
547 | * |
||
548 | * @param boolean $restrictPaymentMethods |
||
549 | * @return void |
||
550 | */ |
||
551 | public function setRestrictPaymentMethods($restrictPaymentMethods) |
||
555 | |||
556 | /** |
||
557 | * Returns selected payment methods |
||
558 | * |
||
559 | * @return string |
||
560 | */ |
||
561 | public function getSelectedPaymentMethods() |
||
565 | |||
566 | /** |
||
567 | * Sets selected payment methods |
||
568 | * |
||
569 | * @param string $selectedPaymentMethods |
||
570 | * @return void |
||
571 | */ |
||
572 | public function setSelectedPaymentMethods($selectedPaymentMethods) |
||
576 | |||
577 | /** |
||
578 | * Adds a Category |
||
579 | * |
||
580 | * @param \TYPO3\CMS\Extbase\Domain\Model\Category $category Category |
||
581 | * |
||
582 | * @return void |
||
583 | */ |
||
584 | public function addCategory(\TYPO3\CMS\Extbase\Domain\Model\Category $category) |
||
588 | |||
589 | /** |
||
590 | * Removes a Category |
||
591 | * |
||
592 | * @param \TYPO3\CMS\Extbase\Domain\Model\Category $categoryToRemove The Category to be removed |
||
593 | * |
||
594 | * @return void |
||
595 | */ |
||
596 | public function removeCategory(\TYPO3\CMS\Extbase\Domain\Model\Category $categoryToRemove) |
||
600 | |||
601 | /** |
||
602 | * Returns the category |
||
603 | * |
||
604 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
||
605 | */ |
||
606 | public function getCategory() |
||
610 | |||
611 | /** |
||
612 | * Sets the category |
||
613 | * |
||
614 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $category Category |
||
615 | * |
||
616 | * @return void |
||
617 | */ |
||
618 | public function setCategory(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $category) |
||
622 | |||
623 | /** |
||
624 | * Returns related events |
||
625 | * |
||
626 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
||
627 | */ |
||
628 | public function getRelated() |
||
632 | |||
633 | /** |
||
634 | * Sets related events |
||
635 | * |
||
636 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $related |
||
637 | * @return void |
||
638 | */ |
||
639 | public function setRelated($related) |
||
643 | |||
644 | /** |
||
645 | * Adds a related event |
||
646 | * |
||
647 | * @param Event $event |
||
648 | * @return void |
||
649 | */ |
||
650 | public function addRelated(\DERHANSEN\SfEventMgt\Domain\Model\Event $event) |
||
654 | |||
655 | /** |
||
656 | * Removes a related event |
||
657 | * |
||
658 | * @param Event $event |
||
659 | * @return void |
||
660 | */ |
||
661 | public function removeRelated(\DERHANSEN\SfEventMgt\Domain\Model\Event $event) |
||
665 | |||
666 | /** |
||
667 | * Adds a Registration |
||
668 | * |
||
669 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Registration $registration Registration |
||
670 | * |
||
671 | * @return void |
||
672 | */ |
||
673 | public function addRegistration(\DERHANSEN\SfEventMgt\Domain\Model\Registration $registration) |
||
677 | |||
678 | /** |
||
679 | * Removes a Registration |
||
680 | * |
||
681 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Registration $registrationToRemove Registration |
||
682 | * |
||
683 | * @return void |
||
684 | */ |
||
685 | public function removeRegistration(\DERHANSEN\SfEventMgt\Domain\Model\Registration $registrationToRemove) |
||
689 | |||
690 | /** |
||
691 | * Returns the Registration |
||
692 | * |
||
693 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage $registration |
||
694 | */ |
||
695 | public function getRegistration() |
||
699 | |||
700 | /** |
||
701 | * Sets the Registration |
||
702 | * |
||
703 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $registration Registration |
||
704 | * |
||
705 | * @return void |
||
706 | */ |
||
707 | public function setRegistration(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $registration) |
||
711 | |||
712 | /** |
||
713 | * Adds an image |
||
714 | * |
||
715 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $image Image |
||
716 | * |
||
717 | * @return void |
||
718 | */ |
||
719 | public function addImage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $image) |
||
723 | |||
724 | /** |
||
725 | * Removes an image |
||
726 | * |
||
727 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $imageToRemove Image |
||
728 | * |
||
729 | * @return void |
||
730 | */ |
||
731 | public function removeImage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $imageToRemove) |
||
735 | |||
736 | /** |
||
737 | * Returns the image |
||
738 | * |
||
739 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage $image |
||
740 | */ |
||
741 | public function getImage() |
||
745 | |||
746 | /** |
||
747 | * Sets the image |
||
748 | * |
||
749 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $image Image |
||
750 | * |
||
751 | * @return void |
||
752 | */ |
||
753 | public function setImage(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $image) |
||
757 | |||
758 | /** |
||
759 | * Adds a file |
||
760 | * |
||
761 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $file File |
||
762 | * |
||
763 | * @return void |
||
764 | */ |
||
765 | public function addFiles(\TYPO3\CMS\Extbase\Domain\Model\FileReference $file) |
||
769 | |||
770 | /** |
||
771 | * Removes a file |
||
772 | * |
||
773 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $fileToRemove File |
||
774 | * |
||
775 | * @return void |
||
776 | */ |
||
777 | public function removeFiles(\TYPO3\CMS\Extbase\Domain\Model\FileReference $fileToRemove) |
||
781 | |||
782 | /** |
||
783 | * Returns the files |
||
784 | * |
||
785 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage $files |
||
786 | */ |
||
787 | public function getFiles() |
||
791 | |||
792 | /** |
||
793 | * Sets the files |
||
794 | * |
||
795 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $files Files |
||
796 | * |
||
797 | * @return void |
||
798 | */ |
||
799 | public function setFiles(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $files) |
||
803 | |||
804 | /** |
||
805 | * Returns YouTube embed code |
||
806 | * |
||
807 | * @return string |
||
808 | */ |
||
809 | public function getYoutube() |
||
813 | |||
814 | /** |
||
815 | * Sets YouTube embed code |
||
816 | * |
||
817 | * @param string $youtube Youtube |
||
818 | * |
||
819 | * @return void |
||
820 | */ |
||
821 | public function setYoutube($youtube) |
||
825 | |||
826 | /** |
||
827 | * Returns if the registration for this event is logically possible |
||
828 | * |
||
829 | * @return bool |
||
830 | */ |
||
831 | public function getRegistrationPossible() |
||
845 | |||
846 | /** |
||
847 | * Returns the amount of free places |
||
848 | * |
||
849 | * @return int |
||
850 | */ |
||
851 | public function getFreePlaces() |
||
855 | |||
856 | /** |
||
857 | * Sets the location |
||
858 | * |
||
859 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Location $location Location |
||
860 | * |
||
861 | * @return void |
||
862 | */ |
||
863 | public function setLocation($location) |
||
867 | |||
868 | /** |
||
869 | * Returns the location |
||
870 | * |
||
871 | * @return \DERHANSEN\SfEventMgt\Domain\Model\Location |
||
872 | */ |
||
873 | public function getLocation() |
||
877 | |||
878 | /** |
||
879 | * Sets enableRegistration |
||
880 | * |
||
881 | * @param bool $enableRegistration EnableRegistration |
||
882 | * |
||
883 | * @return void |
||
884 | */ |
||
885 | public function setEnableRegistration($enableRegistration) |
||
889 | |||
890 | /** |
||
891 | * Returns if registration is enabled |
||
892 | * |
||
893 | * @return bool |
||
894 | */ |
||
895 | public function getEnableRegistration() |
||
899 | |||
900 | /** |
||
901 | * Returns enableWaitlist |
||
902 | * |
||
903 | * @return boolean |
||
904 | */ |
||
905 | public function getEnableWaitlist() |
||
909 | |||
910 | /** |
||
911 | * Sets enableWaitlist |
||
912 | * |
||
913 | * @param boolean $enableWaitlist |
||
914 | * @return void |
||
915 | */ |
||
916 | public function setEnableWaitlist($enableWaitlist) |
||
920 | |||
921 | /** |
||
922 | * Sets the registration deadline |
||
923 | * |
||
924 | * @param \DateTime $registrationDeadline RegistrationDeadline |
||
925 | * |
||
926 | * @return void |
||
927 | */ |
||
928 | public function setRegistrationDeadline(\DateTime $registrationDeadline) |
||
932 | |||
933 | /** |
||
934 | * Returns the registration deadline |
||
935 | * |
||
936 | * @return \DateTime |
||
937 | */ |
||
938 | public function getRegistrationDeadline() |
||
942 | |||
943 | /** |
||
944 | * Sets the link |
||
945 | * |
||
946 | * @param string $link Link |
||
947 | * |
||
948 | * @return void |
||
949 | */ |
||
950 | public function setLink($link) |
||
954 | |||
955 | /** |
||
956 | * Returns the link |
||
957 | * |
||
958 | * @return string |
||
959 | */ |
||
960 | public function getLink() |
||
964 | |||
965 | /** |
||
966 | * Returns the uri of the link |
||
967 | * |
||
968 | * @return string |
||
969 | */ |
||
970 | public function getLinkUrl() |
||
974 | |||
975 | /** |
||
976 | * Returns the target of the link |
||
977 | * |
||
978 | * @return string |
||
979 | */ |
||
980 | public function getLinkTarget() |
||
984 | |||
985 | /** |
||
986 | * Returns the title of the link |
||
987 | * |
||
988 | * @return string |
||
989 | */ |
||
990 | public function getLinkTitle() |
||
994 | |||
995 | /** |
||
996 | * Splits link to an array respection that a title with more than one word is |
||
997 | * surrounded by quotation marks. Returns part of the link for usage in fluid |
||
998 | * viewhelpers. |
||
999 | * |
||
1000 | * @param int $part The part |
||
1001 | * |
||
1002 | * @return string |
||
1003 | */ |
||
1004 | public function getLinkPart($part) |
||
1016 | |||
1017 | /** |
||
1018 | * Sets topEvent |
||
1019 | * |
||
1020 | * @param bool $topEvent TopEvent |
||
1021 | * |
||
1022 | * @return void |
||
1023 | */ |
||
1024 | public function setTopEvent($topEvent) |
||
1028 | |||
1029 | /** |
||
1030 | * Returns if topEvent is checked |
||
1031 | * |
||
1032 | * @return bool |
||
1033 | */ |
||
1034 | public function getTopEvent() |
||
1038 | |||
1039 | /** |
||
1040 | * Returns max regisrations per user |
||
1041 | * |
||
1042 | * @return int |
||
1043 | */ |
||
1044 | public function getMaxRegistrationsPerUser() |
||
1048 | |||
1049 | /** |
||
1050 | * Sets max registrations per user |
||
1051 | * |
||
1052 | * @param int $maxRegistrationsPerUser MaxRegistrationsPerUser |
||
1053 | * |
||
1054 | * @return void |
||
1055 | */ |
||
1056 | public function setMaxRegistrationsPerUser($maxRegistrationsPerUser) |
||
1060 | |||
1061 | |||
1062 | /** |
||
1063 | * Adds an additionalImage |
||
1064 | * |
||
1065 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $additionalImage The Image |
||
1066 | * |
||
1067 | * @return void |
||
1068 | */ |
||
1069 | public function addAdditionalImage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $additionalImage) |
||
1073 | |||
1074 | /** |
||
1075 | * Removes an additionalImage |
||
1076 | * |
||
1077 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $additionalImageToRemove The Image |
||
1078 | * |
||
1079 | * @return void |
||
1080 | */ |
||
1081 | public function removeAdditionalImage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $additionalImageToRemove) |
||
1085 | |||
1086 | /** |
||
1087 | * Returns the additionalImage |
||
1088 | * |
||
1089 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage $additionalImage |
||
1090 | */ |
||
1091 | public function getAdditionalImage() |
||
1095 | |||
1096 | /** |
||
1097 | * Sets the additionalImage |
||
1098 | * |
||
1099 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $additionalImage The Image |
||
1100 | * |
||
1101 | * @return void |
||
1102 | */ |
||
1103 | public function setAdditionalImage(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $additionalImage) |
||
1107 | |||
1108 | /** |
||
1109 | * Returns the organisator |
||
1110 | * |
||
1111 | * @return Organisator |
||
1112 | */ |
||
1113 | public function getOrganisator() |
||
1117 | |||
1118 | /** |
||
1119 | * Sets the organisator |
||
1120 | * |
||
1121 | * @param Organisator $organisator The organisator |
||
1122 | * |
||
1123 | * @return void |
||
1124 | */ |
||
1125 | public function setOrganisator($organisator) |
||
1129 | |||
1130 | /** |
||
1131 | * Returns notifyAdmin |
||
1132 | * |
||
1133 | * @return bool |
||
1134 | */ |
||
1135 | public function getNotifyAdmin() |
||
1139 | |||
1140 | /** |
||
1141 | * Sets notifyAdmin |
||
1142 | * |
||
1143 | * @param bool $notifyAdmin NotifyAdmin |
||
1144 | * |
||
1145 | * @return void |
||
1146 | */ |
||
1147 | public function setNotifyAdmin($notifyAdmin) |
||
1151 | |||
1152 | /** |
||
1153 | * Returns if notifyAdmin is set |
||
1154 | * |
||
1155 | * @return bool |
||
1156 | */ |
||
1157 | public function getNotifyOrganisator() |
||
1161 | |||
1162 | /** |
||
1163 | * Sets notifyOrganisator |
||
1164 | * |
||
1165 | * @param bool $notifyOrganisator NotifyOrganisator |
||
1166 | * |
||
1167 | * @return void |
||
1168 | */ |
||
1169 | public function setNotifyOrganisator($notifyOrganisator) |
||
1173 | |||
1174 | /** |
||
1175 | * Sets enableCancel |
||
1176 | * |
||
1177 | * @param bool $enableCancel EnableCancel |
||
1178 | * |
||
1179 | * @return void |
||
1180 | */ |
||
1181 | public function setEnableCancel($enableCancel) |
||
1185 | |||
1186 | /** |
||
1187 | * Returns if registration can be canceled |
||
1188 | * |
||
1189 | * @return bool |
||
1190 | */ |
||
1191 | public function getEnableCancel() |
||
1195 | |||
1196 | /** |
||
1197 | * Sets the cancel deadline |
||
1198 | * |
||
1199 | * @param \DateTime $cancelDeadline CancelDeadline |
||
1200 | * |
||
1201 | * @return void |
||
1202 | */ |
||
1203 | public function setCancelDeadline(\DateTime $cancelDeadline) |
||
1207 | |||
1208 | /** |
||
1209 | * Returns the cancel deadline |
||
1210 | * |
||
1211 | * @return \DateTime |
||
1212 | */ |
||
1213 | public function getCancelDeadline() |
||
1217 | |||
1218 | /** |
||
1219 | * Returns if autoconfirmation is enabled |
||
1220 | * |
||
1221 | * @return bool |
||
1222 | */ |
||
1223 | public function getEnableAutoconfirm() |
||
1227 | |||
1228 | /** |
||
1229 | * Sets enable autoconfirm |
||
1230 | * |
||
1231 | * @param bool $enableAutoconfirm |
||
1232 | * @return void |
||
1233 | */ |
||
1234 | public function setEnableAutoconfirm($enableAutoconfirm) |
||
1238 | |||
1239 | /** |
||
1240 | * Returns uniqueEmailCheck |
||
1241 | * |
||
1242 | * @return boolean |
||
1243 | */ |
||
1244 | public function getUniqueEmailCheck() |
||
1248 | |||
1249 | /** |
||
1250 | * Sets UniqueEmailCheck |
||
1251 | * |
||
1252 | * @param boolean $uniqueEmailCheck |
||
1253 | * @return void |
||
1254 | */ |
||
1255 | public function setUniqueEmailCheck($uniqueEmailCheck) |
||
1259 | |||
1260 | /** |
||
1261 | * Returns price options |
||
1262 | * |
||
1263 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
||
1264 | */ |
||
1265 | public function getPriceOptions() |
||
1269 | |||
1270 | /** |
||
1271 | * Sets price options |
||
1272 | * |
||
1273 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $priceOptions |
||
1274 | * @return void |
||
1275 | */ |
||
1276 | public function setPriceOptions($priceOptions) |
||
1280 | |||
1281 | /** |
||
1282 | * Adds a price option |
||
1283 | * |
||
1284 | * @param \DERHANSEN\SfEventMgt\Domain\Model\PriceOption $priceOption Price option |
||
1285 | * |
||
1286 | * @return void |
||
1287 | */ |
||
1288 | public function addPriceOptions(\DERHANSEN\SfEventMgt\Domain\Model\PriceOption $priceOption) |
||
1292 | |||
1293 | /** |
||
1294 | * Removes a Registration |
||
1295 | * |
||
1296 | * @param \DERHANSEN\SfEventMgt\Domain\Model\PriceOption $priceOption Price option |
||
1297 | * |
||
1298 | * @return void |
||
1299 | */ |
||
1300 | public function removePriceOptions(\DERHANSEN\SfEventMgt\Domain\Model\PriceOption $priceOption) |
||
1304 | |||
1305 | /** |
||
1306 | * Returns all active price options sorted by date ASC |
||
1307 | * |
||
1308 | * @return array |
||
1309 | */ |
||
1310 | public function getActivePriceOptions() |
||
1324 | |||
1325 | /** |
||
1326 | * Returns the current price of the event respecting possible price options |
||
1327 | * |
||
1328 | * @return float |
||
1329 | */ |
||
1330 | public function getCurrentPrice() |
||
1341 | |||
1342 | /** |
||
1343 | * Returns registrationWaitlist |
||
1344 | * |
||
1345 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
||
1346 | */ |
||
1347 | public function getRegistrationWaitlist() |
||
1351 | |||
1352 | /** |
||
1353 | * Sets registrationWaitlist |
||
1354 | * |
||
1355 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $registration Registration |
||
1356 | * |
||
1357 | * @return void |
||
1358 | */ |
||
1359 | public function setRegistrationWaitlist(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $registration) |
||
1363 | |||
1364 | /** |
||
1365 | * Adds a Registration to the waitlist |
||
1366 | * |
||
1367 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Registration $registration Registration |
||
1368 | * |
||
1369 | * @return void |
||
1370 | */ |
||
1371 | public function addRegistrationWaitlist(\DERHANSEN\SfEventMgt\Domain\Model\Registration $registration) |
||
1375 | |||
1376 | /** |
||
1377 | * Removes a Registration from the waitlist |
||
1378 | * |
||
1379 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Registration $registrationToRemove Registration |
||
1380 | * |
||
1381 | * @return void |
||
1382 | */ |
||
1383 | public function removeRegistrationWaitlist(\DERHANSEN\SfEventMgt\Domain\Model\Registration $registrationToRemove) |
||
1387 | |||
1388 | /** |
||
1389 | * Returns, if cancellation for registrations of the event is possible |
||
1390 | * |
||
1391 | * @return bool |
||
1392 | */ |
||
1393 | public function getCancellationPossible() |
||
1397 | |||
1398 | /** |
||
1399 | * Returns speaker |
||
1400 | * |
||
1401 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
||
1402 | */ |
||
1403 | public function getSpeaker() |
||
1407 | |||
1408 | /** |
||
1409 | * Sets speaker |
||
1410 | * |
||
1411 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $speaker |
||
1412 | * @return void |
||
1413 | */ |
||
1414 | public function setSpeaker($speaker) |
||
1418 | |||
1419 | /** |
||
1420 | * Adds a speaker |
||
1421 | * |
||
1422 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Speaker $speaker |
||
1423 | * |
||
1424 | * @return void |
||
1425 | */ |
||
1426 | public function addSpeaker(\DERHANSEN\SfEventMgt\Domain\Model\Speaker $speaker) |
||
1430 | |||
1431 | /** |
||
1432 | * Removes a speaker |
||
1433 | * |
||
1434 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Speaker $speaker |
||
1435 | * |
||
1436 | * @return void |
||
1437 | */ |
||
1438 | public function removeSpeaker(\DERHANSEN\SfEventMgt\Domain\Model\Speaker $speaker) |
||
1442 | |||
1443 | /** |
||
1444 | * Returns registrationFields |
||
1445 | * |
||
1446 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
||
1447 | */ |
||
1448 | public function getRegistrationFields() |
||
1452 | |||
1453 | /** |
||
1454 | * Sets registrationWaitlist |
||
1455 | * |
||
1456 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $registrationFields |
||
1457 | * |
||
1458 | * @return void |
||
1459 | */ |
||
1460 | public function setRegistrationFields(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $registrationFields) |
||
1464 | |||
1465 | /** |
||
1466 | * Adds a registrationField |
||
1467 | * |
||
1468 | * @param Field $registrationField |
||
1469 | */ |
||
1470 | public function addRegistrationFields(Field $registrationField) |
||
1474 | |||
1475 | /** |
||
1476 | * Removed a registrationField |
||
1477 | * |
||
1478 | * @param Field $registrationField |
||
1479 | */ |
||
1480 | public function removeRegistrationFields(Field $registrationField) |
||
1484 | |||
1485 | /** |
||
1486 | * Returns an array with registration fields |
||
1487 | * |
||
1488 | * @return array |
||
1489 | */ |
||
1490 | public function getRegistrationFieldsUids() |
||
1498 | } |
||
1499 |