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 |
||
| 23 | class Event extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity |
||
| 24 | { |
||
| 25 | /** |
||
| 26 | * @var \DateTime |
||
| 27 | */ |
||
| 28 | protected $tstamp; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * Title |
||
| 32 | * |
||
| 33 | * @var string |
||
| 34 | * @validate NotEmpty |
||
| 35 | */ |
||
| 36 | protected $title = ''; |
||
| 37 | |||
| 38 | /** |
||
| 39 | * Teaser |
||
| 40 | * |
||
| 41 | * @var string |
||
| 42 | */ |
||
| 43 | protected $teaser = ''; |
||
| 44 | |||
| 45 | /** |
||
| 46 | * Description |
||
| 47 | * |
||
| 48 | * @var string |
||
| 49 | */ |
||
| 50 | protected $description = ''; |
||
| 51 | |||
| 52 | /** |
||
| 53 | * Program/Schedule |
||
| 54 | * |
||
| 55 | * @var string |
||
| 56 | */ |
||
| 57 | protected $program = ''; |
||
| 58 | |||
| 59 | /** |
||
| 60 | * Startdate and time |
||
| 61 | * |
||
| 62 | * @var \DateTime |
||
| 63 | */ |
||
| 64 | protected $startdate = null; |
||
| 65 | |||
| 66 | /** |
||
| 67 | * Enddate and time |
||
| 68 | * |
||
| 69 | * @var \DateTime |
||
| 70 | */ |
||
| 71 | protected $enddate = null; |
||
| 72 | |||
| 73 | /** |
||
| 74 | * Max participants |
||
| 75 | * |
||
| 76 | * @var int |
||
| 77 | */ |
||
| 78 | protected $maxParticipants = 0; |
||
| 79 | |||
| 80 | /** |
||
| 81 | * Max registrations per user |
||
| 82 | * |
||
| 83 | * @var int |
||
| 84 | */ |
||
| 85 | protected $maxRegistrationsPerUser = 1; |
||
| 86 | |||
| 87 | /** |
||
| 88 | * Price |
||
| 89 | * |
||
| 90 | * @var float |
||
| 91 | */ |
||
| 92 | protected $price = 0.0; |
||
| 93 | |||
| 94 | /** |
||
| 95 | * Currency |
||
| 96 | * |
||
| 97 | * @var string |
||
| 98 | */ |
||
| 99 | protected $currency = ''; |
||
| 100 | |||
| 101 | /** |
||
| 102 | * Enable payment |
||
| 103 | * |
||
| 104 | * @var bool |
||
| 105 | */ |
||
| 106 | protected $enablePayment = false; |
||
| 107 | |||
| 108 | /** |
||
| 109 | * Restrict payment methods |
||
| 110 | * |
||
| 111 | * @var bool |
||
| 112 | */ |
||
| 113 | protected $restrictPaymentMethods = false; |
||
| 114 | |||
| 115 | /** |
||
| 116 | * Selected payment methods |
||
| 117 | * |
||
| 118 | * @var string |
||
| 119 | */ |
||
| 120 | protected $selectedPaymentMethods = ''; |
||
| 121 | |||
| 122 | /** |
||
| 123 | * Category |
||
| 124 | * |
||
| 125 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DERHANSEN\SfEventMgt\Domain\Model\Category> |
||
| 126 | * @lazy |
||
| 127 | */ |
||
| 128 | protected $category = null; |
||
| 129 | |||
| 130 | /** |
||
| 131 | * Related |
||
| 132 | * |
||
| 133 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DERHANSEN\SfEventMgt\Domain\Model\Event> |
||
| 134 | * @lazy |
||
| 135 | */ |
||
| 136 | protected $related; |
||
| 137 | |||
| 138 | /** |
||
| 139 | * Registration |
||
| 140 | * |
||
| 141 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DERHANSEN\SfEventMgt\Domain\Model\Registration> |
||
| 142 | * @cascade remove |
||
| 143 | * @lazy |
||
| 144 | */ |
||
| 145 | protected $registration = null; |
||
| 146 | |||
| 147 | /** |
||
| 148 | * Registration waitlist |
||
| 149 | * |
||
| 150 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DERHANSEN\SfEventMgt\Domain\Model\Registration> |
||
| 151 | * @lazy |
||
| 152 | */ |
||
| 153 | protected $registrationWaitlist; |
||
| 154 | |||
| 155 | /** |
||
| 156 | * Registration fields |
||
| 157 | * |
||
| 158 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DERHANSEN\SfEventMgt\Domain\Model\Registration\Field> |
||
| 159 | * @lazy |
||
| 160 | */ |
||
| 161 | protected $registrationFields; |
||
| 162 | |||
| 163 | /** |
||
| 164 | * Registration start date |
||
| 165 | * |
||
| 166 | * @var \DateTime |
||
| 167 | */ |
||
| 168 | protected $registrationStartdate = null; |
||
| 169 | |||
| 170 | /** |
||
| 171 | * Registration deadline date |
||
| 172 | * |
||
| 173 | * @var \DateTime |
||
| 174 | */ |
||
| 175 | protected $registrationDeadline = null; |
||
| 176 | |||
| 177 | /** |
||
| 178 | * The image |
||
| 179 | * |
||
| 180 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference> |
||
| 181 | * @lazy |
||
| 182 | */ |
||
| 183 | protected $image = null; |
||
| 184 | |||
| 185 | /** |
||
| 186 | * Additional files |
||
| 187 | * |
||
| 188 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference> |
||
| 189 | * @lazy |
||
| 190 | */ |
||
| 191 | protected $files = null; |
||
| 192 | |||
| 193 | /** |
||
| 194 | * The Location |
||
| 195 | * |
||
| 196 | * @var \DERHANSEN\SfEventMgt\Domain\Model\Location |
||
| 197 | */ |
||
| 198 | protected $location = null; |
||
| 199 | |||
| 200 | /** |
||
| 201 | * Room |
||
| 202 | * |
||
| 203 | * @var string |
||
| 204 | */ |
||
| 205 | protected $room; |
||
| 206 | |||
| 207 | /** |
||
| 208 | * Enable registration |
||
| 209 | * |
||
| 210 | * @var bool |
||
| 211 | */ |
||
| 212 | protected $enableRegistration = false; |
||
| 213 | |||
| 214 | /** |
||
| 215 | * Enable waitlist |
||
| 216 | * |
||
| 217 | * @var bool |
||
| 218 | */ |
||
| 219 | protected $enableWaitlist = false; |
||
| 220 | |||
| 221 | /** |
||
| 222 | * Link |
||
| 223 | * |
||
| 224 | * @var string |
||
| 225 | */ |
||
| 226 | protected $link; |
||
| 227 | |||
| 228 | /** |
||
| 229 | * Top event |
||
| 230 | * |
||
| 231 | * @var bool |
||
| 232 | */ |
||
| 233 | protected $topEvent = false; |
||
| 234 | |||
| 235 | /** |
||
| 236 | * The additionalImage |
||
| 237 | * |
||
| 238 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference> |
||
| 239 | * @lazy |
||
| 240 | */ |
||
| 241 | protected $additionalImage = null; |
||
| 242 | |||
| 243 | /** |
||
| 244 | * The organisator |
||
| 245 | * |
||
| 246 | * @var \DERHANSEN\SfEventMgt\Domain\Model\Organisator |
||
| 247 | */ |
||
| 248 | protected $organisator = null; |
||
| 249 | |||
| 250 | /** |
||
| 251 | * Notify admin |
||
| 252 | * |
||
| 253 | * @var bool |
||
| 254 | */ |
||
| 255 | protected $notifyAdmin = true; |
||
| 256 | |||
| 257 | /** |
||
| 258 | * Notify organisator |
||
| 259 | * |
||
| 260 | * @var bool |
||
| 261 | */ |
||
| 262 | protected $notifyOrganisator = false; |
||
| 263 | |||
| 264 | /** |
||
| 265 | * Enable cancel of registration |
||
| 266 | * |
||
| 267 | * @var bool |
||
| 268 | */ |
||
| 269 | protected $enableCancel = false; |
||
| 270 | |||
| 271 | /** |
||
| 272 | * Deadline for cancel |
||
| 273 | * |
||
| 274 | * @var \DateTime |
||
| 275 | */ |
||
| 276 | protected $cancelDeadline = null; |
||
| 277 | |||
| 278 | /** |
||
| 279 | * Enable auto confirmation |
||
| 280 | * |
||
| 281 | * @var bool |
||
| 282 | */ |
||
| 283 | protected $enableAutoconfirm = false; |
||
| 284 | |||
| 285 | /** |
||
| 286 | * Unique e-mail check |
||
| 287 | * |
||
| 288 | * @var bool |
||
| 289 | */ |
||
| 290 | protected $uniqueEmailCheck = false; |
||
| 291 | |||
| 292 | /** |
||
| 293 | * Price options |
||
| 294 | * |
||
| 295 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DERHANSEN\SfEventMgt\Domain\Model\PriceOption> |
||
| 296 | * @cascade remove |
||
| 297 | * @lazy |
||
| 298 | */ |
||
| 299 | protected $priceOptions = null; |
||
| 300 | |||
| 301 | /** |
||
| 302 | * Speaker |
||
| 303 | * |
||
| 304 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DERHANSEN\SfEventMgt\Domain\Model\Speaker> |
||
| 305 | * @lazy |
||
| 306 | */ |
||
| 307 | protected $speaker = null; |
||
| 308 | |||
| 309 | /** |
||
| 310 | * Constructor |
||
| 311 | */ |
||
| 312 | public function __construct() |
||
| 325 | |||
| 326 | /** |
||
| 327 | * Get timestamp |
||
| 328 | * |
||
| 329 | * @return \DateTime |
||
| 330 | */ |
||
| 331 | public function getTstamp() |
||
| 335 | |||
| 336 | /** |
||
| 337 | * Set time stamp |
||
| 338 | * |
||
| 339 | * @param \DateTime $tstamp time stamp |
||
| 340 | */ |
||
| 341 | public function setTstamp($tstamp) |
||
| 345 | |||
| 346 | /** |
||
| 347 | * Returns the title |
||
| 348 | * |
||
| 349 | * @return string $title |
||
| 350 | */ |
||
| 351 | public function getTitle() |
||
| 355 | |||
| 356 | /** |
||
| 357 | * Sets the title |
||
| 358 | * |
||
| 359 | * @param string $title Title |
||
| 360 | * |
||
| 361 | * @return void |
||
| 362 | */ |
||
| 363 | public function setTitle($title) |
||
| 367 | |||
| 368 | /** |
||
| 369 | * Returns the teaser |
||
| 370 | * |
||
| 371 | * @return string |
||
| 372 | */ |
||
| 373 | public function getTeaser() |
||
| 377 | |||
| 378 | /** |
||
| 379 | * Sets the teaser |
||
| 380 | * |
||
| 381 | * @param string $teaser Teaser |
||
| 382 | * |
||
| 383 | * @return void |
||
| 384 | */ |
||
| 385 | public function setTeaser($teaser) |
||
| 389 | |||
| 390 | /** |
||
| 391 | * Returns the description |
||
| 392 | * |
||
| 393 | * @return string $description |
||
| 394 | */ |
||
| 395 | public function getDescription() |
||
| 399 | |||
| 400 | /** |
||
| 401 | * Sets the description |
||
| 402 | * |
||
| 403 | * @param string $description Description |
||
| 404 | * |
||
| 405 | * @return void |
||
| 406 | */ |
||
| 407 | public function setDescription($description) |
||
| 411 | |||
| 412 | /** |
||
| 413 | * Returns the program |
||
| 414 | * |
||
| 415 | * @return string $program |
||
| 416 | */ |
||
| 417 | public function getProgram() |
||
| 421 | |||
| 422 | /** |
||
| 423 | * Sets the program |
||
| 424 | * |
||
| 425 | * @param string $program The program |
||
| 426 | * |
||
| 427 | * @return void |
||
| 428 | */ |
||
| 429 | public function setProgram($program) |
||
| 433 | |||
| 434 | /** |
||
| 435 | * Returns the startdate |
||
| 436 | * |
||
| 437 | * @return \DateTime $startdate |
||
| 438 | */ |
||
| 439 | public function getStartdate() |
||
| 443 | |||
| 444 | /** |
||
| 445 | * Sets the startdate |
||
| 446 | * |
||
| 447 | * @param \DateTime $startdate Startdate |
||
| 448 | * |
||
| 449 | * @return void |
||
| 450 | */ |
||
| 451 | public function setStartdate(\DateTime $startdate) |
||
| 455 | |||
| 456 | /** |
||
| 457 | * Returns the enddate |
||
| 458 | * |
||
| 459 | * @return \DateTime $enddate |
||
| 460 | */ |
||
| 461 | public function getEnddate() |
||
| 465 | |||
| 466 | /** |
||
| 467 | * Sets the enddate |
||
| 468 | * |
||
| 469 | * @param \DateTime $enddate Enddate |
||
| 470 | * |
||
| 471 | * @return void |
||
| 472 | */ |
||
| 473 | public function setEnddate(\DateTime $enddate) |
||
| 477 | |||
| 478 | /** |
||
| 479 | * Returns the participants |
||
| 480 | * |
||
| 481 | * @return int $participants |
||
| 482 | */ |
||
| 483 | public function getMaxParticipants() |
||
| 487 | |||
| 488 | /** |
||
| 489 | * Sets the participants |
||
| 490 | * |
||
| 491 | * @param int $participants Participants |
||
| 492 | * |
||
| 493 | * @return void |
||
| 494 | */ |
||
| 495 | public function setMaxParticipants($participants) |
||
| 499 | |||
| 500 | /** |
||
| 501 | * Returns the price |
||
| 502 | * |
||
| 503 | * @return float $price |
||
| 504 | */ |
||
| 505 | public function getPrice() |
||
| 509 | |||
| 510 | /** |
||
| 511 | * Sets the price |
||
| 512 | * |
||
| 513 | * @param float $price Price |
||
| 514 | * |
||
| 515 | * @return void |
||
| 516 | */ |
||
| 517 | public function setPrice($price) |
||
| 521 | |||
| 522 | /** |
||
| 523 | * Returns the currency |
||
| 524 | * |
||
| 525 | * @return string $currency |
||
| 526 | */ |
||
| 527 | public function getCurrency() |
||
| 531 | |||
| 532 | /** |
||
| 533 | * Sets the currency |
||
| 534 | * |
||
| 535 | * @param string $currency Currency |
||
| 536 | * |
||
| 537 | * @return void |
||
| 538 | */ |
||
| 539 | public function setCurrency($currency) |
||
| 543 | |||
| 544 | /** |
||
| 545 | * Returns if payment is enabled |
||
| 546 | * |
||
| 547 | * @return bool |
||
| 548 | */ |
||
| 549 | public function getEnablePayment() |
||
| 553 | |||
| 554 | /** |
||
| 555 | * Sets enablePayment |
||
| 556 | * |
||
| 557 | * @param bool $enablePayment |
||
| 558 | * @return void |
||
| 559 | */ |
||
| 560 | public function setEnablePayment($enablePayment) |
||
| 564 | |||
| 565 | /** |
||
| 566 | * Returns if payment methods should be restricted |
||
| 567 | * |
||
| 568 | * @return bool |
||
| 569 | */ |
||
| 570 | public function getRestrictPaymentMethods() |
||
| 574 | |||
| 575 | /** |
||
| 576 | * Sets if payment methods should be restricted |
||
| 577 | * |
||
| 578 | * @param bool $restrictPaymentMethods |
||
| 579 | * @return void |
||
| 580 | */ |
||
| 581 | public function setRestrictPaymentMethods($restrictPaymentMethods) |
||
| 585 | |||
| 586 | /** |
||
| 587 | * Returns selected payment methods |
||
| 588 | * |
||
| 589 | * @return string |
||
| 590 | */ |
||
| 591 | public function getSelectedPaymentMethods() |
||
| 595 | |||
| 596 | /** |
||
| 597 | * Sets selected payment methods |
||
| 598 | * |
||
| 599 | * @param string $selectedPaymentMethods |
||
| 600 | * @return void |
||
| 601 | */ |
||
| 602 | public function setSelectedPaymentMethods($selectedPaymentMethods) |
||
| 606 | |||
| 607 | /** |
||
| 608 | * Adds a Category |
||
| 609 | * |
||
| 610 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Category $category Category |
||
| 611 | * |
||
| 612 | * @return void |
||
| 613 | */ |
||
| 614 | public function addCategory(\DERHANSEN\SfEventMgt\Domain\Model\Category $category) |
||
| 618 | |||
| 619 | /** |
||
| 620 | * Removes a Category |
||
| 621 | * |
||
| 622 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Category $categoryToRemove The Category to be removed |
||
| 623 | * |
||
| 624 | * @return void |
||
| 625 | */ |
||
| 626 | public function removeCategory(\DERHANSEN\SfEventMgt\Domain\Model\Category $categoryToRemove) |
||
| 630 | |||
| 631 | /** |
||
| 632 | * Returns the category |
||
| 633 | * |
||
| 634 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
||
| 635 | */ |
||
| 636 | public function getCategory() |
||
| 640 | |||
| 641 | /** |
||
| 642 | * Sets the category |
||
| 643 | * |
||
| 644 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $category Category |
||
| 645 | * |
||
| 646 | * @return void |
||
| 647 | */ |
||
| 648 | public function setCategory(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $category) |
||
| 652 | |||
| 653 | /** |
||
| 654 | * Returns related events |
||
| 655 | * |
||
| 656 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
||
| 657 | */ |
||
| 658 | public function getRelated() |
||
| 662 | |||
| 663 | /** |
||
| 664 | * Sets related events |
||
| 665 | * |
||
| 666 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $related |
||
| 667 | * @return void |
||
| 668 | */ |
||
| 669 | public function setRelated($related) |
||
| 673 | |||
| 674 | /** |
||
| 675 | * Adds a related event |
||
| 676 | * |
||
| 677 | * @param Event $event |
||
| 678 | * @return void |
||
| 679 | */ |
||
| 680 | public function addRelated(\DERHANSEN\SfEventMgt\Domain\Model\Event $event) |
||
| 684 | |||
| 685 | /** |
||
| 686 | * Removes a related event |
||
| 687 | * |
||
| 688 | * @param Event $event |
||
| 689 | * @return void |
||
| 690 | */ |
||
| 691 | public function removeRelated(\DERHANSEN\SfEventMgt\Domain\Model\Event $event) |
||
| 695 | |||
| 696 | /** |
||
| 697 | * Adds a Registration |
||
| 698 | * |
||
| 699 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Registration $registration Registration |
||
| 700 | * |
||
| 701 | * @return void |
||
| 702 | */ |
||
| 703 | public function addRegistration(\DERHANSEN\SfEventMgt\Domain\Model\Registration $registration) |
||
| 707 | |||
| 708 | /** |
||
| 709 | * Removes a Registration |
||
| 710 | * |
||
| 711 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Registration $registrationToRemove Registration |
||
| 712 | * |
||
| 713 | * @return void |
||
| 714 | */ |
||
| 715 | public function removeRegistration(\DERHANSEN\SfEventMgt\Domain\Model\Registration $registrationToRemove) |
||
| 719 | |||
| 720 | /** |
||
| 721 | * Returns the Registration |
||
| 722 | * |
||
| 723 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage $registration |
||
| 724 | */ |
||
| 725 | public function getRegistration() |
||
| 729 | |||
| 730 | /** |
||
| 731 | * Sets the Registration |
||
| 732 | * |
||
| 733 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $registration Registration |
||
| 734 | * |
||
| 735 | * @return void |
||
| 736 | */ |
||
| 737 | public function setRegistration(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $registration) |
||
| 741 | |||
| 742 | /** |
||
| 743 | * Adds an image |
||
| 744 | * |
||
| 745 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $image Image |
||
| 746 | * |
||
| 747 | * @return void |
||
| 748 | */ |
||
| 749 | public function addImage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $image) |
||
| 753 | |||
| 754 | /** |
||
| 755 | * Removes an image |
||
| 756 | * |
||
| 757 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $imageToRemove Image |
||
| 758 | * |
||
| 759 | * @return void |
||
| 760 | */ |
||
| 761 | public function removeImage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $imageToRemove) |
||
| 765 | |||
| 766 | /** |
||
| 767 | * Returns the image |
||
| 768 | * |
||
| 769 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage $image |
||
| 770 | */ |
||
| 771 | public function getImage() |
||
| 775 | |||
| 776 | /** |
||
| 777 | * Sets the image |
||
| 778 | * |
||
| 779 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $image Image |
||
| 780 | * |
||
| 781 | * @return void |
||
| 782 | */ |
||
| 783 | public function setImage(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $image) |
||
| 787 | |||
| 788 | /** |
||
| 789 | * Adds a file |
||
| 790 | * |
||
| 791 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $file File |
||
| 792 | * |
||
| 793 | * @return void |
||
| 794 | */ |
||
| 795 | public function addFiles(\TYPO3\CMS\Extbase\Domain\Model\FileReference $file) |
||
| 799 | |||
| 800 | /** |
||
| 801 | * Removes a file |
||
| 802 | * |
||
| 803 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $fileToRemove File |
||
| 804 | * |
||
| 805 | * @return void |
||
| 806 | */ |
||
| 807 | public function removeFiles(\TYPO3\CMS\Extbase\Domain\Model\FileReference $fileToRemove) |
||
| 811 | |||
| 812 | /** |
||
| 813 | * Returns the files |
||
| 814 | * |
||
| 815 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage $files |
||
| 816 | */ |
||
| 817 | public function getFiles() |
||
| 821 | |||
| 822 | /** |
||
| 823 | * Sets the files |
||
| 824 | * |
||
| 825 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $files Files |
||
| 826 | * |
||
| 827 | * @return void |
||
| 828 | */ |
||
| 829 | public function setFiles(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $files) |
||
| 833 | |||
| 834 | /** |
||
| 835 | * Returns if the registration for this event is logically possible |
||
| 836 | * |
||
| 837 | * @return bool |
||
| 838 | */ |
||
| 839 | public function getRegistrationPossible() |
||
| 858 | |||
| 859 | /** |
||
| 860 | * Returns the amount of free places |
||
| 861 | * |
||
| 862 | * @return int |
||
| 863 | */ |
||
| 864 | public function getFreePlaces() |
||
| 868 | |||
| 869 | /** |
||
| 870 | * Sets the location |
||
| 871 | * |
||
| 872 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Location $location Location |
||
| 873 | * |
||
| 874 | * @return void |
||
| 875 | */ |
||
| 876 | public function setLocation($location) |
||
| 880 | |||
| 881 | /** |
||
| 882 | * Returns the location |
||
| 883 | * |
||
| 884 | * @return \DERHANSEN\SfEventMgt\Domain\Model\Location |
||
| 885 | */ |
||
| 886 | public function getLocation() |
||
| 890 | |||
| 891 | /** |
||
| 892 | * Returns the room |
||
| 893 | * |
||
| 894 | * @return string |
||
| 895 | */ |
||
| 896 | public function getRoom() |
||
| 900 | |||
| 901 | /** |
||
| 902 | * Sets the room |
||
| 903 | * |
||
| 904 | * @param string $room |
||
| 905 | */ |
||
| 906 | public function setRoom($room) |
||
| 910 | |||
| 911 | /** |
||
| 912 | * Sets enableRegistration |
||
| 913 | * |
||
| 914 | * @param bool $enableRegistration EnableRegistration |
||
| 915 | * |
||
| 916 | * @return void |
||
| 917 | */ |
||
| 918 | public function setEnableRegistration($enableRegistration) |
||
| 922 | |||
| 923 | /** |
||
| 924 | * Returns if registration is enabled |
||
| 925 | * |
||
| 926 | * @return bool |
||
| 927 | */ |
||
| 928 | public function getEnableRegistration() |
||
| 932 | |||
| 933 | /** |
||
| 934 | * Returns enableWaitlist |
||
| 935 | * |
||
| 936 | * @return bool |
||
| 937 | */ |
||
| 938 | public function getEnableWaitlist() |
||
| 942 | |||
| 943 | /** |
||
| 944 | * Sets enableWaitlist |
||
| 945 | * |
||
| 946 | * @param bool $enableWaitlist |
||
| 947 | * @return void |
||
| 948 | */ |
||
| 949 | public function setEnableWaitlist($enableWaitlist) |
||
| 953 | |||
| 954 | /** |
||
| 955 | * Sets the registration startdate |
||
| 956 | * |
||
| 957 | * @param \DateTime $registrationStartdate RegistrationStartdate |
||
| 958 | * |
||
| 959 | * @return void |
||
| 960 | */ |
||
| 961 | public function setRegistrationStartdate(\DateTime $registrationStartdate) |
||
| 965 | |||
| 966 | /** |
||
| 967 | * Returns the registration startdate |
||
| 968 | * |
||
| 969 | * @return \DateTime |
||
| 970 | */ |
||
| 971 | public function getRegistrationStartdate() |
||
| 975 | |||
| 976 | /** |
||
| 977 | * Sets the registration deadline |
||
| 978 | * |
||
| 979 | * @param \DateTime $registrationDeadline RegistrationDeadline |
||
| 980 | * |
||
| 981 | * @return void |
||
| 982 | */ |
||
| 983 | public function setRegistrationDeadline(\DateTime $registrationDeadline) |
||
| 987 | |||
| 988 | /** |
||
| 989 | * Returns the registration deadline |
||
| 990 | * |
||
| 991 | * @return \DateTime |
||
| 992 | */ |
||
| 993 | public function getRegistrationDeadline() |
||
| 997 | |||
| 998 | /** |
||
| 999 | * Sets the link |
||
| 1000 | * |
||
| 1001 | * @param string $link Link |
||
| 1002 | * |
||
| 1003 | * @return void |
||
| 1004 | */ |
||
| 1005 | public function setLink($link) |
||
| 1009 | |||
| 1010 | /** |
||
| 1011 | * Returns the link |
||
| 1012 | * |
||
| 1013 | * @return string |
||
| 1014 | */ |
||
| 1015 | public function getLink() |
||
| 1019 | |||
| 1020 | /** |
||
| 1021 | * Sets topEvent |
||
| 1022 | * |
||
| 1023 | * @param bool $topEvent TopEvent |
||
| 1024 | * |
||
| 1025 | * @return void |
||
| 1026 | */ |
||
| 1027 | public function setTopEvent($topEvent) |
||
| 1031 | |||
| 1032 | /** |
||
| 1033 | * Returns if topEvent is checked |
||
| 1034 | * |
||
| 1035 | * @return bool |
||
| 1036 | */ |
||
| 1037 | public function getTopEvent() |
||
| 1041 | |||
| 1042 | /** |
||
| 1043 | * Returns max regisrations per user |
||
| 1044 | * |
||
| 1045 | * @return int |
||
| 1046 | */ |
||
| 1047 | public function getMaxRegistrationsPerUser() |
||
| 1051 | |||
| 1052 | /** |
||
| 1053 | * Sets max registrations per user |
||
| 1054 | * |
||
| 1055 | * @param int $maxRegistrationsPerUser MaxRegistrationsPerUser |
||
| 1056 | * |
||
| 1057 | * @return void |
||
| 1058 | */ |
||
| 1059 | public function setMaxRegistrationsPerUser($maxRegistrationsPerUser) |
||
| 1063 | |||
| 1064 | /** |
||
| 1065 | * Adds an additionalImage |
||
| 1066 | * |
||
| 1067 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $additionalImage The Image |
||
| 1068 | * |
||
| 1069 | * @return void |
||
| 1070 | */ |
||
| 1071 | public function addAdditionalImage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $additionalImage) |
||
| 1075 | |||
| 1076 | /** |
||
| 1077 | * Removes an additionalImage |
||
| 1078 | * |
||
| 1079 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $additionalImageToRemove The Image |
||
| 1080 | * |
||
| 1081 | * @return void |
||
| 1082 | */ |
||
| 1083 | public function removeAdditionalImage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $additionalImageToRemove) |
||
| 1087 | |||
| 1088 | /** |
||
| 1089 | * Returns the additionalImage |
||
| 1090 | * |
||
| 1091 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage $additionalImage |
||
| 1092 | */ |
||
| 1093 | public function getAdditionalImage() |
||
| 1097 | |||
| 1098 | /** |
||
| 1099 | * Sets the additionalImage |
||
| 1100 | * |
||
| 1101 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $additionalImage The Image |
||
| 1102 | * |
||
| 1103 | * @return void |
||
| 1104 | */ |
||
| 1105 | public function setAdditionalImage(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $additionalImage) |
||
| 1109 | |||
| 1110 | /** |
||
| 1111 | * Returns the organisator |
||
| 1112 | * |
||
| 1113 | * @return Organisator |
||
| 1114 | */ |
||
| 1115 | public function getOrganisator() |
||
| 1119 | |||
| 1120 | /** |
||
| 1121 | * Sets the organisator |
||
| 1122 | * |
||
| 1123 | * @param Organisator $organisator The organisator |
||
| 1124 | * |
||
| 1125 | * @return void |
||
| 1126 | */ |
||
| 1127 | public function setOrganisator($organisator) |
||
| 1131 | |||
| 1132 | /** |
||
| 1133 | * Returns notifyAdmin |
||
| 1134 | * |
||
| 1135 | * @return bool |
||
| 1136 | */ |
||
| 1137 | public function getNotifyAdmin() |
||
| 1141 | |||
| 1142 | /** |
||
| 1143 | * Sets notifyAdmin |
||
| 1144 | * |
||
| 1145 | * @param bool $notifyAdmin NotifyAdmin |
||
| 1146 | * |
||
| 1147 | * @return void |
||
| 1148 | */ |
||
| 1149 | public function setNotifyAdmin($notifyAdmin) |
||
| 1153 | |||
| 1154 | /** |
||
| 1155 | * Returns if notifyAdmin is set |
||
| 1156 | * |
||
| 1157 | * @return bool |
||
| 1158 | */ |
||
| 1159 | public function getNotifyOrganisator() |
||
| 1163 | |||
| 1164 | /** |
||
| 1165 | * Sets notifyOrganisator |
||
| 1166 | * |
||
| 1167 | * @param bool $notifyOrganisator NotifyOrganisator |
||
| 1168 | * |
||
| 1169 | * @return void |
||
| 1170 | */ |
||
| 1171 | public function setNotifyOrganisator($notifyOrganisator) |
||
| 1175 | |||
| 1176 | /** |
||
| 1177 | * Sets enableCancel |
||
| 1178 | * |
||
| 1179 | * @param bool $enableCancel EnableCancel |
||
| 1180 | * |
||
| 1181 | * @return void |
||
| 1182 | */ |
||
| 1183 | public function setEnableCancel($enableCancel) |
||
| 1187 | |||
| 1188 | /** |
||
| 1189 | * Returns if registration can be canceled |
||
| 1190 | * |
||
| 1191 | * @return bool |
||
| 1192 | */ |
||
| 1193 | public function getEnableCancel() |
||
| 1197 | |||
| 1198 | /** |
||
| 1199 | * Sets the cancel deadline |
||
| 1200 | * |
||
| 1201 | * @param \DateTime $cancelDeadline CancelDeadline |
||
| 1202 | * |
||
| 1203 | * @return void |
||
| 1204 | */ |
||
| 1205 | public function setCancelDeadline(\DateTime $cancelDeadline) |
||
| 1209 | |||
| 1210 | /** |
||
| 1211 | * Returns the cancel deadline |
||
| 1212 | * |
||
| 1213 | * @return \DateTime |
||
| 1214 | */ |
||
| 1215 | public function getCancelDeadline() |
||
| 1219 | |||
| 1220 | /** |
||
| 1221 | * Returns if autoconfirmation is enabled |
||
| 1222 | * |
||
| 1223 | * @return bool |
||
| 1224 | */ |
||
| 1225 | public function getEnableAutoconfirm() |
||
| 1229 | |||
| 1230 | /** |
||
| 1231 | * Sets enable autoconfirm |
||
| 1232 | * |
||
| 1233 | * @param bool $enableAutoconfirm |
||
| 1234 | * @return void |
||
| 1235 | */ |
||
| 1236 | public function setEnableAutoconfirm($enableAutoconfirm) |
||
| 1240 | |||
| 1241 | /** |
||
| 1242 | * Returns uniqueEmailCheck |
||
| 1243 | * |
||
| 1244 | * @return bool |
||
| 1245 | */ |
||
| 1246 | public function getUniqueEmailCheck() |
||
| 1250 | |||
| 1251 | /** |
||
| 1252 | * Sets UniqueEmailCheck |
||
| 1253 | * |
||
| 1254 | * @param bool $uniqueEmailCheck |
||
| 1255 | * @return void |
||
| 1256 | */ |
||
| 1257 | public function setUniqueEmailCheck($uniqueEmailCheck) |
||
| 1261 | |||
| 1262 | /** |
||
| 1263 | * Returns price options |
||
| 1264 | * |
||
| 1265 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
||
| 1266 | */ |
||
| 1267 | public function getPriceOptions() |
||
| 1271 | |||
| 1272 | /** |
||
| 1273 | * Sets price options |
||
| 1274 | * |
||
| 1275 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $priceOptions |
||
| 1276 | * @return void |
||
| 1277 | */ |
||
| 1278 | public function setPriceOptions($priceOptions) |
||
| 1282 | |||
| 1283 | /** |
||
| 1284 | * Adds a price option |
||
| 1285 | * |
||
| 1286 | * @param \DERHANSEN\SfEventMgt\Domain\Model\PriceOption $priceOption Price option |
||
| 1287 | * |
||
| 1288 | * @return void |
||
| 1289 | */ |
||
| 1290 | public function addPriceOptions(\DERHANSEN\SfEventMgt\Domain\Model\PriceOption $priceOption) |
||
| 1294 | |||
| 1295 | /** |
||
| 1296 | * Removes a Registration |
||
| 1297 | * |
||
| 1298 | * @param \DERHANSEN\SfEventMgt\Domain\Model\PriceOption $priceOption Price option |
||
| 1299 | * |
||
| 1300 | * @return void |
||
| 1301 | */ |
||
| 1302 | public function removePriceOptions(\DERHANSEN\SfEventMgt\Domain\Model\PriceOption $priceOption) |
||
| 1306 | |||
| 1307 | /** |
||
| 1308 | * Returns all active price options sorted by date ASC |
||
| 1309 | * |
||
| 1310 | * @return array |
||
| 1311 | */ |
||
| 1312 | public function getActivePriceOptions() |
||
| 1327 | |||
| 1328 | /** |
||
| 1329 | * Returns the current price of the event respecting possible price options |
||
| 1330 | * |
||
| 1331 | * @return float |
||
| 1332 | */ |
||
| 1333 | public function getCurrentPrice() |
||
| 1343 | |||
| 1344 | /** |
||
| 1345 | * Returns registrationWaitlist |
||
| 1346 | * |
||
| 1347 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
||
| 1348 | */ |
||
| 1349 | public function getRegistrationWaitlist() |
||
| 1353 | |||
| 1354 | /** |
||
| 1355 | * Sets registrationWaitlist |
||
| 1356 | * |
||
| 1357 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $registration Registration |
||
| 1358 | * |
||
| 1359 | * @return void |
||
| 1360 | */ |
||
| 1361 | public function setRegistrationWaitlist(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $registration) |
||
| 1365 | |||
| 1366 | /** |
||
| 1367 | * Adds a Registration to the waitlist |
||
| 1368 | * |
||
| 1369 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Registration $registration Registration |
||
| 1370 | * |
||
| 1371 | * @return void |
||
| 1372 | */ |
||
| 1373 | public function addRegistrationWaitlist(\DERHANSEN\SfEventMgt\Domain\Model\Registration $registration) |
||
| 1377 | |||
| 1378 | /** |
||
| 1379 | * Removes a Registration from the waitlist |
||
| 1380 | * |
||
| 1381 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Registration $registrationToRemove Registration |
||
| 1382 | * |
||
| 1383 | * @return void |
||
| 1384 | */ |
||
| 1385 | public function removeRegistrationWaitlist(\DERHANSEN\SfEventMgt\Domain\Model\Registration $registrationToRemove) |
||
| 1389 | |||
| 1390 | /** |
||
| 1391 | * Returns, if cancellation for registrations of the event is possible |
||
| 1392 | * |
||
| 1393 | * @return bool |
||
| 1394 | */ |
||
| 1395 | public function getCancellationPossible() |
||
| 1401 | |||
| 1402 | /** |
||
| 1403 | * Returns speaker |
||
| 1404 | * |
||
| 1405 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
||
| 1406 | */ |
||
| 1407 | public function getSpeaker() |
||
| 1411 | |||
| 1412 | /** |
||
| 1413 | * Sets speaker |
||
| 1414 | * |
||
| 1415 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $speaker |
||
| 1416 | * @return void |
||
| 1417 | */ |
||
| 1418 | public function setSpeaker($speaker) |
||
| 1422 | |||
| 1423 | /** |
||
| 1424 | * Adds a speaker |
||
| 1425 | * |
||
| 1426 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Speaker $speaker |
||
| 1427 | * |
||
| 1428 | * @return void |
||
| 1429 | */ |
||
| 1430 | public function addSpeaker(\DERHANSEN\SfEventMgt\Domain\Model\Speaker $speaker) |
||
| 1434 | |||
| 1435 | /** |
||
| 1436 | * Removes a speaker |
||
| 1437 | * |
||
| 1438 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Speaker $speaker |
||
| 1439 | * |
||
| 1440 | * @return void |
||
| 1441 | */ |
||
| 1442 | public function removeSpeaker(\DERHANSEN\SfEventMgt\Domain\Model\Speaker $speaker) |
||
| 1446 | |||
| 1447 | /** |
||
| 1448 | * Returns registrationFields |
||
| 1449 | * |
||
| 1450 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
||
| 1451 | */ |
||
| 1452 | public function getRegistrationFields() |
||
| 1456 | |||
| 1457 | /** |
||
| 1458 | * Sets registrationWaitlist |
||
| 1459 | * |
||
| 1460 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $registrationFields |
||
| 1461 | * |
||
| 1462 | * @return void |
||
| 1463 | */ |
||
| 1464 | public function setRegistrationFields(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $registrationFields) |
||
| 1468 | |||
| 1469 | /** |
||
| 1470 | * Adds a registrationField |
||
| 1471 | * |
||
| 1472 | * @param Field $registrationField |
||
| 1473 | */ |
||
| 1474 | public function addRegistrationFields(Field $registrationField) |
||
| 1478 | |||
| 1479 | /** |
||
| 1480 | * Removed a registrationField |
||
| 1481 | * |
||
| 1482 | * @param Field $registrationField |
||
| 1483 | */ |
||
| 1484 | public function removeRegistrationFields(Field $registrationField) |
||
| 1488 | |||
| 1489 | /** |
||
| 1490 | * Returns an array with registration field uids |
||
| 1491 | * |
||
| 1492 | * @return array |
||
| 1493 | */ |
||
| 1494 | public function getRegistrationFieldsUids() |
||
| 1503 | |||
| 1504 | /** |
||
| 1505 | * Returns an array with registration field uids and titles |
||
| 1506 | * [uid => title] |
||
| 1507 | * |
||
| 1508 | * @return array |
||
| 1509 | */ |
||
| 1510 | public function getRegistrationFieldUidsWithTitle() |
||
| 1519 | |||
| 1520 | /** |
||
| 1521 | * Special getter to return the amount of registrations that are saved to default language |
||
| 1522 | * Required since TYPO3 9.5 (#82363) |
||
| 1523 | * |
||
| 1524 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
||
| 1525 | */ |
||
| 1526 | public function getRegistrations() |
||
| 1534 | |||
| 1535 | /** |
||
| 1536 | * Special getter to return the amount of waitlist registrations that are saved to default language |
||
| 1537 | * Required since TYPO3 9.5 (#82363) |
||
| 1538 | * |
||
| 1539 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
||
| 1540 | */ |
||
| 1541 | public function getRegistrationsWaitlist() |
||
| 1550 | |||
| 1551 | /** |
||
| 1552 | * Returns an objectStorage object holding all registrations in the default language. |
||
| 1553 | * Ensures expected behavior of getRegistration() and getRegistrationWaitlist() since TYPO3 issue #82363 |
||
| 1554 | * |
||
| 1555 | * @param bool $waitlist |
||
| 1556 | * @return ObjectStorage |
||
| 1557 | */ |
||
| 1558 | protected function getRegistrationsDefaultLanguage(bool $waitlist = false) |
||
| 1570 | |||
| 1571 | /** |
||
| 1572 | * Returns if the event ends on the same day |
||
| 1573 | * |
||
| 1574 | * @return bool |
||
| 1575 | */ |
||
| 1576 | public function getEndsSameDay(): bool |
||
| 1584 | |||
| 1585 | /** |
||
| 1586 | * Returns the challenge for the challenge/response spam check |
||
| 1587 | * |
||
| 1588 | * @return string |
||
| 1589 | */ |
||
| 1590 | public function getSpamCheckChallenge(): string |
||
| 1594 | } |
||
| 1595 |