Complex classes like Event often do a lot of different things. To break such a class down, we need to identify a cohesive component within that class. A common approach to find such a component is to look for fields/methods that share the same prefixes, or suffixes. You can also have a look at the cohesion graph to spot any un-connected, or weakly-connected components.
Once you have determined the fields that belong together, you can apply the Extract Class refactoring. If the component makes sense as a sub-class, Extract Subclass is also a candidate, and is often faster.
While breaking up the class, it is a good idea to analyze how other classes use Event, and based on these observations, apply Extract Interface, too.
| 1 | <?php |
||
| 18 | class Event extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity |
||
| 19 | { |
||
| 20 | /** |
||
| 21 | * @var \DateTime |
||
| 22 | */ |
||
| 23 | protected $tstamp; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Title |
||
| 27 | * |
||
| 28 | * @var string |
||
| 29 | * @validate NotEmpty |
||
| 30 | */ |
||
| 31 | protected $title = ''; |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Teaser |
||
| 35 | * |
||
| 36 | * @var string |
||
| 37 | */ |
||
| 38 | protected $teaser = ''; |
||
| 39 | |||
| 40 | /** |
||
| 41 | * Description |
||
| 42 | * |
||
| 43 | * @var string |
||
| 44 | */ |
||
| 45 | protected $description = ''; |
||
| 46 | |||
| 47 | /** |
||
| 48 | * Program/Schedule |
||
| 49 | * |
||
| 50 | * @var string |
||
| 51 | */ |
||
| 52 | protected $program = ''; |
||
| 53 | |||
| 54 | /** |
||
| 55 | * Startdate and time |
||
| 56 | * |
||
| 57 | * @var \DateTime |
||
| 58 | */ |
||
| 59 | protected $startdate = null; |
||
| 60 | |||
| 61 | /** |
||
| 62 | * Enddate and time |
||
| 63 | * |
||
| 64 | * @var \DateTime |
||
| 65 | */ |
||
| 66 | protected $enddate = null; |
||
| 67 | |||
| 68 | /** |
||
| 69 | * Max participants |
||
| 70 | * |
||
| 71 | * @var int |
||
| 72 | */ |
||
| 73 | protected $maxParticipants = 0; |
||
| 74 | |||
| 75 | /** |
||
| 76 | * Max registrations per user |
||
| 77 | * |
||
| 78 | * @var int |
||
| 79 | */ |
||
| 80 | protected $maxRegistrationsPerUser = 1; |
||
| 81 | |||
| 82 | /** |
||
| 83 | * Price |
||
| 84 | * |
||
| 85 | * @var float |
||
| 86 | */ |
||
| 87 | protected $price = 0.0; |
||
| 88 | |||
| 89 | /** |
||
| 90 | * Currency |
||
| 91 | * |
||
| 92 | * @var string |
||
| 93 | */ |
||
| 94 | protected $currency = ''; |
||
| 95 | |||
| 96 | /** |
||
| 97 | * Enable payment |
||
| 98 | * |
||
| 99 | * @var bool |
||
| 100 | */ |
||
| 101 | protected $enablePayment = false; |
||
| 102 | |||
| 103 | /** |
||
| 104 | * Restrict payment methods |
||
| 105 | * |
||
| 106 | * @var bool |
||
| 107 | */ |
||
| 108 | protected $restrictPaymentMethods = false; |
||
| 109 | |||
| 110 | /** |
||
| 111 | * Selected payment methods |
||
| 112 | * |
||
| 113 | * @var string |
||
| 114 | */ |
||
| 115 | protected $selectedPaymentMethods = ''; |
||
| 116 | |||
| 117 | /** |
||
| 118 | * Category |
||
| 119 | * |
||
| 120 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DERHANSEN\SfEventMgt\Domain\Model\Category> |
||
| 121 | * @lazy |
||
| 122 | */ |
||
| 123 | protected $category = null; |
||
| 124 | |||
| 125 | /** |
||
| 126 | * Related |
||
| 127 | * |
||
| 128 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DERHANSEN\SfEventMgt\Domain\Model\Event> |
||
| 129 | * @lazy |
||
| 130 | */ |
||
| 131 | protected $related; |
||
| 132 | |||
| 133 | /** |
||
| 134 | * Registration |
||
| 135 | * |
||
| 136 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DERHANSEN\SfEventMgt\Domain\Model\Registration> |
||
| 137 | * @cascade remove |
||
| 138 | * @lazy |
||
| 139 | */ |
||
| 140 | protected $registration = null; |
||
| 141 | |||
| 142 | /** |
||
| 143 | * Registration waitlist |
||
| 144 | * |
||
| 145 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DERHANSEN\SfEventMgt\Domain\Model\Registration> |
||
| 146 | * @lazy |
||
| 147 | */ |
||
| 148 | protected $registrationWaitlist; |
||
| 149 | |||
| 150 | /** |
||
| 151 | * Registration fields |
||
| 152 | * |
||
| 153 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DERHANSEN\SfEventMgt\Domain\Model\Registration\Field> |
||
| 154 | * @lazy |
||
| 155 | */ |
||
| 156 | protected $registrationFields; |
||
| 157 | |||
| 158 | /** |
||
| 159 | * Registration deadline date |
||
| 160 | * |
||
| 161 | * @var \DateTime |
||
| 162 | */ |
||
| 163 | protected $registrationDeadline = null; |
||
| 164 | |||
| 165 | /** |
||
| 166 | * The image |
||
| 167 | * |
||
| 168 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference> |
||
| 169 | * @lazy |
||
| 170 | */ |
||
| 171 | protected $image = null; |
||
| 172 | |||
| 173 | /** |
||
| 174 | * Additional files |
||
| 175 | * |
||
| 176 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference> |
||
| 177 | * @lazy |
||
| 178 | */ |
||
| 179 | protected $files = null; |
||
| 180 | |||
| 181 | /** |
||
| 182 | * The Location |
||
| 183 | * |
||
| 184 | * @var \DERHANSEN\SfEventMgt\Domain\Model\Location |
||
| 185 | */ |
||
| 186 | protected $location = null; |
||
| 187 | |||
| 188 | /** |
||
| 189 | * Enable registration |
||
| 190 | * |
||
| 191 | * @var bool |
||
| 192 | */ |
||
| 193 | protected $enableRegistration = false; |
||
| 194 | |||
| 195 | /** |
||
| 196 | * Enable waitlist |
||
| 197 | * |
||
| 198 | * @var bool |
||
| 199 | */ |
||
| 200 | protected $enableWaitlist = false; |
||
| 201 | |||
| 202 | /** |
||
| 203 | * Link |
||
| 204 | * |
||
| 205 | * @var string |
||
| 206 | */ |
||
| 207 | protected $link; |
||
| 208 | |||
| 209 | /** |
||
| 210 | * Top event |
||
| 211 | * |
||
| 212 | * @var bool |
||
| 213 | */ |
||
| 214 | protected $topEvent = false; |
||
| 215 | |||
| 216 | /** |
||
| 217 | * The additionalImage |
||
| 218 | * |
||
| 219 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference> |
||
| 220 | * @lazy |
||
| 221 | */ |
||
| 222 | protected $additionalImage = null; |
||
| 223 | |||
| 224 | /** |
||
| 225 | * The organisator |
||
| 226 | * |
||
| 227 | * @var \DERHANSEN\SfEventMgt\Domain\Model\Organisator |
||
| 228 | */ |
||
| 229 | protected $organisator = null; |
||
| 230 | |||
| 231 | /** |
||
| 232 | * Notify admin |
||
| 233 | * |
||
| 234 | * @var bool |
||
| 235 | */ |
||
| 236 | protected $notifyAdmin = true; |
||
| 237 | |||
| 238 | /** |
||
| 239 | * Notify organisator |
||
| 240 | * |
||
| 241 | * @var bool |
||
| 242 | */ |
||
| 243 | protected $notifyOrganisator = false; |
||
| 244 | |||
| 245 | /** |
||
| 246 | * Enable cancel of registration |
||
| 247 | * |
||
| 248 | * @var bool |
||
| 249 | */ |
||
| 250 | protected $enableCancel = false; |
||
| 251 | |||
| 252 | /** |
||
| 253 | * Deadline for cancel |
||
| 254 | * |
||
| 255 | * @var \DateTime |
||
| 256 | */ |
||
| 257 | protected $cancelDeadline = null; |
||
| 258 | |||
| 259 | /** |
||
| 260 | * Enable auto confirmation |
||
| 261 | * |
||
| 262 | * @var bool |
||
| 263 | */ |
||
| 264 | protected $enableAutoconfirm = false; |
||
| 265 | |||
| 266 | /** |
||
| 267 | * Unique e-mail check |
||
| 268 | * |
||
| 269 | * @var bool |
||
| 270 | */ |
||
| 271 | protected $uniqueEmailCheck = false; |
||
| 272 | |||
| 273 | /** |
||
| 274 | * Price options |
||
| 275 | * |
||
| 276 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DERHANSEN\SfEventMgt\Domain\Model\PriceOption> |
||
| 277 | 181 | * @cascade remove |
|
| 278 | * @lazy |
||
| 279 | 181 | */ |
|
| 280 | 181 | protected $priceOptions = null; |
|
| 281 | 181 | ||
| 282 | 181 | /** |
|
| 283 | 181 | * Speaker |
|
| 284 | 181 | * |
|
| 285 | 181 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DERHANSEN\SfEventMgt\Domain\Model\Speaker> |
|
| 286 | 181 | * @lazy |
|
| 287 | 181 | */ |
|
| 288 | protected $speaker = null; |
||
| 289 | |||
| 290 | /** |
||
| 291 | * Constructor |
||
| 292 | */ |
||
| 293 | public function __construct() |
||
| 306 | 1 | ||
| 307 | /** |
||
| 308 | 1 | * Get timestamp |
|
| 309 | 1 | * |
|
| 310 | * @return \DateTime |
||
| 311 | */ |
||
| 312 | public function getTstamp() |
||
| 316 | 1 | ||
| 317 | /** |
||
| 318 | 1 | * Set time stamp |
|
| 319 | * |
||
| 320 | * @param \DateTime $tstamp time stamp |
||
| 321 | */ |
||
| 322 | public function setTstamp($tstamp) |
||
| 326 | |||
| 327 | /** |
||
| 328 | 1 | * Returns the title |
|
| 329 | * |
||
| 330 | 1 | * @return string $title |
|
| 331 | 1 | */ |
|
| 332 | public function getTitle() |
||
| 336 | |||
| 337 | /** |
||
| 338 | 1 | * Sets the title |
|
| 339 | * |
||
| 340 | 1 | * @param string $title Title |
|
| 341 | * |
||
| 342 | * @return void |
||
| 343 | */ |
||
| 344 | public function setTitle($title) |
||
| 348 | |||
| 349 | /** |
||
| 350 | 1 | * Returns the teaser |
|
| 351 | * |
||
| 352 | 1 | * @return string |
|
| 353 | 1 | */ |
|
| 354 | public function getTeaser() |
||
| 358 | |||
| 359 | /** |
||
| 360 | 1 | * Sets the teaser |
|
| 361 | * |
||
| 362 | 1 | * @param string $teaser Teaser |
|
| 363 | * |
||
| 364 | * @return void |
||
| 365 | */ |
||
| 366 | public function setTeaser($teaser) |
||
| 370 | |||
| 371 | /** |
||
| 372 | 1 | * Returns the description |
|
| 373 | * |
||
| 374 | 1 | * @return string $description |
|
| 375 | 1 | */ |
|
| 376 | public function getDescription() |
||
| 380 | |||
| 381 | /** |
||
| 382 | 11 | * Sets the description |
|
| 383 | * |
||
| 384 | 11 | * @param string $description Description |
|
| 385 | * |
||
| 386 | * @return void |
||
| 387 | */ |
||
| 388 | public function setDescription($description) |
||
| 392 | |||
| 393 | /** |
||
| 394 | 11 | * Returns the program |
|
| 395 | * |
||
| 396 | 11 | * @return string $program |
|
| 397 | 11 | */ |
|
| 398 | public function getProgram() |
||
| 402 | |||
| 403 | /** |
||
| 404 | 1 | * Sets the program |
|
| 405 | * |
||
| 406 | 1 | * @param string $program The program |
|
| 407 | * |
||
| 408 | * @return void |
||
| 409 | */ |
||
| 410 | public function setProgram($program) |
||
| 414 | |||
| 415 | /** |
||
| 416 | 1 | * Returns the startdate |
|
| 417 | * |
||
| 418 | 1 | * @return \DateTime $startdate |
|
| 419 | 1 | */ |
|
| 420 | public function getStartdate() |
||
| 424 | |||
| 425 | /** |
||
| 426 | 14 | * Sets the startdate |
|
| 427 | * |
||
| 428 | 14 | * @param \DateTime $startdate Startdate |
|
| 429 | * |
||
| 430 | * @return void |
||
| 431 | */ |
||
| 432 | public function setStartdate(\DateTime $startdate) |
||
| 436 | |||
| 437 | /** |
||
| 438 | 13 | * Returns the enddate |
|
| 439 | * |
||
| 440 | 13 | * @return \DateTime $enddate |
|
| 441 | 13 | */ |
|
| 442 | public function getEnddate() |
||
| 446 | |||
| 447 | /** |
||
| 448 | 1 | * Sets the enddate |
|
| 449 | * |
||
| 450 | 1 | * @param \DateTime $enddate Enddate |
|
| 451 | * |
||
| 452 | * @return void |
||
| 453 | */ |
||
| 454 | public function setEnddate(\DateTime $enddate) |
||
| 458 | |||
| 459 | /** |
||
| 460 | 3 | * Returns the participants |
|
| 461 | * |
||
| 462 | 3 | * @return int $participants |
|
| 463 | 3 | */ |
|
| 464 | public function getMaxParticipants() |
||
| 468 | |||
| 469 | /** |
||
| 470 | 1 | * Sets the participants |
|
| 471 | * |
||
| 472 | 1 | * @param int $participants Participants |
|
| 473 | * |
||
| 474 | * @return void |
||
| 475 | */ |
||
| 476 | public function setMaxParticipants($participants) |
||
| 480 | |||
| 481 | /** |
||
| 482 | 1 | * Returns the price |
|
| 483 | * |
||
| 484 | 1 | * @return float $price |
|
| 485 | 1 | */ |
|
| 486 | public function getPrice() |
||
| 490 | |||
| 491 | /** |
||
| 492 | 4 | * Sets the price |
|
| 493 | * |
||
| 494 | 4 | * @param float $price Price |
|
| 495 | * |
||
| 496 | * @return void |
||
| 497 | */ |
||
| 498 | public function setPrice($price) |
||
| 502 | |||
| 503 | 3 | /** |
|
| 504 | * Returns the currency |
||
| 505 | 3 | * |
|
| 506 | 3 | * @return string $currency |
|
| 507 | */ |
||
| 508 | public function getCurrency() |
||
| 512 | |||
| 513 | 3 | /** |
|
| 514 | * Sets the currency |
||
| 515 | 3 | * |
|
| 516 | * @param string $currency Currency |
||
| 517 | * |
||
| 518 | * @return void |
||
| 519 | */ |
||
| 520 | public function setCurrency($currency) |
||
| 524 | 1 | ||
| 525 | /** |
||
| 526 | 1 | * Returns if payment is enabled |
|
| 527 | 1 | * |
|
| 528 | * @return bool |
||
| 529 | */ |
||
| 530 | public function getEnablePayment() |
||
| 534 | 2 | ||
| 535 | /** |
||
| 536 | 2 | * Sets enablePayment |
|
| 537 | * |
||
| 538 | * @param bool $enablePayment |
||
| 539 | * @return void |
||
| 540 | */ |
||
| 541 | public function setEnablePayment($enablePayment) |
||
| 545 | 1 | ||
| 546 | /** |
||
| 547 | 1 | * Returns if payment methods should be restricted |
|
| 548 | 1 | * |
|
| 549 | * @return bool |
||
| 550 | */ |
||
| 551 | public function getRestrictPaymentMethods() |
||
| 555 | |||
| 556 | /** |
||
| 557 | 1 | * Sets if payment methods should be restricted |
|
| 558 | * |
||
| 559 | 1 | * @param bool $restrictPaymentMethods |
|
| 560 | 1 | * @return void |
|
| 561 | */ |
||
| 562 | public function setRestrictPaymentMethods($restrictPaymentMethods) |
||
| 566 | |||
| 567 | /** |
||
| 568 | * Returns selected payment methods |
||
| 569 | 1 | * |
|
| 570 | * @return string |
||
| 571 | 1 | */ |
|
| 572 | 1 | public function getSelectedPaymentMethods() |
|
| 576 | |||
| 577 | /** |
||
| 578 | * Sets selected payment methods |
||
| 579 | 1 | * |
|
| 580 | * @param string $selectedPaymentMethods |
||
| 581 | 1 | * @return void |
|
| 582 | */ |
||
| 583 | public function setSelectedPaymentMethods($selectedPaymentMethods) |
||
| 587 | |||
| 588 | /** |
||
| 589 | * Adds a Category |
||
| 590 | * |
||
| 591 | 3 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Category $category Category |
|
| 592 | * |
||
| 593 | 3 | * @return void |
|
| 594 | 3 | */ |
|
| 595 | public function addCategory(\DERHANSEN\SfEventMgt\Domain\Model\Category $category) |
||
| 599 | |||
| 600 | /** |
||
| 601 | 2 | * Removes a Category |
|
| 602 | * |
||
| 603 | 2 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Category $categoryToRemove The Category to be removed |
|
| 604 | * |
||
| 605 | * @return void |
||
| 606 | */ |
||
| 607 | public function removeCategory(\DERHANSEN\SfEventMgt\Domain\Model\Category $categoryToRemove) |
||
| 611 | |||
| 612 | 3 | /** |
|
| 613 | * Returns the category |
||
| 614 | 3 | * |
|
| 615 | 3 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
|
| 616 | */ |
||
| 617 | public function getCategory() |
||
| 621 | |||
| 622 | /** |
||
| 623 | 1 | * Sets the category |
|
| 624 | * |
||
| 625 | 1 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $category Category |
|
| 626 | 1 | * |
|
| 627 | * @return void |
||
| 628 | */ |
||
| 629 | public function setCategory(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $category) |
||
| 633 | |||
| 634 | 1 | /** |
|
| 635 | * Returns related events |
||
| 636 | 1 | * |
|
| 637 | 1 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
|
| 638 | */ |
||
| 639 | public function getRelated() |
||
| 643 | |||
| 644 | /** |
||
| 645 | * Sets related events |
||
| 646 | 2 | * |
|
| 647 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $related |
||
| 648 | 2 | * @return void |
|
| 649 | 2 | */ |
|
| 650 | public function setRelated($related) |
||
| 654 | |||
| 655 | /** |
||
| 656 | * Adds a related event |
||
| 657 | * |
||
| 658 | 1 | * @param Event $event |
|
| 659 | * @return void |
||
| 660 | 1 | */ |
|
| 661 | 1 | public function addRelated(\DERHANSEN\SfEventMgt\Domain\Model\Event $event) |
|
| 665 | |||
| 666 | /** |
||
| 667 | * Removes a related event |
||
| 668 | 12 | * |
|
| 669 | * @param Event $event |
||
| 670 | 12 | * @return void |
|
| 671 | */ |
||
| 672 | public function removeRelated(\DERHANSEN\SfEventMgt\Domain\Model\Event $event) |
||
| 676 | |||
| 677 | /** |
||
| 678 | * Adds a Registration |
||
| 679 | * |
||
| 680 | 9 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Registration $registration Registration |
|
| 681 | * |
||
| 682 | 9 | * @return void |
|
| 683 | 9 | */ |
|
| 684 | public function addRegistration(\DERHANSEN\SfEventMgt\Domain\Model\Registration $registration) |
||
| 688 | |||
| 689 | /** |
||
| 690 | * Removes a Registration |
||
| 691 | * |
||
| 692 | 1 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Registration $registrationToRemove Registration |
|
| 693 | * |
||
| 694 | 1 | * @return void |
|
| 695 | 1 | */ |
|
| 696 | public function removeRegistration(\DERHANSEN\SfEventMgt\Domain\Model\Registration $registrationToRemove) |
||
| 700 | |||
| 701 | /** |
||
| 702 | * Returns the Registration |
||
| 703 | * |
||
| 704 | 1 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage $registration |
|
| 705 | */ |
||
| 706 | 1 | public function getRegistration() |
|
| 710 | |||
| 711 | /** |
||
| 712 | * Sets the Registration |
||
| 713 | * |
||
| 714 | 1 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $registration Registration |
|
| 715 | * |
||
| 716 | 1 | * @return void |
|
| 717 | */ |
||
| 718 | public function setRegistration(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $registration) |
||
| 722 | |||
| 723 | /** |
||
| 724 | * Adds an image |
||
| 725 | * |
||
| 726 | 3 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $image Image |
|
| 727 | * |
||
| 728 | 3 | * @return void |
|
| 729 | 3 | */ |
|
| 730 | public function addImage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $image) |
||
| 734 | |||
| 735 | /** |
||
| 736 | * Removes an image |
||
| 737 | * |
||
| 738 | 2 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $imageToRemove Image |
|
| 739 | * |
||
| 740 | 2 | * @return void |
|
| 741 | 2 | */ |
|
| 742 | public function removeImage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $imageToRemove) |
||
| 746 | |||
| 747 | /** |
||
| 748 | * Returns the image |
||
| 749 | * |
||
| 750 | 1 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage $image |
|
| 751 | */ |
||
| 752 | 1 | public function getImage() |
|
| 756 | |||
| 757 | /** |
||
| 758 | * Sets the image |
||
| 759 | * |
||
| 760 | 1 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $image Image |
|
| 761 | * |
||
| 762 | 1 | * @return void |
|
| 763 | */ |
||
| 764 | public function setImage(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $image) |
||
| 768 | |||
| 769 | /** |
||
| 770 | * Adds a file |
||
| 771 | * |
||
| 772 | 3 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $file File |
|
| 773 | * |
||
| 774 | 3 | * @return void |
|
| 775 | 3 | */ |
|
| 776 | public function addFiles(\TYPO3\CMS\Extbase\Domain\Model\FileReference $file) |
||
| 780 | |||
| 781 | /** |
||
| 782 | 2 | * Removes a file |
|
| 783 | * |
||
| 784 | 2 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $fileToRemove File |
|
| 785 | * |
||
| 786 | * @return void |
||
| 787 | */ |
||
| 788 | public function removeFiles(\TYPO3\CMS\Extbase\Domain\Model\FileReference $fileToRemove) |
||
| 792 | |||
| 793 | /** |
||
| 794 | 1 | * Returns the files |
|
| 795 | * |
||
| 796 | 1 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage $files |
|
| 797 | 1 | */ |
|
| 798 | public function getFiles() |
||
| 802 | |||
| 803 | /** |
||
| 804 | 10 | * Sets the files |
|
| 805 | * |
||
| 806 | 10 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $files Files |
|
| 807 | 10 | * |
|
| 808 | 3 | * @return void |
|
| 809 | 3 | */ |
|
| 810 | 10 | public function setFiles(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $files) |
|
| 814 | 10 | ||
| 815 | 10 | /** |
|
| 816 | 10 | * Returns if the registration for this event is logically possible |
|
| 817 | * |
||
| 818 | * @return bool |
||
| 819 | */ |
||
| 820 | public function getRegistrationPossible() |
||
| 835 | |||
| 836 | 1 | /** |
|
| 837 | * Returns the amount of free places |
||
| 838 | 1 | * |
|
| 839 | 1 | * @return int |
|
| 840 | */ |
||
| 841 | public function getFreePlaces() |
||
| 845 | |||
| 846 | 1 | /** |
|
| 847 | * Sets the location |
||
| 848 | 1 | * |
|
| 849 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Location $location Location |
||
| 850 | * |
||
| 851 | * @return void |
||
| 852 | */ |
||
| 853 | public function setLocation($location) |
||
| 857 | |||
| 858 | 10 | /** |
|
| 859 | * Returns the location |
||
| 860 | 10 | * |
|
| 861 | 10 | * @return \DERHANSEN\SfEventMgt\Domain\Model\Location |
|
| 862 | */ |
||
| 863 | public function getLocation() |
||
| 867 | |||
| 868 | 8 | /** |
|
| 869 | * Sets enableRegistration |
||
| 870 | 8 | * |
|
| 871 | * @param bool $enableRegistration EnableRegistration |
||
| 872 | * |
||
| 873 | * @return void |
||
| 874 | */ |
||
| 875 | public function setEnableRegistration($enableRegistration) |
||
| 879 | |||
| 880 | 4 | /** |
|
| 881 | * Returns if registration is enabled |
||
| 882 | * |
||
| 883 | * @return bool |
||
| 884 | */ |
||
| 885 | public function getEnableRegistration() |
||
| 889 | 5 | ||
| 890 | /** |
||
| 891 | 5 | * Returns enableWaitlist |
|
| 892 | 5 | * |
|
| 893 | * @return bool |
||
| 894 | */ |
||
| 895 | public function getEnableWaitlist() |
||
| 899 | |||
| 900 | /** |
||
| 901 | 3 | * Sets enableWaitlist |
|
| 902 | * |
||
| 903 | 3 | * @param bool $enableWaitlist |
|
| 904 | 3 | * @return void |
|
| 905 | */ |
||
| 906 | public function setEnableWaitlist($enableWaitlist) |
||
| 910 | |||
| 911 | 11 | /** |
|
| 912 | * Sets the registration deadline |
||
| 913 | 11 | * |
|
| 914 | * @param \DateTime $registrationDeadline RegistrationDeadline |
||
| 915 | * |
||
| 916 | * @return void |
||
| 917 | */ |
||
| 918 | public function setRegistrationDeadline(\DateTime $registrationDeadline) |
||
| 922 | |||
| 923 | 12 | /** |
|
| 924 | * Returns the registration deadline |
||
| 925 | 12 | * |
|
| 926 | 12 | * @return \DateTime |
|
| 927 | */ |
||
| 928 | public function getRegistrationDeadline() |
||
| 932 | |||
| 933 | 1 | /** |
|
| 934 | * Sets the link |
||
| 935 | 1 | * |
|
| 936 | * @param string $link Link |
||
| 937 | * |
||
| 938 | * @return void |
||
| 939 | */ |
||
| 940 | public function setLink($link) |
||
| 944 | |||
| 945 | 1 | /** |
|
| 946 | * Returns the link |
||
| 947 | * |
||
| 948 | * @return string |
||
| 949 | */ |
||
| 950 | public function getLink() |
||
| 954 | |||
| 955 | 1 | /** |
|
| 956 | * Sets topEvent |
||
| 957 | * |
||
| 958 | * @param bool $topEvent TopEvent |
||
| 959 | * |
||
| 960 | * @return void |
||
| 961 | */ |
||
| 962 | public function setTopEvent($topEvent) |
||
| 966 | |||
| 967 | /** |
||
| 968 | * Returns if topEvent is checked |
||
| 969 | * |
||
| 970 | * @return bool |
||
| 971 | */ |
||
| 972 | public function getTopEvent() |
||
| 976 | |||
| 977 | 11 | /** |
|
| 978 | * Returns max regisrations per user |
||
| 979 | 11 | * |
|
| 980 | 11 | * @return int |
|
| 981 | 11 | */ |
|
| 982 | 11 | public function getMaxRegistrationsPerUser() |
|
| 986 | 1 | ||
| 987 | 11 | /** |
|
| 988 | * Sets max registrations per user |
||
| 989 | * |
||
| 990 | * @param int $maxRegistrationsPerUser MaxRegistrationsPerUser |
||
| 991 | * |
||
| 992 | * @return void |
||
| 993 | */ |
||
| 994 | public function setMaxRegistrationsPerUser($maxRegistrationsPerUser) |
||
| 998 | |||
| 999 | 1 | /** |
|
| 1000 | 1 | * Adds an additionalImage |
|
| 1001 | * |
||
| 1002 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $additionalImage The Image |
||
| 1003 | * |
||
| 1004 | * @return void |
||
| 1005 | */ |
||
| 1006 | public function addAdditionalImage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $additionalImage) |
||
| 1010 | |||
| 1011 | /** |
||
| 1012 | * Removes an additionalImage |
||
| 1013 | * |
||
| 1014 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $additionalImageToRemove The Image |
||
| 1015 | * |
||
| 1016 | * @return void |
||
| 1017 | 2 | */ |
|
| 1018 | public function removeAdditionalImage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $additionalImageToRemove) |
||
| 1022 | |||
| 1023 | /** |
||
| 1024 | * Returns the additionalImage |
||
| 1025 | * |
||
| 1026 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage $additionalImage |
||
| 1027 | */ |
||
| 1028 | public function getAdditionalImage() |
||
| 1032 | 1 | ||
| 1033 | /** |
||
| 1034 | * Sets the additionalImage |
||
| 1035 | * |
||
| 1036 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $additionalImage The Image |
||
| 1037 | * |
||
| 1038 | * @return void |
||
| 1039 | */ |
||
| 1040 | public function setAdditionalImage(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $additionalImage) |
||
| 1044 | 1 | ||
| 1045 | 1 | /** |
|
| 1046 | * Returns the organisator |
||
| 1047 | * |
||
| 1048 | * @return Organisator |
||
| 1049 | */ |
||
| 1050 | public function getOrganisator() |
||
| 1054 | 1 | ||
| 1055 | /** |
||
| 1056 | 1 | * Sets the organisator |
|
| 1057 | 1 | * |
|
| 1058 | * @param Organisator $organisator The organisator |
||
| 1059 | * |
||
| 1060 | * @return void |
||
| 1061 | */ |
||
| 1062 | public function setOrganisator($organisator) |
||
| 1066 | 1 | ||
| 1067 | /** |
||
| 1068 | * Returns notifyAdmin |
||
| 1069 | * |
||
| 1070 | * @return bool |
||
| 1071 | */ |
||
| 1072 | public function getNotifyAdmin() |
||
| 1076 | 3 | ||
| 1077 | /** |
||
| 1078 | 3 | * Sets notifyAdmin |
|
| 1079 | 3 | * |
|
| 1080 | * @param bool $notifyAdmin NotifyAdmin |
||
| 1081 | * |
||
| 1082 | * @return void |
||
| 1083 | */ |
||
| 1084 | public function setNotifyAdmin($notifyAdmin) |
||
| 1088 | 6 | ||
| 1089 | /** |
||
| 1090 | * Returns if notifyAdmin is set |
||
| 1091 | * |
||
| 1092 | * @return bool |
||
| 1093 | */ |
||
| 1094 | public function getNotifyOrganisator() |
||
| 1098 | 6 | ||
| 1099 | /** |
||
| 1100 | 6 | * Sets notifyOrganisator |
|
| 1101 | 6 | * |
|
| 1102 | * @param bool $notifyOrganisator NotifyOrganisator |
||
| 1103 | * |
||
| 1104 | * @return void |
||
| 1105 | */ |
||
| 1106 | public function setNotifyOrganisator($notifyOrganisator) |
||
| 1110 | 27 | ||
| 1111 | /** |
||
| 1112 | * Sets enableCancel |
||
| 1113 | * |
||
| 1114 | * @param bool $enableCancel EnableCancel |
||
| 1115 | * |
||
| 1116 | * @return void |
||
| 1117 | */ |
||
| 1118 | public function setEnableCancel($enableCancel) |
||
| 1122 | 11 | ||
| 1123 | 11 | /** |
|
| 1124 | * Returns if registration can be canceled |
||
| 1125 | * |
||
| 1126 | * @return bool |
||
| 1127 | */ |
||
| 1128 | public function getEnableCancel() |
||
| 1132 | 27 | ||
| 1133 | /** |
||
| 1134 | * Sets the cancel deadline |
||
| 1135 | * |
||
| 1136 | * @param \DateTime $cancelDeadline CancelDeadline |
||
| 1137 | * |
||
| 1138 | * @return void |
||
| 1139 | */ |
||
| 1140 | public function setCancelDeadline(\DateTime $cancelDeadline) |
||
| 1144 | 11 | ||
| 1145 | 11 | /** |
|
| 1146 | * Returns the cancel deadline |
||
| 1147 | * |
||
| 1148 | * @return \DateTime |
||
| 1149 | */ |
||
| 1150 | public function getCancelDeadline() |
||
| 1154 | 4 | ||
| 1155 | /** |
||
| 1156 | 4 | * Returns if autoconfirmation is enabled |
|
| 1157 | 4 | * |
|
| 1158 | * @return bool |
||
| 1159 | */ |
||
| 1160 | public function getEnableAutoconfirm() |
||
| 1164 | 5 | ||
| 1165 | /** |
||
| 1166 | 5 | * Sets enable autoconfirm |
|
| 1167 | * |
||
| 1168 | * @param bool $enableAutoconfirm |
||
| 1169 | * @return void |
||
| 1170 | */ |
||
| 1171 | public function setEnableAutoconfirm($enableAutoconfirm) |
||
| 1175 | |||
| 1176 | 4 | /** |
|
| 1177 | * Returns uniqueEmailCheck |
||
| 1178 | 4 | * |
|
| 1179 | 4 | * @return bool |
|
| 1180 | */ |
||
| 1181 | public function getUniqueEmailCheck() |
||
| 1185 | |||
| 1186 | 4 | /** |
|
| 1187 | * Sets UniqueEmailCheck |
||
| 1188 | 4 | * |
|
| 1189 | * @param bool $uniqueEmailCheck |
||
| 1190 | * @return void |
||
| 1191 | */ |
||
| 1192 | public function setUniqueEmailCheck($uniqueEmailCheck) |
||
| 1196 | 2 | ||
| 1197 | /** |
||
| 1198 | 2 | * Returns price options |
|
| 1199 | * |
||
| 1200 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
||
| 1201 | */ |
||
| 1202 | public function getPriceOptions() |
||
| 1206 | |||
| 1207 | 1 | /** |
|
| 1208 | * Sets price options |
||
| 1209 | 1 | * |
|
| 1210 | 1 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $priceOptions |
|
| 1211 | * @return void |
||
| 1212 | */ |
||
| 1213 | public function setPriceOptions($priceOptions) |
||
| 1217 | 5 | ||
| 1218 | /** |
||
| 1219 | 5 | * Adds a price option |
|
| 1220 | * |
||
| 1221 | * @param \DERHANSEN\SfEventMgt\Domain\Model\PriceOption $priceOption Price option |
||
| 1222 | * |
||
| 1223 | * @return void |
||
| 1224 | */ |
||
| 1225 | public function addPriceOptions(\DERHANSEN\SfEventMgt\Domain\Model\PriceOption $priceOption) |
||
| 1229 | |||
| 1230 | 3 | /** |
|
| 1231 | 3 | * Removes a Registration |
|
| 1232 | * |
||
| 1233 | * @param \DERHANSEN\SfEventMgt\Domain\Model\PriceOption $priceOption Price option |
||
| 1234 | * |
||
| 1235 | * @return void |
||
| 1236 | */ |
||
| 1237 | public function removePriceOptions(\DERHANSEN\SfEventMgt\Domain\Model\PriceOption $priceOption) |
||
| 1241 | |||
| 1242 | 3 | /** |
|
| 1243 | 3 | * Returns all active price options sorted by date ASC |
|
| 1244 | * |
||
| 1245 | * @return array |
||
| 1246 | */ |
||
| 1247 | public function getActivePriceOptions() |
||
| 1262 | 3 | ||
| 1263 | /** |
||
| 1264 | 3 | * Returns the current price of the event respecting possible price options |
|
| 1265 | 3 | * |
|
| 1266 | 3 | * @return float |
|
| 1267 | 3 | */ |
|
| 1268 | 2 | public function getCurrentPrice() |
|
| 1278 | |||
| 1279 | /** |
||
| 1280 | * Returns registrationWaitlist |
||
| 1281 | * |
||
| 1282 | 2 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
|
| 1283 | */ |
||
| 1284 | 2 | public function getRegistrationWaitlist() |
|
| 1288 | |||
| 1289 | /** |
||
| 1290 | 1 | * Sets registrationWaitlist |
|
| 1291 | * |
||
| 1292 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $registration Registration |
||
| 1293 | * |
||
| 1294 | * @return void |
||
| 1295 | */ |
||
| 1296 | public function setRegistrationWaitlist(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $registration) |
||
| 1300 | |||
| 1301 | 1 | /** |
|
| 1302 | * Adds a Registration to the waitlist |
||
| 1303 | * |
||
| 1304 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Registration $registration Registration |
||
| 1305 | * |
||
| 1306 | * @return void |
||
| 1307 | */ |
||
| 1308 | public function addRegistrationWaitlist(\DERHANSEN\SfEventMgt\Domain\Model\Registration $registration) |
||
| 1312 | |||
| 1313 | 3 | /** |
|
| 1314 | 3 | * Removes a Registration from the waitlist |
|
| 1315 | * |
||
| 1316 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Registration $registrationToRemove Registration |
||
| 1317 | * |
||
| 1318 | * @return void |
||
| 1319 | */ |
||
| 1320 | public function removeRegistrationWaitlist(\DERHANSEN\SfEventMgt\Domain\Model\Registration $registrationToRemove) |
||
| 1324 | |||
| 1325 | 1 | /** |
|
| 1326 | 1 | * Returns, if cancellation for registrations of the event is possible |
|
| 1327 | * |
||
| 1328 | * @return bool |
||
| 1329 | */ |
||
| 1330 | public function getCancellationPossible() |
||
| 1335 | 1 | ||
| 1336 | /** |
||
| 1337 | 1 | * Returns speaker |
|
| 1338 | 1 | * |
|
| 1339 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
||
| 1340 | */ |
||
| 1341 | public function getSpeaker() |
||
| 1345 | 3 | ||
| 1346 | /** |
||
| 1347 | 3 | * Sets speaker |
|
| 1348 | * |
||
| 1349 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $speaker |
||
| 1350 | * @return void |
||
| 1351 | */ |
||
| 1352 | public function setSpeaker($speaker) |
||
| 1356 | |||
| 1357 | /** |
||
| 1358 | * Adds a speaker |
||
| 1359 | * |
||
| 1360 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Speaker $speaker |
||
| 1361 | * |
||
| 1362 | * @return void |
||
| 1363 | */ |
||
| 1364 | public function addSpeaker(\DERHANSEN\SfEventMgt\Domain\Model\Speaker $speaker) |
||
| 1368 | |||
| 1369 | /** |
||
| 1370 | * Removes a speaker |
||
| 1371 | * |
||
| 1372 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Speaker $speaker |
||
| 1373 | * |
||
| 1374 | * @return void |
||
| 1375 | */ |
||
| 1376 | public function removeSpeaker(\DERHANSEN\SfEventMgt\Domain\Model\Speaker $speaker) |
||
| 1380 | |||
| 1381 | /** |
||
| 1382 | * Returns registrationFields |
||
| 1383 | * |
||
| 1384 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
||
| 1385 | */ |
||
| 1386 | public function getRegistrationFields() |
||
| 1390 | |||
| 1391 | /** |
||
| 1392 | * Sets registrationWaitlist |
||
| 1393 | * |
||
| 1394 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $registrationFields |
||
| 1395 | * |
||
| 1396 | * @return void |
||
| 1397 | */ |
||
| 1398 | public function setRegistrationFields(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $registrationFields) |
||
| 1402 | |||
| 1403 | /** |
||
| 1404 | * Adds a registrationField |
||
| 1405 | * |
||
| 1406 | * @param Field $registrationField |
||
| 1407 | */ |
||
| 1408 | public function addRegistrationFields(Field $registrationField) |
||
| 1412 | |||
| 1413 | /** |
||
| 1414 | * Removed a registrationField |
||
| 1415 | * |
||
| 1416 | * @param Field $registrationField |
||
| 1417 | */ |
||
| 1418 | public function removeRegistrationFields(Field $registrationField) |
||
| 1422 | |||
| 1423 | /** |
||
| 1424 | * Returns an array with registration field uids |
||
| 1425 | * |
||
| 1426 | * @return array |
||
| 1427 | */ |
||
| 1428 | public function getRegistrationFieldsUids() |
||
| 1437 | |||
| 1438 | /** |
||
| 1439 | * Returns an array with registration field uids and titles |
||
| 1440 | * [uid => title] |
||
| 1441 | * |
||
| 1442 | * @return array |
||
| 1443 | */ |
||
| 1444 | public function getRegistrationFieldUidsWithTitle() |
||
| 1453 | } |
||
| 1454 |