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 | * Title |
||
22 | * |
||
23 | * @var string |
||
24 | * @validate NotEmpty |
||
25 | */ |
||
26 | protected $title = ''; |
||
27 | |||
28 | /** |
||
29 | * Teaser |
||
30 | * |
||
31 | * @var string |
||
32 | */ |
||
33 | protected $teaser = ''; |
||
34 | |||
35 | /** |
||
36 | * Description |
||
37 | * |
||
38 | * @var string |
||
39 | */ |
||
40 | protected $description = ''; |
||
41 | |||
42 | /** |
||
43 | * Program/Schedule |
||
44 | * |
||
45 | * @var string |
||
46 | */ |
||
47 | protected $program = ''; |
||
48 | |||
49 | /** |
||
50 | * Startdate and time |
||
51 | * |
||
52 | * @var \DateTime |
||
53 | */ |
||
54 | protected $startdate = null; |
||
55 | |||
56 | /** |
||
57 | * Enddate and time |
||
58 | * |
||
59 | * @var \DateTime |
||
60 | */ |
||
61 | protected $enddate = null; |
||
62 | |||
63 | /** |
||
64 | * Max participants |
||
65 | * |
||
66 | * @var int |
||
67 | */ |
||
68 | protected $maxParticipants = 0; |
||
69 | |||
70 | /** |
||
71 | * Max registrations per user |
||
72 | * |
||
73 | * @var int |
||
74 | */ |
||
75 | protected $maxRegistrationsPerUser = 1; |
||
76 | |||
77 | /** |
||
78 | * Price |
||
79 | * |
||
80 | * @var float |
||
81 | */ |
||
82 | protected $price = 0.0; |
||
83 | |||
84 | /** |
||
85 | * Currency |
||
86 | * |
||
87 | * @var string |
||
88 | */ |
||
89 | protected $currency = ''; |
||
90 | |||
91 | /** |
||
92 | * Enable payment |
||
93 | * |
||
94 | * @var bool |
||
95 | */ |
||
96 | protected $enablePayment = false; |
||
97 | |||
98 | /** |
||
99 | * Restrict payment methods |
||
100 | * |
||
101 | * @var bool |
||
102 | */ |
||
103 | protected $restrictPaymentMethods = false; |
||
104 | |||
105 | /** |
||
106 | * Selected payment methods |
||
107 | * |
||
108 | * @var string |
||
109 | */ |
||
110 | protected $selectedPaymentMethods = ''; |
||
111 | |||
112 | /** |
||
113 | * Category |
||
114 | * |
||
115 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DERHANSEN\SfEventMgt\Domain\Model\Category> |
||
116 | * @lazy |
||
117 | */ |
||
118 | protected $category = null; |
||
119 | |||
120 | /** |
||
121 | * Related |
||
122 | * |
||
123 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DERHANSEN\SfEventMgt\Domain\Model\Event> |
||
124 | * @lazy |
||
125 | */ |
||
126 | protected $related; |
||
127 | |||
128 | /** |
||
129 | * Registration |
||
130 | * |
||
131 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DERHANSEN\SfEventMgt\Domain\Model\Registration> |
||
132 | * @cascade remove |
||
133 | * @lazy |
||
134 | */ |
||
135 | protected $registration = null; |
||
136 | |||
137 | /** |
||
138 | * Registration waitlist |
||
139 | * |
||
140 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DERHANSEN\SfEventMgt\Domain\Model\Registration> |
||
141 | * @lazy |
||
142 | */ |
||
143 | protected $registrationWaitlist; |
||
144 | |||
145 | /** |
||
146 | * Registration fields |
||
147 | * |
||
148 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DERHANSEN\SfEventMgt\Domain\Model\Registration\Field> |
||
149 | * @lazy |
||
150 | */ |
||
151 | protected $registrationFields; |
||
152 | |||
153 | /** |
||
154 | * Registration deadline date |
||
155 | * |
||
156 | * @var \DateTime |
||
157 | */ |
||
158 | protected $registrationDeadline = null; |
||
159 | |||
160 | /** |
||
161 | * The image |
||
162 | * |
||
163 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference> |
||
164 | * @lazy |
||
165 | */ |
||
166 | protected $image = null; |
||
167 | |||
168 | /** |
||
169 | * Additional files |
||
170 | * |
||
171 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference> |
||
172 | * @lazy |
||
173 | */ |
||
174 | protected $files = null; |
||
175 | |||
176 | /** |
||
177 | * The Location |
||
178 | * |
||
179 | * @var \DERHANSEN\SfEventMgt\Domain\Model\Location |
||
180 | */ |
||
181 | protected $location = null; |
||
182 | |||
183 | /** |
||
184 | * Enable registration |
||
185 | * |
||
186 | * @var bool |
||
187 | */ |
||
188 | protected $enableRegistration = false; |
||
189 | |||
190 | /** |
||
191 | * Enable waitlist |
||
192 | * |
||
193 | * @var bool |
||
194 | */ |
||
195 | protected $enableWaitlist = false; |
||
196 | |||
197 | /** |
||
198 | * Link |
||
199 | * |
||
200 | * @var string |
||
201 | */ |
||
202 | protected $link; |
||
203 | |||
204 | /** |
||
205 | * Top event |
||
206 | * |
||
207 | * @var bool |
||
208 | */ |
||
209 | protected $topEvent = false; |
||
210 | |||
211 | /** |
||
212 | * The additionalImage |
||
213 | * |
||
214 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference> |
||
215 | * @lazy |
||
216 | */ |
||
217 | protected $additionalImage = null; |
||
218 | |||
219 | /** |
||
220 | * The organisator |
||
221 | * |
||
222 | * @var \DERHANSEN\SfEventMgt\Domain\Model\Organisator |
||
223 | */ |
||
224 | protected $organisator = null; |
||
225 | |||
226 | /** |
||
227 | * Notify admin |
||
228 | * |
||
229 | * @var bool |
||
230 | */ |
||
231 | protected $notifyAdmin = true; |
||
232 | |||
233 | /** |
||
234 | * Notify organisator |
||
235 | * |
||
236 | * @var bool |
||
237 | */ |
||
238 | protected $notifyOrganisator = false; |
||
239 | |||
240 | /** |
||
241 | * Enable cancel of registration |
||
242 | * |
||
243 | * @var bool |
||
244 | */ |
||
245 | protected $enableCancel = false; |
||
246 | |||
247 | /** |
||
248 | * Deadline for cancel |
||
249 | * |
||
250 | * @var \DateTime |
||
251 | */ |
||
252 | protected $cancelDeadline = null; |
||
253 | |||
254 | /** |
||
255 | * Enable auto confirmation |
||
256 | * |
||
257 | * @var bool |
||
258 | */ |
||
259 | protected $enableAutoconfirm = false; |
||
260 | |||
261 | /** |
||
262 | * Unique e-mail check |
||
263 | * |
||
264 | * @var bool |
||
265 | */ |
||
266 | protected $uniqueEmailCheck = false; |
||
267 | |||
268 | /** |
||
269 | * Price options |
||
270 | * |
||
271 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DERHANSEN\SfEventMgt\Domain\Model\PriceOption> |
||
272 | * @cascade remove |
||
273 | * @lazy |
||
274 | */ |
||
275 | protected $priceOptions = null; |
||
276 | |||
277 | 181 | /** |
|
278 | * Speaker |
||
279 | 181 | * |
|
280 | 181 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DERHANSEN\SfEventMgt\Domain\Model\Speaker> |
|
281 | 181 | * @lazy |
|
282 | 181 | */ |
|
283 | 181 | protected $speaker = null; |
|
284 | 181 | ||
285 | 181 | /** |
|
286 | 181 | * Constructor |
|
287 | 181 | */ |
|
288 | public function __construct() |
||
301 | |||
302 | /** |
||
303 | * Returns the title |
||
304 | * |
||
305 | * @return string $title |
||
306 | 1 | */ |
|
307 | public function getTitle() |
||
311 | |||
312 | /** |
||
313 | * Sets the title |
||
314 | * |
||
315 | * @param string $title Title |
||
316 | 1 | * |
|
317 | * @return void |
||
318 | 1 | */ |
|
319 | public function setTitle($title) |
||
323 | |||
324 | /** |
||
325 | * Returns the teaser |
||
326 | * |
||
327 | * @return string |
||
328 | 1 | */ |
|
329 | public function getTeaser() |
||
333 | |||
334 | /** |
||
335 | * Sets the teaser |
||
336 | * |
||
337 | * @param string $teaser Teaser |
||
338 | 1 | * |
|
339 | * @return void |
||
340 | 1 | */ |
|
341 | public function setTeaser($teaser) |
||
345 | |||
346 | /** |
||
347 | * Returns the description |
||
348 | * |
||
349 | * @return string $description |
||
350 | 1 | */ |
|
351 | public function getDescription() |
||
355 | |||
356 | /** |
||
357 | * Sets the description |
||
358 | * |
||
359 | * @param string $description Description |
||
360 | 1 | * |
|
361 | * @return void |
||
362 | 1 | */ |
|
363 | public function setDescription($description) |
||
367 | |||
368 | /** |
||
369 | * Returns the program |
||
370 | * |
||
371 | * @return string $program |
||
372 | 1 | */ |
|
373 | public function getProgram() |
||
377 | |||
378 | /** |
||
379 | * Sets the program |
||
380 | * |
||
381 | * @param string $program The program |
||
382 | 11 | * |
|
383 | * @return void |
||
384 | 11 | */ |
|
385 | public function setProgram($program) |
||
389 | |||
390 | /** |
||
391 | * Returns the startdate |
||
392 | * |
||
393 | * @return \DateTime $startdate |
||
394 | 11 | */ |
|
395 | public function getStartdate() |
||
399 | |||
400 | /** |
||
401 | * Sets the startdate |
||
402 | * |
||
403 | * @param \DateTime $startdate Startdate |
||
404 | 1 | * |
|
405 | * @return void |
||
406 | 1 | */ |
|
407 | public function setStartdate(\DateTime $startdate) |
||
411 | |||
412 | /** |
||
413 | * Returns the enddate |
||
414 | * |
||
415 | * @return \DateTime $enddate |
||
416 | 1 | */ |
|
417 | public function getEnddate() |
||
421 | |||
422 | /** |
||
423 | * Sets the enddate |
||
424 | * |
||
425 | * @param \DateTime $enddate Enddate |
||
426 | 14 | * |
|
427 | * @return void |
||
428 | 14 | */ |
|
429 | public function setEnddate(\DateTime $enddate) |
||
433 | |||
434 | /** |
||
435 | * Returns the participants |
||
436 | * |
||
437 | * @return int $participants |
||
438 | 13 | */ |
|
439 | public function getMaxParticipants() |
||
443 | |||
444 | /** |
||
445 | * Sets the participants |
||
446 | * |
||
447 | * @param int $participants Participants |
||
448 | 1 | * |
|
449 | * @return void |
||
450 | 1 | */ |
|
451 | public function setMaxParticipants($participants) |
||
455 | |||
456 | /** |
||
457 | * Returns the price |
||
458 | * |
||
459 | * @return float $price |
||
460 | 3 | */ |
|
461 | public function getPrice() |
||
465 | |||
466 | /** |
||
467 | * Sets the price |
||
468 | * |
||
469 | * @param float $price Price |
||
470 | 1 | * |
|
471 | * @return void |
||
472 | 1 | */ |
|
473 | public function setPrice($price) |
||
477 | |||
478 | /** |
||
479 | * Returns the currency |
||
480 | * |
||
481 | * @return string $currency |
||
482 | 1 | */ |
|
483 | public function getCurrency() |
||
487 | |||
488 | /** |
||
489 | * Sets the currency |
||
490 | * |
||
491 | * @param string $currency Currency |
||
492 | 4 | * |
|
493 | * @return void |
||
494 | 4 | */ |
|
495 | public function setCurrency($currency) |
||
499 | |||
500 | /** |
||
501 | * Returns if payment is enabled |
||
502 | * |
||
503 | 3 | * @return bool |
|
504 | */ |
||
505 | 3 | public function getEnablePayment() |
|
509 | |||
510 | /** |
||
511 | * Sets enablePayment |
||
512 | * |
||
513 | 3 | * @param bool $enablePayment |
|
514 | * @return void |
||
515 | 3 | */ |
|
516 | public function setEnablePayment($enablePayment) |
||
520 | |||
521 | /** |
||
522 | * Returns if payment methods should be restricted |
||
523 | * |
||
524 | 1 | * @return bool |
|
525 | */ |
||
526 | 1 | public function getRestrictPaymentMethods() |
|
530 | |||
531 | /** |
||
532 | * Sets if payment methods should be restricted |
||
533 | * |
||
534 | 2 | * @param bool $restrictPaymentMethods |
|
535 | * @return void |
||
536 | 2 | */ |
|
537 | public function setRestrictPaymentMethods($restrictPaymentMethods) |
||
541 | |||
542 | /** |
||
543 | * Returns selected payment methods |
||
544 | * |
||
545 | 1 | * @return string |
|
546 | */ |
||
547 | 1 | public function getSelectedPaymentMethods() |
|
551 | |||
552 | /** |
||
553 | * Sets selected payment methods |
||
554 | * |
||
555 | * @param string $selectedPaymentMethods |
||
556 | * @return void |
||
557 | 1 | */ |
|
558 | public function setSelectedPaymentMethods($selectedPaymentMethods) |
||
562 | |||
563 | /** |
||
564 | * Adds a Category |
||
565 | * |
||
566 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Category $category Category |
||
567 | * |
||
568 | * @return void |
||
569 | 1 | */ |
|
570 | public function addCategory(\DERHANSEN\SfEventMgt\Domain\Model\Category $category) |
||
574 | |||
575 | /** |
||
576 | * Removes a Category |
||
577 | * |
||
578 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Category $categoryToRemove The Category to be removed |
||
579 | 1 | * |
|
580 | * @return void |
||
581 | 1 | */ |
|
582 | public function removeCategory(\DERHANSEN\SfEventMgt\Domain\Model\Category $categoryToRemove) |
||
586 | |||
587 | /** |
||
588 | * Returns the category |
||
589 | * |
||
590 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
||
591 | 3 | */ |
|
592 | public function getCategory() |
||
596 | |||
597 | /** |
||
598 | * Sets the category |
||
599 | * |
||
600 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $category Category |
||
601 | 2 | * |
|
602 | * @return void |
||
603 | 2 | */ |
|
604 | public function setCategory(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $category) |
||
608 | |||
609 | /** |
||
610 | * Returns related events |
||
611 | * |
||
612 | 3 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
|
613 | */ |
||
614 | 3 | public function getRelated() |
|
618 | |||
619 | /** |
||
620 | * Sets related events |
||
621 | * |
||
622 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $related |
||
623 | 1 | * @return void |
|
624 | */ |
||
625 | 1 | public function setRelated($related) |
|
629 | |||
630 | /** |
||
631 | * Adds a related event |
||
632 | * |
||
633 | * @param Event $event |
||
634 | 1 | * @return void |
|
635 | */ |
||
636 | 1 | public function addRelated(\DERHANSEN\SfEventMgt\Domain\Model\Event $event) |
|
640 | |||
641 | /** |
||
642 | * Removes a related event |
||
643 | * |
||
644 | * @param Event $event |
||
645 | * @return void |
||
646 | 2 | */ |
|
647 | public function removeRelated(\DERHANSEN\SfEventMgt\Domain\Model\Event $event) |
||
651 | |||
652 | /** |
||
653 | * Adds a Registration |
||
654 | * |
||
655 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Registration $registration Registration |
||
656 | * |
||
657 | * @return void |
||
658 | 1 | */ |
|
659 | public function addRegistration(\DERHANSEN\SfEventMgt\Domain\Model\Registration $registration) |
||
663 | |||
664 | /** |
||
665 | * Removes a Registration |
||
666 | * |
||
667 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Registration $registrationToRemove Registration |
||
668 | 12 | * |
|
669 | * @return void |
||
670 | 12 | */ |
|
671 | public function removeRegistration(\DERHANSEN\SfEventMgt\Domain\Model\Registration $registrationToRemove) |
||
675 | |||
676 | /** |
||
677 | * Returns the Registration |
||
678 | * |
||
679 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage $registration |
||
680 | 9 | */ |
|
681 | public function getRegistration() |
||
685 | |||
686 | /** |
||
687 | * Sets the Registration |
||
688 | * |
||
689 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $registration Registration |
||
690 | * |
||
691 | * @return void |
||
692 | 1 | */ |
|
693 | public function setRegistration(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $registration) |
||
697 | |||
698 | /** |
||
699 | * Adds an image |
||
700 | * |
||
701 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $image Image |
||
702 | * |
||
703 | * @return void |
||
704 | 1 | */ |
|
705 | public function addImage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $image) |
||
709 | |||
710 | /** |
||
711 | * Removes an image |
||
712 | * |
||
713 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $imageToRemove Image |
||
714 | 1 | * |
|
715 | * @return void |
||
716 | 1 | */ |
|
717 | public function removeImage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $imageToRemove) |
||
721 | |||
722 | /** |
||
723 | * Returns the image |
||
724 | * |
||
725 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage $image |
||
726 | 3 | */ |
|
727 | public function getImage() |
||
731 | |||
732 | /** |
||
733 | * Sets the image |
||
734 | * |
||
735 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $image Image |
||
736 | * |
||
737 | * @return void |
||
738 | 2 | */ |
|
739 | public function setImage(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $image) |
||
743 | |||
744 | /** |
||
745 | * Adds a file |
||
746 | * |
||
747 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $file File |
||
748 | * |
||
749 | * @return void |
||
750 | 1 | */ |
|
751 | public function addFiles(\TYPO3\CMS\Extbase\Domain\Model\FileReference $file) |
||
755 | |||
756 | /** |
||
757 | * Removes a file |
||
758 | * |
||
759 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $fileToRemove File |
||
760 | 1 | * |
|
761 | * @return void |
||
762 | 1 | */ |
|
763 | public function removeFiles(\TYPO3\CMS\Extbase\Domain\Model\FileReference $fileToRemove) |
||
767 | |||
768 | /** |
||
769 | * Returns the files |
||
770 | * |
||
771 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage $files |
||
772 | 3 | */ |
|
773 | public function getFiles() |
||
777 | |||
778 | /** |
||
779 | * Sets the files |
||
780 | * |
||
781 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $files Files |
||
782 | 2 | * |
|
783 | * @return void |
||
784 | 2 | */ |
|
785 | public function setFiles(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $files) |
||
789 | |||
790 | /** |
||
791 | * Returns if the registration for this event is logically possible |
||
792 | * |
||
793 | * @return bool |
||
794 | 1 | */ |
|
795 | public function getRegistrationPossible() |
||
810 | 10 | ||
811 | 10 | /** |
|
812 | 1 | * Returns the amount of free places |
|
813 | 1 | * |
|
814 | 10 | * @return int |
|
815 | 10 | */ |
|
816 | 10 | public function getFreePlaces() |
|
820 | |||
821 | /** |
||
822 | * Sets the location |
||
823 | * |
||
824 | 5 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Location $location Location |
|
825 | * |
||
826 | 5 | * @return void |
|
827 | */ |
||
828 | public function setLocation($location) |
||
832 | |||
833 | /** |
||
834 | * Returns the location |
||
835 | * |
||
836 | 1 | * @return \DERHANSEN\SfEventMgt\Domain\Model\Location |
|
837 | */ |
||
838 | 1 | public function getLocation() |
|
842 | |||
843 | /** |
||
844 | * Sets enableRegistration |
||
845 | * |
||
846 | 1 | * @param bool $enableRegistration EnableRegistration |
|
847 | * |
||
848 | 1 | * @return void |
|
849 | */ |
||
850 | public function setEnableRegistration($enableRegistration) |
||
854 | |||
855 | /** |
||
856 | * Returns if registration is enabled |
||
857 | * |
||
858 | 10 | * @return bool |
|
859 | */ |
||
860 | 10 | public function getEnableRegistration() |
|
864 | |||
865 | /** |
||
866 | * Returns enableWaitlist |
||
867 | * |
||
868 | 8 | * @return bool |
|
869 | */ |
||
870 | 8 | public function getEnableWaitlist() |
|
874 | |||
875 | /** |
||
876 | * Sets enableWaitlist |
||
877 | * |
||
878 | 4 | * @param bool $enableWaitlist |
|
879 | * @return void |
||
880 | 4 | */ |
|
881 | public function setEnableWaitlist($enableWaitlist) |
||
885 | |||
886 | /** |
||
887 | * Sets the registration deadline |
||
888 | * |
||
889 | 5 | * @param \DateTime $registrationDeadline RegistrationDeadline |
|
890 | * |
||
891 | 5 | * @return void |
|
892 | 5 | */ |
|
893 | public function setRegistrationDeadline(\DateTime $registrationDeadline) |
||
897 | |||
898 | /** |
||
899 | * Returns the registration deadline |
||
900 | * |
||
901 | 3 | * @return \DateTime |
|
902 | */ |
||
903 | 3 | public function getRegistrationDeadline() |
|
907 | |||
908 | /** |
||
909 | * Sets the link |
||
910 | * |
||
911 | 11 | * @param string $link Link |
|
912 | * |
||
913 | 11 | * @return void |
|
914 | */ |
||
915 | public function setLink($link) |
||
919 | |||
920 | /** |
||
921 | * Returns the link |
||
922 | * |
||
923 | 12 | * @return string |
|
924 | */ |
||
925 | 12 | public function getLink() |
|
929 | |||
930 | /** |
||
931 | * Returns the uri of the link |
||
932 | * |
||
933 | 1 | * @return string |
|
934 | */ |
||
935 | 1 | public function getLinkUrl() |
|
939 | |||
940 | /** |
||
941 | * Returns the target of the link |
||
942 | * |
||
943 | 1 | * @return string |
|
944 | */ |
||
945 | 1 | public function getLinkTarget() |
|
949 | |||
950 | /** |
||
951 | * Returns the title of the link |
||
952 | * |
||
953 | 1 | * @return string |
|
954 | */ |
||
955 | 1 | public function getLinkTitle() |
|
959 | |||
960 | /** |
||
961 | * Splits link to an array respection that a title with more than one word is |
||
962 | * surrounded by quotation marks. Returns part of the link for usage in fluid |
||
963 | 1 | * viewhelpers. |
|
964 | * |
||
965 | 1 | * @param int $part The part |
|
966 | * |
||
967 | * @return string |
||
968 | */ |
||
969 | public function getLinkPart($part) |
||
982 | 11 | ||
983 | 11 | /** |
|
984 | 11 | * Sets topEvent |
|
985 | 1 | * |
|
986 | 1 | * @param bool $topEvent TopEvent |
|
987 | 11 | * |
|
988 | * @return void |
||
989 | */ |
||
990 | public function setTopEvent($topEvent) |
||
994 | |||
995 | /** |
||
996 | * Returns if topEvent is checked |
||
997 | 1 | * |
|
998 | * @return bool |
||
999 | 1 | */ |
|
1000 | 1 | public function getTopEvent() |
|
1004 | |||
1005 | /** |
||
1006 | * Returns max regisrations per user |
||
1007 | 1 | * |
|
1008 | * @return int |
||
1009 | 1 | */ |
|
1010 | public function getMaxRegistrationsPerUser() |
||
1014 | |||
1015 | /** |
||
1016 | * Sets max registrations per user |
||
1017 | 2 | * |
|
1018 | * @param int $maxRegistrationsPerUser MaxRegistrationsPerUser |
||
1019 | 2 | * |
|
1020 | * @return void |
||
1021 | */ |
||
1022 | public function setMaxRegistrationsPerUser($maxRegistrationsPerUser) |
||
1026 | |||
1027 | /** |
||
1028 | * Adds an additionalImage |
||
1029 | 1 | * |
|
1030 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $additionalImage The Image |
||
1031 | 1 | * |
|
1032 | 1 | * @return void |
|
1033 | */ |
||
1034 | public function addAdditionalImage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $additionalImage) |
||
1038 | |||
1039 | /** |
||
1040 | * Removes an additionalImage |
||
1041 | * |
||
1042 | 1 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $additionalImageToRemove The Image |
|
1043 | * |
||
1044 | 1 | * @return void |
|
1045 | 1 | */ |
|
1046 | public function removeAdditionalImage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $additionalImageToRemove) |
||
1050 | |||
1051 | /** |
||
1052 | * Returns the additionalImage |
||
1053 | * |
||
1054 | 1 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage $additionalImage |
|
1055 | */ |
||
1056 | 1 | public function getAdditionalImage() |
|
1060 | |||
1061 | /** |
||
1062 | * Sets the additionalImage |
||
1063 | * |
||
1064 | 1 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $additionalImage The Image |
|
1065 | * |
||
1066 | 1 | * @return void |
|
1067 | */ |
||
1068 | public function setAdditionalImage(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $additionalImage) |
||
1072 | |||
1073 | /** |
||
1074 | * Returns the organisator |
||
1075 | * |
||
1076 | 3 | * @return Organisator |
|
1077 | */ |
||
1078 | 3 | public function getOrganisator() |
|
1082 | |||
1083 | /** |
||
1084 | * Sets the organisator |
||
1085 | * |
||
1086 | 6 | * @param Organisator $organisator The organisator |
|
1087 | * |
||
1088 | 6 | * @return void |
|
1089 | */ |
||
1090 | public function setOrganisator($organisator) |
||
1094 | |||
1095 | /** |
||
1096 | * Returns notifyAdmin |
||
1097 | * |
||
1098 | 6 | * @return bool |
|
1099 | */ |
||
1100 | 6 | public function getNotifyAdmin() |
|
1104 | |||
1105 | /** |
||
1106 | * Sets notifyAdmin |
||
1107 | * |
||
1108 | 27 | * @param bool $notifyAdmin NotifyAdmin |
|
1109 | * |
||
1110 | 27 | * @return void |
|
1111 | */ |
||
1112 | public function setNotifyAdmin($notifyAdmin) |
||
1116 | |||
1117 | /** |
||
1118 | * Returns if notifyAdmin is set |
||
1119 | * |
||
1120 | 11 | * @return bool |
|
1121 | */ |
||
1122 | 11 | public function getNotifyOrganisator() |
|
1126 | |||
1127 | /** |
||
1128 | * Sets notifyOrganisator |
||
1129 | * |
||
1130 | 27 | * @param bool $notifyOrganisator NotifyOrganisator |
|
1131 | * |
||
1132 | 27 | * @return void |
|
1133 | */ |
||
1134 | public function setNotifyOrganisator($notifyOrganisator) |
||
1138 | |||
1139 | /** |
||
1140 | * Sets enableCancel |
||
1141 | * |
||
1142 | 11 | * @param bool $enableCancel EnableCancel |
|
1143 | * |
||
1144 | 11 | * @return void |
|
1145 | 11 | */ |
|
1146 | public function setEnableCancel($enableCancel) |
||
1150 | |||
1151 | /** |
||
1152 | * Returns if registration can be canceled |
||
1153 | * |
||
1154 | 4 | * @return bool |
|
1155 | */ |
||
1156 | 4 | public function getEnableCancel() |
|
1160 | |||
1161 | /** |
||
1162 | * Sets the cancel deadline |
||
1163 | * |
||
1164 | 5 | * @param \DateTime $cancelDeadline CancelDeadline |
|
1165 | * |
||
1166 | 5 | * @return void |
|
1167 | */ |
||
1168 | public function setCancelDeadline(\DateTime $cancelDeadline) |
||
1172 | |||
1173 | /** |
||
1174 | * Returns the cancel deadline |
||
1175 | * |
||
1176 | 4 | * @return \DateTime |
|
1177 | */ |
||
1178 | 4 | public function getCancelDeadline() |
|
1182 | |||
1183 | /** |
||
1184 | * Returns if autoconfirmation is enabled |
||
1185 | * |
||
1186 | 4 | * @return bool |
|
1187 | */ |
||
1188 | 4 | public function getEnableAutoconfirm() |
|
1192 | |||
1193 | /** |
||
1194 | * Sets enable autoconfirm |
||
1195 | * |
||
1196 | 2 | * @param bool $enableAutoconfirm |
|
1197 | * @return void |
||
1198 | 2 | */ |
|
1199 | public function setEnableAutoconfirm($enableAutoconfirm) |
||
1203 | |||
1204 | /** |
||
1205 | * Returns uniqueEmailCheck |
||
1206 | * |
||
1207 | 1 | * @return bool |
|
1208 | */ |
||
1209 | 1 | public function getUniqueEmailCheck() |
|
1213 | |||
1214 | /** |
||
1215 | * Sets UniqueEmailCheck |
||
1216 | * |
||
1217 | 5 | * @param bool $uniqueEmailCheck |
|
1218 | * @return void |
||
1219 | 5 | */ |
|
1220 | public function setUniqueEmailCheck($uniqueEmailCheck) |
||
1224 | |||
1225 | /** |
||
1226 | * Returns price options |
||
1227 | * |
||
1228 | 3 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
|
1229 | */ |
||
1230 | 3 | public function getPriceOptions() |
|
1234 | |||
1235 | /** |
||
1236 | * Sets price options |
||
1237 | * |
||
1238 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $priceOptions |
||
1239 | * @return void |
||
1240 | 3 | */ |
|
1241 | public function setPriceOptions($priceOptions) |
||
1245 | |||
1246 | /** |
||
1247 | * Adds a price option |
||
1248 | * |
||
1249 | * @param \DERHANSEN\SfEventMgt\Domain\Model\PriceOption $priceOption Price option |
||
1250 | * |
||
1251 | * @return void |
||
1252 | 1 | */ |
|
1253 | public function addPriceOptions(\DERHANSEN\SfEventMgt\Domain\Model\PriceOption $priceOption) |
||
1257 | |||
1258 | /** |
||
1259 | * Removes a Registration |
||
1260 | * |
||
1261 | * @param \DERHANSEN\SfEventMgt\Domain\Model\PriceOption $priceOption Price option |
||
1262 | 3 | * |
|
1263 | * @return void |
||
1264 | 3 | */ |
|
1265 | 3 | public function removePriceOptions(\DERHANSEN\SfEventMgt\Domain\Model\PriceOption $priceOption) |
|
1269 | 2 | ||
1270 | 2 | /** |
|
1271 | 3 | * Returns all active price options sorted by date ASC |
|
1272 | 3 | * |
|
1273 | 3 | * @return array |
|
1274 | 3 | */ |
|
1275 | public function getActivePriceOptions() |
||
1290 | 1 | ||
1291 | /** |
||
1292 | * Returns the current price of the event respecting possible price options |
||
1293 | * |
||
1294 | * @return float |
||
1295 | */ |
||
1296 | public function getCurrentPrice() |
||
1306 | |||
1307 | /** |
||
1308 | * Returns registrationWaitlist |
||
1309 | * |
||
1310 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
||
1311 | 3 | */ |
|
1312 | public function getRegistrationWaitlist() |
||
1316 | |||
1317 | /** |
||
1318 | * Sets registrationWaitlist |
||
1319 | * |
||
1320 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $registration Registration |
||
1321 | * |
||
1322 | * @return void |
||
1323 | 1 | */ |
|
1324 | public function setRegistrationWaitlist(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $registration) |
||
1328 | |||
1329 | /** |
||
1330 | * Adds a Registration to the waitlist |
||
1331 | * |
||
1332 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Registration $registration Registration |
||
1333 | * |
||
1334 | * @return void |
||
1335 | 1 | */ |
|
1336 | public function addRegistrationWaitlist(\DERHANSEN\SfEventMgt\Domain\Model\Registration $registration) |
||
1340 | |||
1341 | /** |
||
1342 | * Removes a Registration from the waitlist |
||
1343 | * |
||
1344 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Registration $registrationToRemove Registration |
||
1345 | 3 | * |
|
1346 | * @return void |
||
1347 | 3 | */ |
|
1348 | public function removeRegistrationWaitlist(\DERHANSEN\SfEventMgt\Domain\Model\Registration $registrationToRemove) |
||
1352 | |||
1353 | /** |
||
1354 | * Returns, if cancellation for registrations of the event is possible |
||
1355 | * |
||
1356 | * @return bool |
||
1357 | */ |
||
1358 | public function getCancellationPossible() |
||
1362 | |||
1363 | /** |
||
1364 | * Returns speaker |
||
1365 | * |
||
1366 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
||
1367 | */ |
||
1368 | public function getSpeaker() |
||
1372 | |||
1373 | /** |
||
1374 | * Sets speaker |
||
1375 | * |
||
1376 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $speaker |
||
1377 | * @return void |
||
1378 | */ |
||
1379 | public function setSpeaker($speaker) |
||
1383 | |||
1384 | /** |
||
1385 | * Adds a speaker |
||
1386 | * |
||
1387 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Speaker $speaker |
||
1388 | * |
||
1389 | * @return void |
||
1390 | */ |
||
1391 | public function addSpeaker(\DERHANSEN\SfEventMgt\Domain\Model\Speaker $speaker) |
||
1395 | |||
1396 | /** |
||
1397 | * Removes a speaker |
||
1398 | * |
||
1399 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Speaker $speaker |
||
1400 | * |
||
1401 | * @return void |
||
1402 | */ |
||
1403 | public function removeSpeaker(\DERHANSEN\SfEventMgt\Domain\Model\Speaker $speaker) |
||
1407 | |||
1408 | /** |
||
1409 | * Returns registrationFields |
||
1410 | * |
||
1411 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
||
1412 | */ |
||
1413 | public function getRegistrationFields() |
||
1417 | |||
1418 | /** |
||
1419 | * Sets registrationWaitlist |
||
1420 | * |
||
1421 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $registrationFields |
||
1422 | * |
||
1423 | * @return void |
||
1424 | */ |
||
1425 | public function setRegistrationFields(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $registrationFields) |
||
1429 | |||
1430 | /** |
||
1431 | * Adds a registrationField |
||
1432 | * |
||
1433 | * @param Field $registrationField |
||
1434 | */ |
||
1435 | public function addRegistrationFields(Field $registrationField) |
||
1439 | |||
1440 | /** |
||
1441 | * Removed a registrationField |
||
1442 | * |
||
1443 | * @param Field $registrationField |
||
1444 | */ |
||
1445 | public function removeRegistrationFields(Field $registrationField) |
||
1449 | |||
1450 | /** |
||
1451 | * Returns an array with registration field uids |
||
1452 | * |
||
1453 | * @return array |
||
1454 | */ |
||
1455 | public function getRegistrationFieldsUids() |
||
1464 | |||
1465 | /** |
||
1466 | * Returns an array with registration field uids and titles |
||
1467 | * [uid => title] |
||
1468 | * |
||
1469 | * @return array |
||
1470 | */ |
||
1471 | public function getRegistrationFieldUidsWithTitle() |
||
1480 | } |
||
1481 |