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 | * @var bool |
||
| 32 | */ |
||
| 33 | protected $hidden = false; |
||
| 34 | |||
| 35 | /** |
||
| 36 | * @var \DateTime |
||
| 37 | */ |
||
| 38 | protected $starttime; |
||
| 39 | |||
| 40 | /** |
||
| 41 | * @var \DateTime |
||
| 42 | */ |
||
| 43 | protected $endtime; |
||
| 44 | |||
| 45 | /** |
||
| 46 | * Title |
||
| 47 | * |
||
| 48 | * @var string |
||
| 49 | * @validate NotEmpty |
||
| 50 | */ |
||
| 51 | protected $title = ''; |
||
| 52 | |||
| 53 | /** |
||
| 54 | * Teaser |
||
| 55 | * |
||
| 56 | * @var string |
||
| 57 | */ |
||
| 58 | protected $teaser = ''; |
||
| 59 | |||
| 60 | /** |
||
| 61 | * Description |
||
| 62 | * |
||
| 63 | * @var string |
||
| 64 | */ |
||
| 65 | protected $description = ''; |
||
| 66 | |||
| 67 | /** |
||
| 68 | * Program/Schedule |
||
| 69 | * |
||
| 70 | * @var string |
||
| 71 | */ |
||
| 72 | protected $program = ''; |
||
| 73 | |||
| 74 | /** |
||
| 75 | * Startdate and time |
||
| 76 | * |
||
| 77 | * @var \DateTime |
||
| 78 | */ |
||
| 79 | protected $startdate = null; |
||
| 80 | |||
| 81 | /** |
||
| 82 | * Enddate and time |
||
| 83 | * |
||
| 84 | * @var \DateTime |
||
| 85 | */ |
||
| 86 | protected $enddate = null; |
||
| 87 | |||
| 88 | /** |
||
| 89 | * Max participants |
||
| 90 | * |
||
| 91 | * @var int |
||
| 92 | */ |
||
| 93 | protected $maxParticipants = 0; |
||
| 94 | |||
| 95 | /** |
||
| 96 | * Max registrations per user |
||
| 97 | * |
||
| 98 | * @var int |
||
| 99 | */ |
||
| 100 | protected $maxRegistrationsPerUser = 1; |
||
| 101 | |||
| 102 | /** |
||
| 103 | * Price |
||
| 104 | * |
||
| 105 | * @var float |
||
| 106 | */ |
||
| 107 | protected $price = 0.0; |
||
| 108 | |||
| 109 | /** |
||
| 110 | * Currency |
||
| 111 | * |
||
| 112 | * @var string |
||
| 113 | */ |
||
| 114 | protected $currency = ''; |
||
| 115 | |||
| 116 | /** |
||
| 117 | * Enable payment |
||
| 118 | * |
||
| 119 | * @var bool |
||
| 120 | */ |
||
| 121 | protected $enablePayment = false; |
||
| 122 | |||
| 123 | /** |
||
| 124 | * Restrict payment methods |
||
| 125 | * |
||
| 126 | * @var bool |
||
| 127 | */ |
||
| 128 | protected $restrictPaymentMethods = false; |
||
| 129 | |||
| 130 | /** |
||
| 131 | * Selected payment methods |
||
| 132 | * |
||
| 133 | * @var string |
||
| 134 | */ |
||
| 135 | protected $selectedPaymentMethods = ''; |
||
| 136 | |||
| 137 | /** |
||
| 138 | * Category |
||
| 139 | * |
||
| 140 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DERHANSEN\SfEventMgt\Domain\Model\Category> |
||
| 141 | * @lazy |
||
| 142 | */ |
||
| 143 | protected $category = null; |
||
| 144 | |||
| 145 | /** |
||
| 146 | * Related |
||
| 147 | * |
||
| 148 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DERHANSEN\SfEventMgt\Domain\Model\Event> |
||
| 149 | * @lazy |
||
| 150 | */ |
||
| 151 | protected $related; |
||
| 152 | |||
| 153 | /** |
||
| 154 | * Registration |
||
| 155 | * |
||
| 156 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DERHANSEN\SfEventMgt\Domain\Model\Registration> |
||
| 157 | * @cascade remove |
||
| 158 | * @lazy |
||
| 159 | */ |
||
| 160 | protected $registration = null; |
||
| 161 | |||
| 162 | /** |
||
| 163 | * Registration waitlist |
||
| 164 | * |
||
| 165 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DERHANSEN\SfEventMgt\Domain\Model\Registration> |
||
| 166 | * @lazy |
||
| 167 | */ |
||
| 168 | protected $registrationWaitlist; |
||
| 169 | |||
| 170 | /** |
||
| 171 | * Registration fields |
||
| 172 | * |
||
| 173 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DERHANSEN\SfEventMgt\Domain\Model\Registration\Field> |
||
| 174 | * @lazy |
||
| 175 | */ |
||
| 176 | protected $registrationFields; |
||
| 177 | |||
| 178 | /** |
||
| 179 | * Registration start date |
||
| 180 | * |
||
| 181 | * @var \DateTime |
||
| 182 | */ |
||
| 183 | protected $registrationStartdate = null; |
||
| 184 | |||
| 185 | /** |
||
| 186 | * Registration deadline date |
||
| 187 | * |
||
| 188 | * @var \DateTime |
||
| 189 | */ |
||
| 190 | protected $registrationDeadline = null; |
||
| 191 | |||
| 192 | /** |
||
| 193 | * The image |
||
| 194 | * |
||
| 195 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference> |
||
| 196 | * @lazy |
||
| 197 | */ |
||
| 198 | protected $image = null; |
||
| 199 | |||
| 200 | /** |
||
| 201 | * Additional files |
||
| 202 | * |
||
| 203 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference> |
||
| 204 | * @lazy |
||
| 205 | */ |
||
| 206 | protected $files = null; |
||
| 207 | |||
| 208 | /** |
||
| 209 | * The Location |
||
| 210 | * |
||
| 211 | * @var \DERHANSEN\SfEventMgt\Domain\Model\Location |
||
| 212 | */ |
||
| 213 | protected $location = null; |
||
| 214 | |||
| 215 | /** |
||
| 216 | * Room |
||
| 217 | * |
||
| 218 | * @var string |
||
| 219 | */ |
||
| 220 | protected $room; |
||
| 221 | |||
| 222 | /** |
||
| 223 | * Enable registration |
||
| 224 | * |
||
| 225 | * @var bool |
||
| 226 | */ |
||
| 227 | protected $enableRegistration = false; |
||
| 228 | |||
| 229 | /** |
||
| 230 | * Enable waitlist |
||
| 231 | * |
||
| 232 | * @var bool |
||
| 233 | */ |
||
| 234 | protected $enableWaitlist = false; |
||
| 235 | |||
| 236 | /** |
||
| 237 | * Link |
||
| 238 | * |
||
| 239 | * @var string |
||
| 240 | */ |
||
| 241 | protected $link; |
||
| 242 | |||
| 243 | /** |
||
| 244 | * Top event |
||
| 245 | * |
||
| 246 | * @var bool |
||
| 247 | */ |
||
| 248 | protected $topEvent = false; |
||
| 249 | |||
| 250 | /** |
||
| 251 | * The additionalImage |
||
| 252 | * |
||
| 253 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference> |
||
| 254 | * @lazy |
||
| 255 | */ |
||
| 256 | protected $additionalImage = null; |
||
| 257 | |||
| 258 | /** |
||
| 259 | * The organisator |
||
| 260 | * |
||
| 261 | * @var \DERHANSEN\SfEventMgt\Domain\Model\Organisator |
||
| 262 | */ |
||
| 263 | protected $organisator = null; |
||
| 264 | |||
| 265 | /** |
||
| 266 | * Notify admin |
||
| 267 | * |
||
| 268 | * @var bool |
||
| 269 | */ |
||
| 270 | protected $notifyAdmin = true; |
||
| 271 | |||
| 272 | /** |
||
| 273 | * Notify organisator |
||
| 274 | * |
||
| 275 | * @var bool |
||
| 276 | */ |
||
| 277 | protected $notifyOrganisator = false; |
||
| 278 | |||
| 279 | /** |
||
| 280 | * Enable cancel of registration |
||
| 281 | * |
||
| 282 | * @var bool |
||
| 283 | */ |
||
| 284 | protected $enableCancel = false; |
||
| 285 | |||
| 286 | /** |
||
| 287 | * Deadline for cancel |
||
| 288 | * |
||
| 289 | * @var \DateTime |
||
| 290 | */ |
||
| 291 | protected $cancelDeadline = null; |
||
| 292 | |||
| 293 | /** |
||
| 294 | * Enable auto confirmation |
||
| 295 | * |
||
| 296 | * @var bool |
||
| 297 | */ |
||
| 298 | protected $enableAutoconfirm = false; |
||
| 299 | |||
| 300 | /** |
||
| 301 | * Unique e-mail check |
||
| 302 | * |
||
| 303 | * @var bool |
||
| 304 | */ |
||
| 305 | protected $uniqueEmailCheck = false; |
||
| 306 | |||
| 307 | /** |
||
| 308 | * Price options |
||
| 309 | * |
||
| 310 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DERHANSEN\SfEventMgt\Domain\Model\PriceOption> |
||
| 311 | * @cascade remove |
||
| 312 | * @lazy |
||
| 313 | */ |
||
| 314 | protected $priceOptions = null; |
||
| 315 | |||
| 316 | /** |
||
| 317 | * Speaker |
||
| 318 | * |
||
| 319 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DERHANSEN\SfEventMgt\Domain\Model\Speaker> |
||
| 320 | * @lazy |
||
| 321 | */ |
||
| 322 | protected $speaker = null; |
||
| 323 | |||
| 324 | /** |
||
| 325 | * Constructor |
||
| 326 | */ |
||
| 327 | public function __construct() |
||
| 340 | |||
| 341 | /** |
||
| 342 | * Get timestamp |
||
| 343 | * |
||
| 344 | * @return \DateTime |
||
| 345 | */ |
||
| 346 | public function getTstamp() |
||
| 350 | |||
| 351 | /** |
||
| 352 | * Set time stamp |
||
| 353 | * |
||
| 354 | * @param \DateTime $tstamp time stamp |
||
| 355 | */ |
||
| 356 | public function setTstamp($tstamp) |
||
| 360 | |||
| 361 | /** |
||
| 362 | * Get hidden flag |
||
| 363 | * |
||
| 364 | * @return bool |
||
| 365 | */ |
||
| 366 | public function getHidden() |
||
| 370 | |||
| 371 | /** |
||
| 372 | * Set hidden flag |
||
| 373 | * |
||
| 374 | * @param bool $hidden hidden flag |
||
| 375 | */ |
||
| 376 | public function setHidden($hidden) |
||
| 380 | |||
| 381 | /** |
||
| 382 | * Get start time |
||
| 383 | * |
||
| 384 | * @return \DateTime |
||
| 385 | */ |
||
| 386 | public function getStarttime() |
||
| 390 | |||
| 391 | /** |
||
| 392 | * Set start time |
||
| 393 | * |
||
| 394 | * @param \DateTime $starttime start time |
||
| 395 | */ |
||
| 396 | public function setStarttime($starttime) |
||
| 400 | |||
| 401 | /** |
||
| 402 | * Get endtime |
||
| 403 | * |
||
| 404 | * @return \DateTime |
||
| 405 | */ |
||
| 406 | public function getEndtime() |
||
| 410 | |||
| 411 | /** |
||
| 412 | * Set end time |
||
| 413 | * |
||
| 414 | * @param \DateTime $endtime end time |
||
| 415 | */ |
||
| 416 | public function setEndtime($endtime) |
||
| 420 | |||
| 421 | /** |
||
| 422 | * Returns the title |
||
| 423 | * |
||
| 424 | * @return string $title |
||
| 425 | */ |
||
| 426 | public function getTitle() |
||
| 430 | |||
| 431 | /** |
||
| 432 | * Sets the title |
||
| 433 | * |
||
| 434 | * @param string $title Title |
||
| 435 | * |
||
| 436 | * @return void |
||
| 437 | */ |
||
| 438 | public function setTitle($title) |
||
| 442 | |||
| 443 | /** |
||
| 444 | * Returns the teaser |
||
| 445 | * |
||
| 446 | * @return string |
||
| 447 | */ |
||
| 448 | public function getTeaser() |
||
| 452 | |||
| 453 | /** |
||
| 454 | * Sets the teaser |
||
| 455 | * |
||
| 456 | * @param string $teaser Teaser |
||
| 457 | * |
||
| 458 | * @return void |
||
| 459 | */ |
||
| 460 | public function setTeaser($teaser) |
||
| 464 | |||
| 465 | /** |
||
| 466 | * Returns the description |
||
| 467 | * |
||
| 468 | * @return string $description |
||
| 469 | */ |
||
| 470 | public function getDescription() |
||
| 474 | |||
| 475 | /** |
||
| 476 | * Sets the description |
||
| 477 | * |
||
| 478 | * @param string $description Description |
||
| 479 | * |
||
| 480 | * @return void |
||
| 481 | */ |
||
| 482 | public function setDescription($description) |
||
| 486 | |||
| 487 | /** |
||
| 488 | * Returns the program |
||
| 489 | * |
||
| 490 | * @return string $program |
||
| 491 | */ |
||
| 492 | public function getProgram() |
||
| 496 | |||
| 497 | /** |
||
| 498 | * Sets the program |
||
| 499 | * |
||
| 500 | * @param string $program The program |
||
| 501 | * |
||
| 502 | * @return void |
||
| 503 | */ |
||
| 504 | public function setProgram($program) |
||
| 508 | |||
| 509 | /** |
||
| 510 | * Returns the startdate |
||
| 511 | * |
||
| 512 | * @return \DateTime $startdate |
||
| 513 | */ |
||
| 514 | public function getStartdate() |
||
| 518 | |||
| 519 | /** |
||
| 520 | * Sets the startdate |
||
| 521 | * |
||
| 522 | * @param \DateTime $startdate Startdate |
||
| 523 | * |
||
| 524 | * @return void |
||
| 525 | */ |
||
| 526 | public function setStartdate(\DateTime $startdate) |
||
| 530 | |||
| 531 | /** |
||
| 532 | * Returns the enddate |
||
| 533 | * |
||
| 534 | * @return \DateTime $enddate |
||
| 535 | */ |
||
| 536 | public function getEnddate() |
||
| 540 | |||
| 541 | /** |
||
| 542 | * Sets the enddate |
||
| 543 | * |
||
| 544 | * @param \DateTime $enddate Enddate |
||
| 545 | * |
||
| 546 | * @return void |
||
| 547 | */ |
||
| 548 | public function setEnddate(\DateTime $enddate) |
||
| 552 | |||
| 553 | /** |
||
| 554 | * Returns the participants |
||
| 555 | * |
||
| 556 | * @return int $participants |
||
| 557 | */ |
||
| 558 | public function getMaxParticipants() |
||
| 562 | |||
| 563 | /** |
||
| 564 | * Sets the participants |
||
| 565 | * |
||
| 566 | * @param int $participants Participants |
||
| 567 | * |
||
| 568 | * @return void |
||
| 569 | */ |
||
| 570 | public function setMaxParticipants($participants) |
||
| 574 | |||
| 575 | /** |
||
| 576 | * Returns the price |
||
| 577 | * |
||
| 578 | * @return float $price |
||
| 579 | */ |
||
| 580 | public function getPrice() |
||
| 584 | |||
| 585 | /** |
||
| 586 | * Sets the price |
||
| 587 | * |
||
| 588 | * @param float $price Price |
||
| 589 | * |
||
| 590 | * @return void |
||
| 591 | */ |
||
| 592 | public function setPrice($price) |
||
| 596 | |||
| 597 | /** |
||
| 598 | * Returns the currency |
||
| 599 | * |
||
| 600 | * @return string $currency |
||
| 601 | */ |
||
| 602 | public function getCurrency() |
||
| 606 | |||
| 607 | /** |
||
| 608 | * Sets the currency |
||
| 609 | * |
||
| 610 | * @param string $currency Currency |
||
| 611 | * |
||
| 612 | * @return void |
||
| 613 | */ |
||
| 614 | public function setCurrency($currency) |
||
| 618 | |||
| 619 | /** |
||
| 620 | * Returns if payment is enabled |
||
| 621 | * |
||
| 622 | * @return bool |
||
| 623 | */ |
||
| 624 | public function getEnablePayment() |
||
| 628 | |||
| 629 | /** |
||
| 630 | * Sets enablePayment |
||
| 631 | * |
||
| 632 | * @param bool $enablePayment |
||
| 633 | * @return void |
||
| 634 | */ |
||
| 635 | public function setEnablePayment($enablePayment) |
||
| 639 | |||
| 640 | /** |
||
| 641 | * Returns if payment methods should be restricted |
||
| 642 | * |
||
| 643 | * @return bool |
||
| 644 | */ |
||
| 645 | public function getRestrictPaymentMethods() |
||
| 649 | |||
| 650 | /** |
||
| 651 | * Sets if payment methods should be restricted |
||
| 652 | * |
||
| 653 | * @param bool $restrictPaymentMethods |
||
| 654 | * @return void |
||
| 655 | */ |
||
| 656 | public function setRestrictPaymentMethods($restrictPaymentMethods) |
||
| 660 | |||
| 661 | /** |
||
| 662 | * Returns selected payment methods |
||
| 663 | * |
||
| 664 | * @return string |
||
| 665 | */ |
||
| 666 | public function getSelectedPaymentMethods() |
||
| 670 | |||
| 671 | /** |
||
| 672 | * Sets selected payment methods |
||
| 673 | * |
||
| 674 | * @param string $selectedPaymentMethods |
||
| 675 | * @return void |
||
| 676 | */ |
||
| 677 | public function setSelectedPaymentMethods($selectedPaymentMethods) |
||
| 681 | |||
| 682 | /** |
||
| 683 | * Adds a Category |
||
| 684 | * |
||
| 685 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Category $category Category |
||
| 686 | * |
||
| 687 | * @return void |
||
| 688 | */ |
||
| 689 | public function addCategory(\DERHANSEN\SfEventMgt\Domain\Model\Category $category) |
||
| 693 | |||
| 694 | /** |
||
| 695 | * Removes a Category |
||
| 696 | * |
||
| 697 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Category $categoryToRemove The Category to be removed |
||
| 698 | * |
||
| 699 | * @return void |
||
| 700 | */ |
||
| 701 | public function removeCategory(\DERHANSEN\SfEventMgt\Domain\Model\Category $categoryToRemove) |
||
| 705 | |||
| 706 | /** |
||
| 707 | * Returns the category |
||
| 708 | * |
||
| 709 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
||
| 710 | */ |
||
| 711 | public function getCategory() |
||
| 715 | |||
| 716 | /** |
||
| 717 | * Sets the category |
||
| 718 | * |
||
| 719 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $category Category |
||
| 720 | * |
||
| 721 | * @return void |
||
| 722 | */ |
||
| 723 | public function setCategory(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $category) |
||
| 727 | |||
| 728 | /** |
||
| 729 | * Returns related events |
||
| 730 | * |
||
| 731 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
||
| 732 | */ |
||
| 733 | public function getRelated() |
||
| 737 | |||
| 738 | /** |
||
| 739 | * Sets related events |
||
| 740 | * |
||
| 741 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $related |
||
| 742 | * @return void |
||
| 743 | */ |
||
| 744 | public function setRelated($related) |
||
| 748 | |||
| 749 | /** |
||
| 750 | * Adds a related event |
||
| 751 | * |
||
| 752 | * @param Event $event |
||
| 753 | * @return void |
||
| 754 | */ |
||
| 755 | public function addRelated(\DERHANSEN\SfEventMgt\Domain\Model\Event $event) |
||
| 759 | |||
| 760 | /** |
||
| 761 | * Removes a related event |
||
| 762 | * |
||
| 763 | * @param Event $event |
||
| 764 | * @return void |
||
| 765 | */ |
||
| 766 | public function removeRelated(\DERHANSEN\SfEventMgt\Domain\Model\Event $event) |
||
| 770 | |||
| 771 | /** |
||
| 772 | * Adds a Registration |
||
| 773 | * |
||
| 774 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Registration $registration Registration |
||
| 775 | * |
||
| 776 | * @return void |
||
| 777 | */ |
||
| 778 | public function addRegistration(\DERHANSEN\SfEventMgt\Domain\Model\Registration $registration) |
||
| 782 | |||
| 783 | /** |
||
| 784 | * Removes a Registration |
||
| 785 | * |
||
| 786 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Registration $registrationToRemove Registration |
||
| 787 | * |
||
| 788 | * @return void |
||
| 789 | */ |
||
| 790 | public function removeRegistration(\DERHANSEN\SfEventMgt\Domain\Model\Registration $registrationToRemove) |
||
| 794 | |||
| 795 | /** |
||
| 796 | * Returns the Registration |
||
| 797 | * |
||
| 798 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage $registration |
||
| 799 | */ |
||
| 800 | public function getRegistration() |
||
| 804 | |||
| 805 | /** |
||
| 806 | * Sets the Registration |
||
| 807 | * |
||
| 808 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $registration Registration |
||
| 809 | * |
||
| 810 | * @return void |
||
| 811 | */ |
||
| 812 | public function setRegistration(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $registration) |
||
| 816 | |||
| 817 | /** |
||
| 818 | * Adds an image |
||
| 819 | * |
||
| 820 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $image Image |
||
| 821 | * |
||
| 822 | * @return void |
||
| 823 | */ |
||
| 824 | public function addImage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $image) |
||
| 828 | |||
| 829 | /** |
||
| 830 | * Removes an image |
||
| 831 | * |
||
| 832 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $imageToRemove Image |
||
| 833 | * |
||
| 834 | * @return void |
||
| 835 | */ |
||
| 836 | public function removeImage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $imageToRemove) |
||
| 840 | |||
| 841 | /** |
||
| 842 | * Returns the image |
||
| 843 | * |
||
| 844 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage $image |
||
| 845 | */ |
||
| 846 | public function getImage() |
||
| 850 | |||
| 851 | /** |
||
| 852 | * Sets the image |
||
| 853 | * |
||
| 854 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $image Image |
||
| 855 | * |
||
| 856 | * @return void |
||
| 857 | */ |
||
| 858 | public function setImage(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $image) |
||
| 862 | |||
| 863 | /** |
||
| 864 | * Adds a file |
||
| 865 | * |
||
| 866 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $file File |
||
| 867 | * |
||
| 868 | * @return void |
||
| 869 | */ |
||
| 870 | public function addFiles(\TYPO3\CMS\Extbase\Domain\Model\FileReference $file) |
||
| 874 | |||
| 875 | /** |
||
| 876 | * Removes a file |
||
| 877 | * |
||
| 878 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $fileToRemove File |
||
| 879 | * |
||
| 880 | * @return void |
||
| 881 | */ |
||
| 882 | public function removeFiles(\TYPO3\CMS\Extbase\Domain\Model\FileReference $fileToRemove) |
||
| 886 | |||
| 887 | /** |
||
| 888 | * Returns the files |
||
| 889 | * |
||
| 890 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage $files |
||
| 891 | */ |
||
| 892 | public function getFiles() |
||
| 896 | |||
| 897 | /** |
||
| 898 | * Sets the files |
||
| 899 | * |
||
| 900 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $files Files |
||
| 901 | * |
||
| 902 | * @return void |
||
| 903 | */ |
||
| 904 | public function setFiles(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $files) |
||
| 908 | |||
| 909 | /** |
||
| 910 | * Returns if the registration for this event is logically possible |
||
| 911 | * |
||
| 912 | * @return bool |
||
| 913 | */ |
||
| 914 | public function getRegistrationPossible() |
||
| 933 | |||
| 934 | /** |
||
| 935 | * Returns the amount of free places |
||
| 936 | * |
||
| 937 | * @return int |
||
| 938 | */ |
||
| 939 | public function getFreePlaces() |
||
| 943 | |||
| 944 | /** |
||
| 945 | * Sets the location |
||
| 946 | * |
||
| 947 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Location $location Location |
||
| 948 | * |
||
| 949 | * @return void |
||
| 950 | */ |
||
| 951 | public function setLocation($location) |
||
| 955 | |||
| 956 | /** |
||
| 957 | * Returns the location |
||
| 958 | * |
||
| 959 | * @return \DERHANSEN\SfEventMgt\Domain\Model\Location |
||
| 960 | */ |
||
| 961 | public function getLocation() |
||
| 965 | |||
| 966 | /** |
||
| 967 | * Returns the room |
||
| 968 | * |
||
| 969 | * @return string |
||
| 970 | */ |
||
| 971 | public function getRoom() |
||
| 975 | |||
| 976 | /** |
||
| 977 | * Sets the room |
||
| 978 | * |
||
| 979 | * @param string $room |
||
| 980 | */ |
||
| 981 | public function setRoom($room) |
||
| 985 | |||
| 986 | /** |
||
| 987 | * Sets enableRegistration |
||
| 988 | * |
||
| 989 | * @param bool $enableRegistration EnableRegistration |
||
| 990 | * |
||
| 991 | * @return void |
||
| 992 | */ |
||
| 993 | public function setEnableRegistration($enableRegistration) |
||
| 997 | |||
| 998 | /** |
||
| 999 | * Returns if registration is enabled |
||
| 1000 | * |
||
| 1001 | * @return bool |
||
| 1002 | */ |
||
| 1003 | public function getEnableRegistration() |
||
| 1007 | |||
| 1008 | /** |
||
| 1009 | * Returns enableWaitlist |
||
| 1010 | * |
||
| 1011 | * @return bool |
||
| 1012 | */ |
||
| 1013 | public function getEnableWaitlist() |
||
| 1017 | |||
| 1018 | /** |
||
| 1019 | * Sets enableWaitlist |
||
| 1020 | * |
||
| 1021 | * @param bool $enableWaitlist |
||
| 1022 | * @return void |
||
| 1023 | */ |
||
| 1024 | public function setEnableWaitlist($enableWaitlist) |
||
| 1028 | |||
| 1029 | /** |
||
| 1030 | * Sets the registration startdate |
||
| 1031 | * |
||
| 1032 | * @param \DateTime $registrationStartdate RegistrationStartdate |
||
| 1033 | * |
||
| 1034 | * @return void |
||
| 1035 | */ |
||
| 1036 | public function setRegistrationStartdate(\DateTime $registrationStartdate) |
||
| 1040 | |||
| 1041 | /** |
||
| 1042 | * Returns the registration startdate |
||
| 1043 | * |
||
| 1044 | * @return \DateTime |
||
| 1045 | */ |
||
| 1046 | public function getRegistrationStartdate() |
||
| 1050 | |||
| 1051 | /** |
||
| 1052 | * Sets the registration deadline |
||
| 1053 | * |
||
| 1054 | * @param \DateTime $registrationDeadline RegistrationDeadline |
||
| 1055 | * |
||
| 1056 | * @return void |
||
| 1057 | */ |
||
| 1058 | public function setRegistrationDeadline(\DateTime $registrationDeadline) |
||
| 1062 | |||
| 1063 | /** |
||
| 1064 | * Returns the registration deadline |
||
| 1065 | * |
||
| 1066 | * @return \DateTime |
||
| 1067 | */ |
||
| 1068 | public function getRegistrationDeadline() |
||
| 1072 | |||
| 1073 | /** |
||
| 1074 | * Sets the link |
||
| 1075 | * |
||
| 1076 | * @param string $link Link |
||
| 1077 | * |
||
| 1078 | * @return void |
||
| 1079 | */ |
||
| 1080 | public function setLink($link) |
||
| 1084 | |||
| 1085 | /** |
||
| 1086 | * Returns the link |
||
| 1087 | * |
||
| 1088 | * @return string |
||
| 1089 | */ |
||
| 1090 | public function getLink() |
||
| 1094 | |||
| 1095 | /** |
||
| 1096 | * Sets topEvent |
||
| 1097 | * |
||
| 1098 | * @param bool $topEvent TopEvent |
||
| 1099 | * |
||
| 1100 | * @return void |
||
| 1101 | */ |
||
| 1102 | public function setTopEvent($topEvent) |
||
| 1106 | |||
| 1107 | /** |
||
| 1108 | * Returns if topEvent is checked |
||
| 1109 | * |
||
| 1110 | * @return bool |
||
| 1111 | */ |
||
| 1112 | public function getTopEvent() |
||
| 1116 | |||
| 1117 | /** |
||
| 1118 | * Returns max regisrations per user |
||
| 1119 | * |
||
| 1120 | * @return int |
||
| 1121 | */ |
||
| 1122 | public function getMaxRegistrationsPerUser() |
||
| 1126 | |||
| 1127 | /** |
||
| 1128 | * Sets max registrations per user |
||
| 1129 | * |
||
| 1130 | * @param int $maxRegistrationsPerUser MaxRegistrationsPerUser |
||
| 1131 | * |
||
| 1132 | * @return void |
||
| 1133 | */ |
||
| 1134 | public function setMaxRegistrationsPerUser($maxRegistrationsPerUser) |
||
| 1138 | |||
| 1139 | /** |
||
| 1140 | * Adds an additionalImage |
||
| 1141 | * |
||
| 1142 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $additionalImage The Image |
||
| 1143 | * |
||
| 1144 | * @return void |
||
| 1145 | */ |
||
| 1146 | public function addAdditionalImage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $additionalImage) |
||
| 1150 | |||
| 1151 | /** |
||
| 1152 | * Removes an additionalImage |
||
| 1153 | * |
||
| 1154 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $additionalImageToRemove The Image |
||
| 1155 | * |
||
| 1156 | * @return void |
||
| 1157 | */ |
||
| 1158 | public function removeAdditionalImage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $additionalImageToRemove) |
||
| 1162 | |||
| 1163 | /** |
||
| 1164 | * Returns the additionalImage |
||
| 1165 | * |
||
| 1166 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage $additionalImage |
||
| 1167 | */ |
||
| 1168 | public function getAdditionalImage() |
||
| 1172 | |||
| 1173 | /** |
||
| 1174 | * Sets the additionalImage |
||
| 1175 | * |
||
| 1176 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $additionalImage The Image |
||
| 1177 | * |
||
| 1178 | * @return void |
||
| 1179 | */ |
||
| 1180 | public function setAdditionalImage(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $additionalImage) |
||
| 1184 | |||
| 1185 | /** |
||
| 1186 | * Returns the organisator |
||
| 1187 | * |
||
| 1188 | * @return Organisator |
||
| 1189 | */ |
||
| 1190 | public function getOrganisator() |
||
| 1194 | |||
| 1195 | /** |
||
| 1196 | * Sets the organisator |
||
| 1197 | * |
||
| 1198 | * @param Organisator $organisator The organisator |
||
| 1199 | * |
||
| 1200 | * @return void |
||
| 1201 | */ |
||
| 1202 | public function setOrganisator($organisator) |
||
| 1206 | |||
| 1207 | /** |
||
| 1208 | * Returns notifyAdmin |
||
| 1209 | * |
||
| 1210 | * @return bool |
||
| 1211 | */ |
||
| 1212 | public function getNotifyAdmin() |
||
| 1216 | |||
| 1217 | /** |
||
| 1218 | * Sets notifyAdmin |
||
| 1219 | * |
||
| 1220 | * @param bool $notifyAdmin NotifyAdmin |
||
| 1221 | * |
||
| 1222 | * @return void |
||
| 1223 | */ |
||
| 1224 | public function setNotifyAdmin($notifyAdmin) |
||
| 1228 | |||
| 1229 | /** |
||
| 1230 | * Returns if notifyAdmin is set |
||
| 1231 | * |
||
| 1232 | * @return bool |
||
| 1233 | */ |
||
| 1234 | public function getNotifyOrganisator() |
||
| 1238 | |||
| 1239 | /** |
||
| 1240 | * Sets notifyOrganisator |
||
| 1241 | * |
||
| 1242 | * @param bool $notifyOrganisator NotifyOrganisator |
||
| 1243 | * |
||
| 1244 | * @return void |
||
| 1245 | */ |
||
| 1246 | public function setNotifyOrganisator($notifyOrganisator) |
||
| 1250 | |||
| 1251 | /** |
||
| 1252 | * Sets enableCancel |
||
| 1253 | * |
||
| 1254 | * @param bool $enableCancel EnableCancel |
||
| 1255 | * |
||
| 1256 | * @return void |
||
| 1257 | */ |
||
| 1258 | public function setEnableCancel($enableCancel) |
||
| 1262 | |||
| 1263 | /** |
||
| 1264 | * Returns if registration can be canceled |
||
| 1265 | * |
||
| 1266 | * @return bool |
||
| 1267 | */ |
||
| 1268 | public function getEnableCancel() |
||
| 1272 | |||
| 1273 | /** |
||
| 1274 | * Sets the cancel deadline |
||
| 1275 | * |
||
| 1276 | * @param \DateTime $cancelDeadline CancelDeadline |
||
| 1277 | * |
||
| 1278 | * @return void |
||
| 1279 | */ |
||
| 1280 | public function setCancelDeadline(\DateTime $cancelDeadline) |
||
| 1284 | |||
| 1285 | /** |
||
| 1286 | * Returns the cancel deadline |
||
| 1287 | * |
||
| 1288 | * @return \DateTime |
||
| 1289 | */ |
||
| 1290 | public function getCancelDeadline() |
||
| 1294 | |||
| 1295 | /** |
||
| 1296 | * Returns if autoconfirmation is enabled |
||
| 1297 | * |
||
| 1298 | * @return bool |
||
| 1299 | */ |
||
| 1300 | public function getEnableAutoconfirm() |
||
| 1304 | |||
| 1305 | /** |
||
| 1306 | * Sets enable autoconfirm |
||
| 1307 | * |
||
| 1308 | * @param bool $enableAutoconfirm |
||
| 1309 | * @return void |
||
| 1310 | */ |
||
| 1311 | public function setEnableAutoconfirm($enableAutoconfirm) |
||
| 1315 | |||
| 1316 | /** |
||
| 1317 | * Returns uniqueEmailCheck |
||
| 1318 | * |
||
| 1319 | * @return bool |
||
| 1320 | */ |
||
| 1321 | public function getUniqueEmailCheck() |
||
| 1325 | |||
| 1326 | /** |
||
| 1327 | * Sets UniqueEmailCheck |
||
| 1328 | * |
||
| 1329 | * @param bool $uniqueEmailCheck |
||
| 1330 | * @return void |
||
| 1331 | */ |
||
| 1332 | public function setUniqueEmailCheck($uniqueEmailCheck) |
||
| 1336 | |||
| 1337 | /** |
||
| 1338 | * Returns price options |
||
| 1339 | * |
||
| 1340 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
||
| 1341 | */ |
||
| 1342 | public function getPriceOptions() |
||
| 1346 | |||
| 1347 | /** |
||
| 1348 | * Sets price options |
||
| 1349 | * |
||
| 1350 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $priceOptions |
||
| 1351 | * @return void |
||
| 1352 | */ |
||
| 1353 | public function setPriceOptions($priceOptions) |
||
| 1357 | |||
| 1358 | /** |
||
| 1359 | * Adds a price option |
||
| 1360 | * |
||
| 1361 | * @param \DERHANSEN\SfEventMgt\Domain\Model\PriceOption $priceOption Price option |
||
| 1362 | * |
||
| 1363 | * @return void |
||
| 1364 | */ |
||
| 1365 | public function addPriceOptions(\DERHANSEN\SfEventMgt\Domain\Model\PriceOption $priceOption) |
||
| 1369 | |||
| 1370 | /** |
||
| 1371 | * Removes a Registration |
||
| 1372 | * |
||
| 1373 | * @param \DERHANSEN\SfEventMgt\Domain\Model\PriceOption $priceOption Price option |
||
| 1374 | * |
||
| 1375 | * @return void |
||
| 1376 | */ |
||
| 1377 | public function removePriceOptions(\DERHANSEN\SfEventMgt\Domain\Model\PriceOption $priceOption) |
||
| 1381 | |||
| 1382 | /** |
||
| 1383 | * Returns all active price options sorted by date ASC |
||
| 1384 | * |
||
| 1385 | * @return array |
||
| 1386 | */ |
||
| 1387 | public function getActivePriceOptions() |
||
| 1402 | |||
| 1403 | /** |
||
| 1404 | * Returns the current price of the event respecting possible price options |
||
| 1405 | * |
||
| 1406 | * @return float |
||
| 1407 | */ |
||
| 1408 | public function getCurrentPrice() |
||
| 1418 | |||
| 1419 | /** |
||
| 1420 | * Returns registrationWaitlist |
||
| 1421 | * |
||
| 1422 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
||
| 1423 | */ |
||
| 1424 | public function getRegistrationWaitlist() |
||
| 1428 | |||
| 1429 | /** |
||
| 1430 | * Sets registrationWaitlist |
||
| 1431 | * |
||
| 1432 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $registration Registration |
||
| 1433 | * |
||
| 1434 | * @return void |
||
| 1435 | */ |
||
| 1436 | public function setRegistrationWaitlist(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $registration) |
||
| 1440 | |||
| 1441 | /** |
||
| 1442 | * Adds a Registration to the waitlist |
||
| 1443 | * |
||
| 1444 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Registration $registration Registration |
||
| 1445 | * |
||
| 1446 | * @return void |
||
| 1447 | */ |
||
| 1448 | public function addRegistrationWaitlist(\DERHANSEN\SfEventMgt\Domain\Model\Registration $registration) |
||
| 1452 | |||
| 1453 | /** |
||
| 1454 | * Removes a Registration from the waitlist |
||
| 1455 | * |
||
| 1456 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Registration $registrationToRemove Registration |
||
| 1457 | * |
||
| 1458 | * @return void |
||
| 1459 | */ |
||
| 1460 | public function removeRegistrationWaitlist(\DERHANSEN\SfEventMgt\Domain\Model\Registration $registrationToRemove) |
||
| 1464 | |||
| 1465 | /** |
||
| 1466 | * Returns, if cancellation for registrations of the event is possible |
||
| 1467 | * |
||
| 1468 | * @return bool |
||
| 1469 | */ |
||
| 1470 | public function getCancellationPossible() |
||
| 1476 | |||
| 1477 | /** |
||
| 1478 | * Returns speaker |
||
| 1479 | * |
||
| 1480 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
||
| 1481 | */ |
||
| 1482 | public function getSpeaker() |
||
| 1486 | |||
| 1487 | /** |
||
| 1488 | * Sets speaker |
||
| 1489 | * |
||
| 1490 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $speaker |
||
| 1491 | * @return void |
||
| 1492 | */ |
||
| 1493 | public function setSpeaker($speaker) |
||
| 1497 | |||
| 1498 | /** |
||
| 1499 | * Adds a speaker |
||
| 1500 | * |
||
| 1501 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Speaker $speaker |
||
| 1502 | * |
||
| 1503 | * @return void |
||
| 1504 | */ |
||
| 1505 | public function addSpeaker(\DERHANSEN\SfEventMgt\Domain\Model\Speaker $speaker) |
||
| 1509 | |||
| 1510 | /** |
||
| 1511 | * Removes a speaker |
||
| 1512 | * |
||
| 1513 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Speaker $speaker |
||
| 1514 | * |
||
| 1515 | * @return void |
||
| 1516 | */ |
||
| 1517 | public function removeSpeaker(\DERHANSEN\SfEventMgt\Domain\Model\Speaker $speaker) |
||
| 1521 | |||
| 1522 | /** |
||
| 1523 | * Returns registrationFields |
||
| 1524 | * |
||
| 1525 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
||
| 1526 | */ |
||
| 1527 | public function getRegistrationFields() |
||
| 1531 | |||
| 1532 | /** |
||
| 1533 | * Sets registrationWaitlist |
||
| 1534 | * |
||
| 1535 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $registrationFields |
||
| 1536 | * |
||
| 1537 | * @return void |
||
| 1538 | */ |
||
| 1539 | public function setRegistrationFields(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $registrationFields) |
||
| 1543 | |||
| 1544 | /** |
||
| 1545 | * Adds a registrationField |
||
| 1546 | * |
||
| 1547 | * @param Field $registrationField |
||
| 1548 | */ |
||
| 1549 | public function addRegistrationFields(Field $registrationField) |
||
| 1553 | |||
| 1554 | /** |
||
| 1555 | * Removed a registrationField |
||
| 1556 | * |
||
| 1557 | * @param Field $registrationField |
||
| 1558 | */ |
||
| 1559 | public function removeRegistrationFields(Field $registrationField) |
||
| 1563 | |||
| 1564 | /** |
||
| 1565 | * Returns an array with registration field uids |
||
| 1566 | * |
||
| 1567 | * @return array |
||
| 1568 | */ |
||
| 1569 | public function getRegistrationFieldsUids() |
||
| 1578 | |||
| 1579 | /** |
||
| 1580 | * Returns an array with registration field uids and titles |
||
| 1581 | * [uid => title] |
||
| 1582 | * |
||
| 1583 | * @return array |
||
| 1584 | */ |
||
| 1585 | public function getRegistrationFieldUidsWithTitle() |
||
| 1594 | |||
| 1595 | /** |
||
| 1596 | * Special getter to return the amount of registrations that are saved to default language |
||
| 1597 | * Required since TYPO3 9.5 (#82363) |
||
| 1598 | * |
||
| 1599 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
||
| 1600 | */ |
||
| 1601 | public function getRegistrations() |
||
| 1609 | |||
| 1610 | /** |
||
| 1611 | * Special getter to return the amount of waitlist registrations that are saved to default language |
||
| 1612 | * Required since TYPO3 9.5 (#82363) |
||
| 1613 | * |
||
| 1614 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
||
| 1615 | */ |
||
| 1616 | public function getRegistrationsWaitlist() |
||
| 1625 | |||
| 1626 | /** |
||
| 1627 | * Returns an objectStorage object holding all registrations in the default language. |
||
| 1628 | * Ensures expected behavior of getRegistration() and getRegistrationWaitlist() since TYPO3 issue #82363 |
||
| 1629 | * |
||
| 1630 | * @param bool $waitlist |
||
| 1631 | * @return ObjectStorage |
||
| 1632 | */ |
||
| 1633 | protected function getRegistrationsDefaultLanguage(bool $waitlist = false) |
||
| 1645 | |||
| 1646 | /** |
||
| 1647 | * Returns if the event ends on the same day |
||
| 1648 | * |
||
| 1649 | * @return bool |
||
| 1650 | */ |
||
| 1651 | public function getEndsSameDay(): bool |
||
| 1659 | |||
| 1660 | /** |
||
| 1661 | * Returns the challenge for the challenge/response spam check |
||
| 1662 | * |
||
| 1663 | * @return string |
||
| 1664 | */ |
||
| 1665 | public function getSpamCheckChallenge(): string |
||
| 1669 | |||
| 1670 | /** |
||
| 1671 | * Returns a string to be used as overlay value for the <core:icon> ViewHelper in the Backend Modules |
||
| 1672 | * |
||
| 1673 | * @return string |
||
| 1674 | */ |
||
| 1675 | public function getBackendIconOverlay(): string |
||
| 1687 | } |
||
| 1688 |