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 |
||
| 22 | class Event extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity |
||
| 23 | { |
||
| 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<\TYPO3\CMS\Extbase\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 deadline date |
||
| 152 | * |
||
| 153 | * @var \DateTime |
||
| 154 | */ |
||
| 155 | protected $registrationDeadline = null; |
||
| 156 | |||
| 157 | /** |
||
| 158 | * The image |
||
| 159 | * |
||
| 160 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference> |
||
| 161 | * @lazy |
||
| 162 | */ |
||
| 163 | protected $image = null; |
||
| 164 | |||
| 165 | /** |
||
| 166 | * Additional files |
||
| 167 | * |
||
| 168 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference> |
||
| 169 | * @lazy |
||
| 170 | */ |
||
| 171 | protected $files = null; |
||
| 172 | |||
| 173 | /** |
||
| 174 | * YouTube Embed code |
||
| 175 | * |
||
| 176 | * @var string |
||
| 177 | */ |
||
| 178 | protected $youtube = ''; |
||
| 179 | |||
| 180 | /** |
||
| 181 | * The Location |
||
| 182 | * |
||
| 183 | * @var \DERHANSEN\SfEventMgt\Domain\Model\Location |
||
| 184 | */ |
||
| 185 | protected $location = null; |
||
| 186 | |||
| 187 | /** |
||
| 188 | * Enable registration |
||
| 189 | * |
||
| 190 | * @var bool |
||
| 191 | */ |
||
| 192 | protected $enableRegistration = false; |
||
| 193 | |||
| 194 | /** |
||
| 195 | * Enable waitlist |
||
| 196 | * |
||
| 197 | * @var bool |
||
| 198 | */ |
||
| 199 | protected $enableWaitlist = false; |
||
| 200 | |||
| 201 | /** |
||
| 202 | * Link |
||
| 203 | * |
||
| 204 | * @var string |
||
| 205 | */ |
||
| 206 | protected $link; |
||
| 207 | |||
| 208 | /** |
||
| 209 | * Top event |
||
| 210 | * |
||
| 211 | * @var bool |
||
| 212 | */ |
||
| 213 | protected $topEvent = false; |
||
| 214 | |||
| 215 | /** |
||
| 216 | * The additionalImage |
||
| 217 | * |
||
| 218 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference> |
||
| 219 | * @lazy |
||
| 220 | */ |
||
| 221 | protected $additionalImage = null; |
||
| 222 | |||
| 223 | /** |
||
| 224 | * The organisator |
||
| 225 | * |
||
| 226 | * @var \DERHANSEN\SfEventMgt\Domain\Model\Organisator |
||
| 227 | */ |
||
| 228 | protected $organisator = null; |
||
| 229 | |||
| 230 | /** |
||
| 231 | * Notify admin |
||
| 232 | * |
||
| 233 | * @var bool |
||
| 234 | */ |
||
| 235 | protected $notifyAdmin = true; |
||
| 236 | |||
| 237 | /** |
||
| 238 | * Notify organisator |
||
| 239 | * |
||
| 240 | * @var bool |
||
| 241 | */ |
||
| 242 | protected $notifyOrganisator = false; |
||
| 243 | |||
| 244 | /** |
||
| 245 | * Enable cancel of registration |
||
| 246 | * |
||
| 247 | * @var bool |
||
| 248 | */ |
||
| 249 | protected $enableCancel = false; |
||
| 250 | |||
| 251 | /** |
||
| 252 | * Deadline for cancel |
||
| 253 | * |
||
| 254 | * @var \DateTime |
||
| 255 | */ |
||
| 256 | protected $cancelDeadline = null; |
||
| 257 | |||
| 258 | /** |
||
| 259 | * Unique e-mail check |
||
| 260 | * |
||
| 261 | * @var bool |
||
| 262 | 148 | */ |
|
| 263 | protected $uniqueEmailCheck = false; |
||
| 264 | 148 | ||
| 265 | 148 | /** |
|
| 266 | 148 | * Price options |
|
| 267 | 148 | * |
|
| 268 | 148 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DERHANSEN\SfEventMgt\Domain\Model\PriceOption> |
|
| 269 | 148 | * @cascade remove |
|
| 270 | 148 | * @lazy |
|
| 271 | 148 | */ |
|
| 272 | protected $priceOptions = null; |
||
| 273 | |||
| 274 | /** |
||
| 275 | * Constructor |
||
| 276 | */ |
||
| 277 | public function __construct() |
||
| 288 | |||
| 289 | /** |
||
| 290 | 1 | * Returns the title |
|
| 291 | * |
||
| 292 | 1 | * @return string $title |
|
| 293 | 1 | */ |
|
| 294 | public function getTitle() |
||
| 298 | |||
| 299 | /** |
||
| 300 | 1 | * Sets the title |
|
| 301 | * |
||
| 302 | 1 | * @param string $title Title |
|
| 303 | * |
||
| 304 | * @return void |
||
| 305 | */ |
||
| 306 | public function setTitle($title) |
||
| 310 | |||
| 311 | /** |
||
| 312 | 1 | * Returns the teaser |
|
| 313 | * |
||
| 314 | 1 | * @return string |
|
| 315 | 1 | */ |
|
| 316 | public function getTeaser() |
||
| 320 | |||
| 321 | /** |
||
| 322 | 1 | * Sets the teaser |
|
| 323 | * |
||
| 324 | 1 | * @param string $teaser Teaser |
|
| 325 | * |
||
| 326 | * @return void |
||
| 327 | */ |
||
| 328 | public function setTeaser($teaser) |
||
| 332 | |||
| 333 | /** |
||
| 334 | 1 | * Returns the description |
|
| 335 | * |
||
| 336 | 1 | * @return string $description |
|
| 337 | 1 | */ |
|
| 338 | public function getDescription() |
||
| 342 | |||
| 343 | /** |
||
| 344 | 1 | * Sets the description |
|
| 345 | * |
||
| 346 | 1 | * @param string $description Description |
|
| 347 | * |
||
| 348 | * @return void |
||
| 349 | */ |
||
| 350 | public function setDescription($description) |
||
| 354 | |||
| 355 | /** |
||
| 356 | 1 | * Returns the program |
|
| 357 | * |
||
| 358 | 1 | * @return string $program |
|
| 359 | 1 | */ |
|
| 360 | public function getProgram() |
||
| 364 | |||
| 365 | /** |
||
| 366 | 9 | * Sets the program |
|
| 367 | * |
||
| 368 | 9 | * @param string $program The program |
|
| 369 | * |
||
| 370 | * @return void |
||
| 371 | */ |
||
| 372 | public function setProgram($program) |
||
| 376 | |||
| 377 | /** |
||
| 378 | 9 | * Returns the startdate |
|
| 379 | * |
||
| 380 | 9 | * @return \DateTime $startdate |
|
| 381 | 9 | */ |
|
| 382 | public function getStartdate() |
||
| 386 | |||
| 387 | /** |
||
| 388 | 1 | * Sets the startdate |
|
| 389 | * |
||
| 390 | 1 | * @param \DateTime $startdate Startdate |
|
| 391 | * |
||
| 392 | * @return void |
||
| 393 | */ |
||
| 394 | public function setStartdate(\DateTime $startdate) |
||
| 398 | |||
| 399 | /** |
||
| 400 | 1 | * Returns the enddate |
|
| 401 | * |
||
| 402 | 1 | * @return \DateTime $enddate |
|
| 403 | 1 | */ |
|
| 404 | public function getEnddate() |
||
| 408 | |||
| 409 | /** |
||
| 410 | 9 | * Sets the enddate |
|
| 411 | * |
||
| 412 | 9 | * @param \DateTime $enddate Enddate |
|
| 413 | * |
||
| 414 | * @return void |
||
| 415 | */ |
||
| 416 | public function setEnddate(\DateTime $enddate) |
||
| 420 | |||
| 421 | /** |
||
| 422 | 8 | * Returns the participants |
|
| 423 | * |
||
| 424 | 8 | * @return int $participants |
|
| 425 | 8 | */ |
|
| 426 | public function getMaxParticipants() |
||
| 430 | |||
| 431 | /** |
||
| 432 | 1 | * Sets the participants |
|
| 433 | * |
||
| 434 | 1 | * @param int $participants Participants |
|
| 435 | * |
||
| 436 | * @return void |
||
| 437 | */ |
||
| 438 | public function setMaxParticipants($participants) |
||
| 442 | |||
| 443 | /** |
||
| 444 | 3 | * Returns the price |
|
| 445 | * |
||
| 446 | 3 | * @return float $price |
|
| 447 | 3 | */ |
|
| 448 | public function getPrice() |
||
| 452 | |||
| 453 | /** |
||
| 454 | 1 | * Sets the price |
|
| 455 | * |
||
| 456 | 1 | * @param float $price Price |
|
| 457 | * |
||
| 458 | * @return void |
||
| 459 | */ |
||
| 460 | public function setPrice($price) |
||
| 464 | |||
| 465 | /** |
||
| 466 | 1 | * Returns the currency |
|
| 467 | * |
||
| 468 | 1 | * @return string $currency |
|
| 469 | 1 | */ |
|
| 470 | public function getCurrency() |
||
| 474 | |||
| 475 | /** |
||
| 476 | 4 | * Sets the currency |
|
| 477 | * |
||
| 478 | 4 | * @param string $currency Currency |
|
| 479 | * |
||
| 480 | * @return void |
||
| 481 | */ |
||
| 482 | public function setCurrency($currency) |
||
| 486 | |||
| 487 | 3 | /** |
|
| 488 | * Returns if payment is enabled |
||
| 489 | 3 | * |
|
| 490 | 3 | * @return boolean |
|
| 491 | */ |
||
| 492 | public function getEnablePayment() |
||
| 496 | |||
| 497 | 3 | /** |
|
| 498 | * Sets enablePayment |
||
| 499 | 3 | * |
|
| 500 | * @param boolean $enablePayment |
||
| 501 | * @return void |
||
| 502 | */ |
||
| 503 | public function setEnablePayment($enablePayment) |
||
| 507 | |||
| 508 | 1 | /** |
|
| 509 | * Returns if payment methods should be restricted |
||
| 510 | 1 | * |
|
| 511 | 1 | * @return boolean |
|
| 512 | */ |
||
| 513 | public function getRestrictPaymentMethods() |
||
| 517 | |||
| 518 | 2 | /** |
|
| 519 | * Sets if payment methods should be restricted |
||
| 520 | 2 | * |
|
| 521 | * @param boolean $restrictPaymentMethods |
||
| 522 | * @return void |
||
| 523 | */ |
||
| 524 | public function setRestrictPaymentMethods($restrictPaymentMethods) |
||
| 528 | |||
| 529 | 1 | /** |
|
| 530 | * Returns selected payment methods |
||
| 531 | 1 | * |
|
| 532 | 1 | * @return string |
|
| 533 | */ |
||
| 534 | public function getSelectedPaymentMethods() |
||
| 538 | |||
| 539 | /** |
||
| 540 | * Sets selected payment methods |
||
| 541 | 1 | * |
|
| 542 | * @param string $selectedPaymentMethods |
||
| 543 | 1 | * @return void |
|
| 544 | 1 | */ |
|
| 545 | public function setSelectedPaymentMethods($selectedPaymentMethods) |
||
| 549 | |||
| 550 | /** |
||
| 551 | * Adds a Category |
||
| 552 | * |
||
| 553 | 1 | * @param \TYPO3\CMS\Extbase\Domain\Model\Category $category Category |
|
| 554 | * |
||
| 555 | 1 | * @return void |
|
| 556 | 1 | */ |
|
| 557 | public function addCategory(\TYPO3\CMS\Extbase\Domain\Model\Category $category) |
||
| 561 | |||
| 562 | /** |
||
| 563 | 1 | * Removes a Category |
|
| 564 | * |
||
| 565 | 1 | * @param \TYPO3\CMS\Extbase\Domain\Model\Category $categoryToRemove The Category to be removed |
|
| 566 | * |
||
| 567 | * @return void |
||
| 568 | */ |
||
| 569 | public function removeCategory(\TYPO3\CMS\Extbase\Domain\Model\Category $categoryToRemove) |
||
| 573 | |||
| 574 | /** |
||
| 575 | 3 | * Returns the category |
|
| 576 | * |
||
| 577 | 3 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
|
| 578 | 3 | */ |
|
| 579 | public function getCategory() |
||
| 583 | |||
| 584 | /** |
||
| 585 | 2 | * Sets the category |
|
| 586 | * |
||
| 587 | 2 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $category Category |
|
| 588 | * |
||
| 589 | * @return void |
||
| 590 | */ |
||
| 591 | public function setCategory(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $category) |
||
| 595 | |||
| 596 | 3 | /** |
|
| 597 | * Returns related events |
||
| 598 | 3 | * |
|
| 599 | 3 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
|
| 600 | */ |
||
| 601 | public function getRelated() |
||
| 605 | |||
| 606 | /** |
||
| 607 | 1 | * Sets related events |
|
| 608 | * |
||
| 609 | 1 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $related |
|
| 610 | 1 | * @return void |
|
| 611 | */ |
||
| 612 | public function setRelated($related) |
||
| 616 | |||
| 617 | /** |
||
| 618 | 1 | * Adds a related event |
|
| 619 | * |
||
| 620 | 1 | * @param Event $event |
|
| 621 | 1 | * @return void |
|
| 622 | */ |
||
| 623 | public function addRelated(\DERHANSEN\SfEventMgt\Domain\Model\Event $event) |
||
| 627 | |||
| 628 | /** |
||
| 629 | * Removes a related event |
||
| 630 | 2 | * |
|
| 631 | * @param Event $event |
||
| 632 | 2 | * @return void |
|
| 633 | 2 | */ |
|
| 634 | public function removeRelated(\DERHANSEN\SfEventMgt\Domain\Model\Event $event) |
||
| 638 | |||
| 639 | /** |
||
| 640 | * Adds a Registration |
||
| 641 | * |
||
| 642 | 1 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Registration $registration Registration |
|
| 643 | * |
||
| 644 | 1 | * @return void |
|
| 645 | 1 | */ |
|
| 646 | public function addRegistration(\DERHANSEN\SfEventMgt\Domain\Model\Registration $registration) |
||
| 650 | |||
| 651 | /** |
||
| 652 | 7 | * Removes a Registration |
|
| 653 | * |
||
| 654 | 7 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Registration $registrationToRemove Registration |
|
| 655 | * |
||
| 656 | * @return void |
||
| 657 | */ |
||
| 658 | public function removeRegistration(\DERHANSEN\SfEventMgt\Domain\Model\Registration $registrationToRemove) |
||
| 662 | |||
| 663 | /** |
||
| 664 | 4 | * Returns the Registration |
|
| 665 | * |
||
| 666 | 4 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage $registration |
|
| 667 | 4 | */ |
|
| 668 | public function getRegistration() |
||
| 672 | |||
| 673 | /** |
||
| 674 | * Sets the Registration |
||
| 675 | * |
||
| 676 | 1 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $registration Registration |
|
| 677 | * |
||
| 678 | 1 | * @return void |
|
| 679 | 1 | */ |
|
| 680 | public function setRegistration(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $registration) |
||
| 684 | |||
| 685 | /** |
||
| 686 | * Adds an image |
||
| 687 | * |
||
| 688 | 1 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $image Image |
|
| 689 | * |
||
| 690 | 1 | * @return void |
|
| 691 | 1 | */ |
|
| 692 | public function addImage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $image) |
||
| 696 | |||
| 697 | /** |
||
| 698 | 1 | * Removes an image |
|
| 699 | * |
||
| 700 | 1 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $imageToRemove Image |
|
| 701 | * |
||
| 702 | * @return void |
||
| 703 | */ |
||
| 704 | public function removeImage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $imageToRemove) |
||
| 708 | |||
| 709 | /** |
||
| 710 | 3 | * Returns the image |
|
| 711 | * |
||
| 712 | 3 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage $image |
|
| 713 | 3 | */ |
|
| 714 | public function getImage() |
||
| 718 | |||
| 719 | /** |
||
| 720 | * Sets the image |
||
| 721 | * |
||
| 722 | 1 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $image Image |
|
| 723 | * |
||
| 724 | 1 | * @return void |
|
| 725 | 1 | */ |
|
| 726 | public function setImage(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $image) |
||
| 730 | |||
| 731 | /** |
||
| 732 | * Adds a file |
||
| 733 | * |
||
| 734 | 1 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $file File |
|
| 735 | * |
||
| 736 | 1 | * @return void |
|
| 737 | 1 | */ |
|
| 738 | public function addFiles(\TYPO3\CMS\Extbase\Domain\Model\FileReference $file) |
||
| 742 | |||
| 743 | /** |
||
| 744 | 1 | * Removes a file |
|
| 745 | * |
||
| 746 | 1 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $fileToRemove File |
|
| 747 | * |
||
| 748 | * @return void |
||
| 749 | */ |
||
| 750 | public function removeFiles(\TYPO3\CMS\Extbase\Domain\Model\FileReference $fileToRemove) |
||
| 754 | |||
| 755 | /** |
||
| 756 | 3 | * Returns the files |
|
| 757 | * |
||
| 758 | 3 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage $files |
|
| 759 | 3 | */ |
|
| 760 | public function getFiles() |
||
| 764 | |||
| 765 | /** |
||
| 766 | 2 | * Sets the files |
|
| 767 | * |
||
| 768 | 2 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $files Files |
|
| 769 | * |
||
| 770 | * @return void |
||
| 771 | */ |
||
| 772 | public function setFiles(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $files) |
||
| 776 | |||
| 777 | /** |
||
| 778 | 1 | * Returns YouTube embed code |
|
| 779 | * |
||
| 780 | 1 | * @return string |
|
| 781 | 1 | */ |
|
| 782 | public function getYoutube() |
||
| 786 | |||
| 787 | /** |
||
| 788 | 8 | * Sets YouTube embed code |
|
| 789 | * |
||
| 790 | 8 | * @param string $youtube Youtube |
|
| 791 | 8 | * |
|
| 792 | 1 | * @return void |
|
| 793 | 1 | */ |
|
| 794 | 8 | public function setYoutube($youtube) |
|
| 798 | 8 | ||
| 799 | 8 | /** |
|
| 800 | * Returns if the registration for this event is logically possible |
||
| 801 | * |
||
| 802 | * @return bool |
||
| 803 | */ |
||
| 804 | public function getRegistrationPossible() |
||
| 818 | |||
| 819 | 1 | /** |
|
| 820 | * Returns the amount of free places |
||
| 821 | 1 | * |
|
| 822 | 1 | * @return int |
|
| 823 | */ |
||
| 824 | public function getFreePlaces() |
||
| 828 | |||
| 829 | 1 | /** |
|
| 830 | * Sets the location |
||
| 831 | 1 | * |
|
| 832 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Location $location Location |
||
| 833 | * |
||
| 834 | * @return void |
||
| 835 | */ |
||
| 836 | public function setLocation($location) |
||
| 840 | |||
| 841 | 8 | /** |
|
| 842 | * Returns the location |
||
| 843 | 8 | * |
|
| 844 | 8 | * @return \DERHANSEN\SfEventMgt\Domain\Model\Location |
|
| 845 | */ |
||
| 846 | public function getLocation() |
||
| 850 | |||
| 851 | 7 | /** |
|
| 852 | * Sets enableRegistration |
||
| 853 | 7 | * |
|
| 854 | * @param bool $enableRegistration EnableRegistration |
||
| 855 | * |
||
| 856 | * @return void |
||
| 857 | */ |
||
| 858 | public function setEnableRegistration($enableRegistration) |
||
| 862 | |||
| 863 | 3 | /** |
|
| 864 | * Returns if registration is enabled |
||
| 865 | 3 | * |
|
| 866 | 3 | * @return bool |
|
| 867 | */ |
||
| 868 | public function getEnableRegistration() |
||
| 872 | |||
| 873 | 9 | /** |
|
| 874 | * Returns enableWaitlist |
||
| 875 | 9 | * |
|
| 876 | * @return boolean |
||
| 877 | */ |
||
| 878 | public function getEnableWaitlist() |
||
| 882 | |||
| 883 | /** |
||
| 884 | * Sets enableWaitlist |
||
| 885 | 12 | * |
|
| 886 | * @param boolean $enableWaitlist |
||
| 887 | 12 | * @return void |
|
| 888 | 12 | */ |
|
| 889 | public function setEnableWaitlist($enableWaitlist) |
||
| 893 | |||
| 894 | /** |
||
| 895 | 1 | * Sets the registration deadline |
|
| 896 | * |
||
| 897 | 1 | * @param \DateTime $registrationDeadline RegistrationDeadline |
|
| 898 | * |
||
| 899 | * @return void |
||
| 900 | */ |
||
| 901 | public function setRegistrationDeadline(\DateTime $registrationDeadline) |
||
| 905 | 1 | ||
| 906 | /** |
||
| 907 | 1 | * Returns the registration deadline |
|
| 908 | * |
||
| 909 | * @return \DateTime |
||
| 910 | */ |
||
| 911 | public function getRegistrationDeadline() |
||
| 915 | 1 | ||
| 916 | /** |
||
| 917 | 1 | * Sets the link |
|
| 918 | * |
||
| 919 | * @param string $link Link |
||
| 920 | * |
||
| 921 | * @return void |
||
| 922 | */ |
||
| 923 | public function setLink($link) |
||
| 927 | 1 | ||
| 928 | /** |
||
| 929 | * Returns the link |
||
| 930 | * |
||
| 931 | * @return string |
||
| 932 | */ |
||
| 933 | public function getLink() |
||
| 937 | |||
| 938 | /** |
||
| 939 | 11 | * Returns the uri of the link |
|
| 940 | * |
||
| 941 | 11 | * @return string |
|
| 942 | 11 | */ |
|
| 943 | 11 | public function getLinkUrl() |
|
| 947 | 1 | ||
| 948 | 1 | /** |
|
| 949 | 11 | * Returns the target of the link |
|
| 950 | * |
||
| 951 | * @return string |
||
| 952 | */ |
||
| 953 | public function getLinkTarget() |
||
| 957 | |||
| 958 | /** |
||
| 959 | 1 | * Returns the title of the link |
|
| 960 | * |
||
| 961 | 1 | * @return string |
|
| 962 | 1 | */ |
|
| 963 | public function getLinkTitle() |
||
| 967 | |||
| 968 | /** |
||
| 969 | 1 | * Splits link to an array respection that a title with more than one word is |
|
| 970 | * surrounded by quotation marks. Returns part of the link for usage in fluid |
||
| 971 | 1 | * viewhelpers. |
|
| 972 | * |
||
| 973 | * @param int $part The part |
||
| 974 | * |
||
| 975 | * @return string |
||
| 976 | */ |
||
| 977 | public function getLinkPart($part) |
||
| 989 | |||
| 990 | /** |
||
| 991 | 1 | * Sets topEvent |
|
| 992 | * |
||
| 993 | 1 | * @param bool $topEvent TopEvent |
|
| 994 | 1 | * |
|
| 995 | * @return void |
||
| 996 | */ |
||
| 997 | public function setTopEvent($topEvent) |
||
| 1001 | |||
| 1002 | /** |
||
| 1003 | * Returns if topEvent is checked |
||
| 1004 | 1 | * |
|
| 1005 | * @return bool |
||
| 1006 | 1 | */ |
|
| 1007 | 1 | public function getTopEvent() |
|
| 1011 | |||
| 1012 | /** |
||
| 1013 | * Returns max regisrations per user |
||
| 1014 | * |
||
| 1015 | * @return int |
||
| 1016 | 1 | */ |
|
| 1017 | public function getMaxRegistrationsPerUser() |
||
| 1021 | |||
| 1022 | /** |
||
| 1023 | * Sets max registrations per user |
||
| 1024 | * |
||
| 1025 | * @param int $maxRegistrationsPerUser MaxRegistrationsPerUser |
||
| 1026 | 1 | * |
|
| 1027 | * @return void |
||
| 1028 | 1 | */ |
|
| 1029 | public function setMaxRegistrationsPerUser($maxRegistrationsPerUser) |
||
| 1033 | |||
| 1034 | |||
| 1035 | /** |
||
| 1036 | * Adds an additionalImage |
||
| 1037 | * |
||
| 1038 | 3 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $additionalImage The Image |
|
| 1039 | * |
||
| 1040 | 3 | * @return void |
|
| 1041 | 3 | */ |
|
| 1042 | public function addAdditionalImage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $additionalImage) |
||
| 1046 | |||
| 1047 | /** |
||
| 1048 | 4 | * Removes an additionalImage |
|
| 1049 | * |
||
| 1050 | 4 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $additionalImageToRemove The Image |
|
| 1051 | * |
||
| 1052 | * @return void |
||
| 1053 | */ |
||
| 1054 | public function removeAdditionalImage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $additionalImageToRemove) |
||
| 1058 | |||
| 1059 | /** |
||
| 1060 | 4 | * Returns the additionalImage |
|
| 1061 | * |
||
| 1062 | 4 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage $additionalImage |
|
| 1063 | 4 | */ |
|
| 1064 | public function getAdditionalImage() |
||
| 1068 | |||
| 1069 | /** |
||
| 1070 | 17 | * Sets the additionalImage |
|
| 1071 | * |
||
| 1072 | 17 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $additionalImage The Image |
|
| 1073 | * |
||
| 1074 | * @return void |
||
| 1075 | */ |
||
| 1076 | public function setAdditionalImage(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $additionalImage) |
||
| 1080 | |||
| 1081 | /** |
||
| 1082 | 7 | * Returns the organisator |
|
| 1083 | * |
||
| 1084 | 7 | * @return Organisator |
|
| 1085 | 7 | */ |
|
| 1086 | public function getOrganisator() |
||
| 1090 | |||
| 1091 | /** |
||
| 1092 | 17 | * Sets the organisator |
|
| 1093 | * |
||
| 1094 | 17 | * @param Organisator $organisator The organisator |
|
| 1095 | * |
||
| 1096 | * @return void |
||
| 1097 | */ |
||
| 1098 | public function setOrganisator($organisator) |
||
| 1102 | |||
| 1103 | /** |
||
| 1104 | 7 | * Returns notifyAdmin |
|
| 1105 | * |
||
| 1106 | 7 | * @return bool |
|
| 1107 | 7 | */ |
|
| 1108 | public function getNotifyAdmin() |
||
| 1112 | |||
| 1113 | /** |
||
| 1114 | * Sets notifyAdmin |
||
| 1115 | * |
||
| 1116 | 1 | * @param bool $notifyAdmin NotifyAdmin |
|
| 1117 | * |
||
| 1118 | 1 | * @return void |
|
| 1119 | 1 | */ |
|
| 1120 | public function setNotifyAdmin($notifyAdmin) |
||
| 1124 | |||
| 1125 | /** |
||
| 1126 | 2 | * Returns if notifyAdmin is set |
|
| 1127 | * |
||
| 1128 | 2 | * @return bool |
|
| 1129 | */ |
||
| 1130 | public function getNotifyOrganisator() |
||
| 1134 | |||
| 1135 | /** |
||
| 1136 | * Sets notifyOrganisator |
||
| 1137 | * |
||
| 1138 | 1 | * @param bool $notifyOrganisator NotifyOrganisator |
|
| 1139 | * |
||
| 1140 | 1 | * @return void |
|
| 1141 | 1 | */ |
|
| 1142 | public function setNotifyOrganisator($notifyOrganisator) |
||
| 1146 | |||
| 1147 | /** |
||
| 1148 | 2 | * Sets enableCancel |
|
| 1149 | * |
||
| 1150 | 2 | * @param bool $enableCancel EnableCancel |
|
| 1151 | * |
||
| 1152 | * @return void |
||
| 1153 | */ |
||
| 1154 | public function setEnableCancel($enableCancel) |
||
| 1158 | 2 | ||
| 1159 | /** |
||
| 1160 | 2 | * Returns if registration can be canceled |
|
| 1161 | * |
||
| 1162 | * @return bool |
||
| 1163 | */ |
||
| 1164 | public function getEnableCancel() |
||
| 1168 | |||
| 1169 | 1 | /** |
|
| 1170 | * Sets the cancel deadline |
||
| 1171 | 1 | * |
|
| 1172 | 1 | * @param \DateTime $cancelDeadline RegistrationDeadline |
|
| 1173 | * |
||
| 1174 | * @return void |
||
| 1175 | */ |
||
| 1176 | public function setCancelDeadline(\DateTime $cancelDeadline) |
||
| 1180 | |||
| 1181 | 5 | /** |
|
| 1182 | * Returns the cancel deadline |
||
| 1183 | * |
||
| 1184 | * @return \DateTime |
||
| 1185 | */ |
||
| 1186 | public function getCancelDeadline() |
||
| 1190 | 3 | ||
| 1191 | /** |
||
| 1192 | 3 | * Returns uniqueEmailCheck |
|
| 1193 | 3 | * |
|
| 1194 | * @return boolean |
||
| 1195 | */ |
||
| 1196 | public function getUniqueEmailCheck() |
||
| 1200 | |||
| 1201 | /** |
||
| 1202 | 3 | * Sets UniqueEmailCheck |
|
| 1203 | * |
||
| 1204 | 3 | * @param boolean $uniqueEmailCheck |
|
| 1205 | 3 | * @return void |
|
| 1206 | */ |
||
| 1207 | public function setUniqueEmailCheck($uniqueEmailCheck) |
||
| 1211 | |||
| 1212 | /** |
||
| 1213 | * Returns price options |
||
| 1214 | 1 | * |
|
| 1215 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
||
| 1216 | 1 | */ |
|
| 1217 | 1 | public function getPriceOptions() |
|
| 1221 | |||
| 1222 | /** |
||
| 1223 | * Sets price options |
||
| 1224 | 3 | * |
|
| 1225 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $priceOptions |
||
| 1226 | 3 | * @return void |
|
| 1227 | 3 | */ |
|
| 1228 | 3 | public function setPriceOptions($priceOptions) |
|
| 1232 | 2 | ||
| 1233 | 3 | /** |
|
| 1234 | 3 | * Adds a price option |
|
| 1235 | 3 | * |
|
| 1236 | 3 | * @param \DERHANSEN\SfEventMgt\Domain\Model\PriceOption $priceOption Price option |
|
| 1237 | * |
||
| 1238 | * @return void |
||
| 1239 | */ |
||
| 1240 | public function addPriceOptions(\DERHANSEN\SfEventMgt\Domain\Model\PriceOption $priceOption) |
||
| 1244 | 2 | ||
| 1245 | /** |
||
| 1246 | 2 | * Removes a Registration |
|
| 1247 | 2 | * |
|
| 1248 | * @param \DERHANSEN\SfEventMgt\Domain\Model\PriceOption $priceOption Price option |
||
| 1249 | 1 | * |
|
| 1250 | * @return void |
||
| 1251 | */ |
||
| 1252 | 1 | public function removePriceOptions(\DERHANSEN\SfEventMgt\Domain\Model\PriceOption $priceOption) |
|
| 1256 | |||
| 1257 | /** |
||
| 1258 | * Returns all active price options sorted by date ASC |
||
| 1259 | * |
||
| 1260 | * @return array |
||
| 1261 | */ |
||
| 1262 | public function getActivePriceOptions() |
||
| 1276 | |||
| 1277 | /** |
||
| 1278 | * Returns the current price of the event respecting possible price options |
||
| 1279 | * |
||
| 1280 | * @return float |
||
| 1281 | */ |
||
| 1282 | public function getCurrentPrice() |
||
| 1293 | |||
| 1294 | /** |
||
| 1295 | * Returns registrationWaitlist |
||
| 1296 | * |
||
| 1297 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
||
| 1298 | */ |
||
| 1299 | public function getRegistrationWaitlist() |
||
| 1303 | |||
| 1304 | /** |
||
| 1305 | * Sets registrationWaitlist |
||
| 1306 | * |
||
| 1307 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $registration Registration |
||
| 1308 | * |
||
| 1309 | * @return void |
||
| 1310 | */ |
||
| 1311 | public function setRegistrationWaitlist(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $registration) |
||
| 1315 | |||
| 1316 | /** |
||
| 1317 | * Adds a Registration to the waitlist |
||
| 1318 | * |
||
| 1319 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Registration $registration Registration |
||
| 1320 | * |
||
| 1321 | * @return void |
||
| 1322 | */ |
||
| 1323 | public function addRegistrationWaitlist(\DERHANSEN\SfEventMgt\Domain\Model\Registration $registration) |
||
| 1327 | |||
| 1328 | /** |
||
| 1329 | * Removes a Registration from the waitlist |
||
| 1330 | * |
||
| 1331 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Registration $registrationToRemove Registration |
||
| 1332 | * |
||
| 1333 | * @return void |
||
| 1334 | */ |
||
| 1335 | public function removeRegistrationWaitlist(\DERHANSEN\SfEventMgt\Domain\Model\Registration $registrationToRemove) |
||
| 1339 | } |
||
| 1340 |