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 | * Enable auto confirmation |
||
| 260 | * |
||
| 261 | * @var bool |
||
| 262 | */ |
||
| 263 | protected $enableAutoconfirm = false; |
||
| 264 | |||
| 265 | /** |
||
| 266 | * Unique e-mail check |
||
| 267 | * |
||
| 268 | * @var bool |
||
| 269 | */ |
||
| 270 | protected $uniqueEmailCheck = false; |
||
| 271 | |||
| 272 | /** |
||
| 273 | * Price options |
||
| 274 | * |
||
| 275 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DERHANSEN\SfEventMgt\Domain\Model\PriceOption> |
||
| 276 | * @cascade remove |
||
| 277 | 181 | * @lazy |
|
| 278 | */ |
||
| 279 | 181 | protected $priceOptions = null; |
|
| 280 | 181 | ||
| 281 | 181 | /** |
|
| 282 | 181 | * Speaker |
|
| 283 | 181 | * |
|
| 284 | 181 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DERHANSEN\SfEventMgt\Domain\Model\Speaker> |
|
| 285 | 181 | * @lazy |
|
| 286 | 181 | */ |
|
| 287 | 181 | protected $speaker = null; |
|
| 288 | |||
| 289 | /** |
||
| 290 | * Constructor |
||
| 291 | */ |
||
| 292 | public function __construct() |
||
| 304 | |||
| 305 | /** |
||
| 306 | 1 | * Returns the title |
|
| 307 | * |
||
| 308 | 1 | * @return string $title |
|
| 309 | 1 | */ |
|
| 310 | public function getTitle() |
||
| 314 | |||
| 315 | /** |
||
| 316 | 1 | * Sets the title |
|
| 317 | * |
||
| 318 | 1 | * @param string $title Title |
|
| 319 | * |
||
| 320 | * @return void |
||
| 321 | */ |
||
| 322 | public function setTitle($title) |
||
| 326 | |||
| 327 | /** |
||
| 328 | 1 | * Returns the teaser |
|
| 329 | * |
||
| 330 | 1 | * @return string |
|
| 331 | 1 | */ |
|
| 332 | public function getTeaser() |
||
| 336 | |||
| 337 | /** |
||
| 338 | 1 | * Sets the teaser |
|
| 339 | * |
||
| 340 | 1 | * @param string $teaser Teaser |
|
| 341 | * |
||
| 342 | * @return void |
||
| 343 | */ |
||
| 344 | public function setTeaser($teaser) |
||
| 348 | |||
| 349 | /** |
||
| 350 | 1 | * Returns the description |
|
| 351 | * |
||
| 352 | 1 | * @return string $description |
|
| 353 | 1 | */ |
|
| 354 | public function getDescription() |
||
| 358 | |||
| 359 | /** |
||
| 360 | 1 | * Sets the description |
|
| 361 | * |
||
| 362 | 1 | * @param string $description Description |
|
| 363 | * |
||
| 364 | * @return void |
||
| 365 | */ |
||
| 366 | public function setDescription($description) |
||
| 370 | |||
| 371 | /** |
||
| 372 | 1 | * Returns the program |
|
| 373 | * |
||
| 374 | 1 | * @return string $program |
|
| 375 | 1 | */ |
|
| 376 | public function getProgram() |
||
| 380 | |||
| 381 | /** |
||
| 382 | 11 | * Sets the program |
|
| 383 | * |
||
| 384 | 11 | * @param string $program The program |
|
| 385 | * |
||
| 386 | * @return void |
||
| 387 | */ |
||
| 388 | public function setProgram($program) |
||
| 392 | |||
| 393 | /** |
||
| 394 | 11 | * Returns the startdate |
|
| 395 | * |
||
| 396 | 11 | * @return \DateTime $startdate |
|
| 397 | 11 | */ |
|
| 398 | public function getStartdate() |
||
| 402 | |||
| 403 | /** |
||
| 404 | 1 | * Sets the startdate |
|
| 405 | * |
||
| 406 | 1 | * @param \DateTime $startdate Startdate |
|
| 407 | * |
||
| 408 | * @return void |
||
| 409 | */ |
||
| 410 | public function setStartdate(\DateTime $startdate) |
||
| 414 | |||
| 415 | /** |
||
| 416 | 1 | * Returns the enddate |
|
| 417 | * |
||
| 418 | 1 | * @return \DateTime $enddate |
|
| 419 | 1 | */ |
|
| 420 | public function getEnddate() |
||
| 424 | |||
| 425 | /** |
||
| 426 | 14 | * Sets the enddate |
|
| 427 | * |
||
| 428 | 14 | * @param \DateTime $enddate Enddate |
|
| 429 | * |
||
| 430 | * @return void |
||
| 431 | */ |
||
| 432 | public function setEnddate(\DateTime $enddate) |
||
| 436 | |||
| 437 | /** |
||
| 438 | 13 | * Returns the participants |
|
| 439 | * |
||
| 440 | 13 | * @return int $participants |
|
| 441 | 13 | */ |
|
| 442 | public function getMaxParticipants() |
||
| 446 | |||
| 447 | /** |
||
| 448 | 1 | * Sets the participants |
|
| 449 | * |
||
| 450 | 1 | * @param int $participants Participants |
|
| 451 | * |
||
| 452 | * @return void |
||
| 453 | */ |
||
| 454 | public function setMaxParticipants($participants) |
||
| 458 | |||
| 459 | /** |
||
| 460 | 3 | * Returns the price |
|
| 461 | * |
||
| 462 | 3 | * @return float $price |
|
| 463 | 3 | */ |
|
| 464 | public function getPrice() |
||
| 468 | |||
| 469 | /** |
||
| 470 | 1 | * Sets the price |
|
| 471 | * |
||
| 472 | 1 | * @param float $price Price |
|
| 473 | * |
||
| 474 | * @return void |
||
| 475 | */ |
||
| 476 | public function setPrice($price) |
||
| 480 | |||
| 481 | /** |
||
| 482 | 1 | * Returns the currency |
|
| 483 | * |
||
| 484 | 1 | * @return string $currency |
|
| 485 | 1 | */ |
|
| 486 | public function getCurrency() |
||
| 490 | |||
| 491 | /** |
||
| 492 | 4 | * Sets the currency |
|
| 493 | * |
||
| 494 | 4 | * @param string $currency Currency |
|
| 495 | * |
||
| 496 | * @return void |
||
| 497 | */ |
||
| 498 | public function setCurrency($currency) |
||
| 502 | |||
| 503 | 3 | /** |
|
| 504 | * Returns if payment is enabled |
||
| 505 | 3 | * |
|
| 506 | 3 | * @return boolean |
|
| 507 | */ |
||
| 508 | public function getEnablePayment() |
||
| 512 | |||
| 513 | 3 | /** |
|
| 514 | * Sets enablePayment |
||
| 515 | 3 | * |
|
| 516 | * @param boolean $enablePayment |
||
| 517 | * @return void |
||
| 518 | */ |
||
| 519 | public function setEnablePayment($enablePayment) |
||
| 523 | |||
| 524 | 1 | /** |
|
| 525 | * Returns if payment methods should be restricted |
||
| 526 | 1 | * |
|
| 527 | 1 | * @return boolean |
|
| 528 | */ |
||
| 529 | public function getRestrictPaymentMethods() |
||
| 533 | |||
| 534 | 2 | /** |
|
| 535 | * Sets if payment methods should be restricted |
||
| 536 | 2 | * |
|
| 537 | * @param boolean $restrictPaymentMethods |
||
| 538 | * @return void |
||
| 539 | */ |
||
| 540 | public function setRestrictPaymentMethods($restrictPaymentMethods) |
||
| 544 | |||
| 545 | 1 | /** |
|
| 546 | * Returns selected payment methods |
||
| 547 | 1 | * |
|
| 548 | 1 | * @return string |
|
| 549 | */ |
||
| 550 | public function getSelectedPaymentMethods() |
||
| 554 | |||
| 555 | /** |
||
| 556 | * Sets selected payment methods |
||
| 557 | 1 | * |
|
| 558 | * @param string $selectedPaymentMethods |
||
| 559 | 1 | * @return void |
|
| 560 | 1 | */ |
|
| 561 | public function setSelectedPaymentMethods($selectedPaymentMethods) |
||
| 565 | |||
| 566 | /** |
||
| 567 | * Adds a Category |
||
| 568 | * |
||
| 569 | 1 | * @param \TYPO3\CMS\Extbase\Domain\Model\Category $category Category |
|
| 570 | * |
||
| 571 | 1 | * @return void |
|
| 572 | 1 | */ |
|
| 573 | public function addCategory(\TYPO3\CMS\Extbase\Domain\Model\Category $category) |
||
| 577 | |||
| 578 | /** |
||
| 579 | 1 | * Removes a Category |
|
| 580 | * |
||
| 581 | 1 | * @param \TYPO3\CMS\Extbase\Domain\Model\Category $categoryToRemove The Category to be removed |
|
| 582 | * |
||
| 583 | * @return void |
||
| 584 | */ |
||
| 585 | public function removeCategory(\TYPO3\CMS\Extbase\Domain\Model\Category $categoryToRemove) |
||
| 589 | |||
| 590 | /** |
||
| 591 | 3 | * Returns the category |
|
| 592 | * |
||
| 593 | 3 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
|
| 594 | 3 | */ |
|
| 595 | public function getCategory() |
||
| 599 | |||
| 600 | /** |
||
| 601 | 2 | * Sets the category |
|
| 602 | * |
||
| 603 | 2 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $category Category |
|
| 604 | * |
||
| 605 | * @return void |
||
| 606 | */ |
||
| 607 | public function setCategory(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $category) |
||
| 611 | |||
| 612 | 3 | /** |
|
| 613 | * Returns related events |
||
| 614 | 3 | * |
|
| 615 | 3 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
|
| 616 | */ |
||
| 617 | public function getRelated() |
||
| 621 | |||
| 622 | /** |
||
| 623 | 1 | * Sets related events |
|
| 624 | * |
||
| 625 | 1 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $related |
|
| 626 | 1 | * @return void |
|
| 627 | */ |
||
| 628 | public function setRelated($related) |
||
| 632 | |||
| 633 | /** |
||
| 634 | 1 | * Adds a related event |
|
| 635 | * |
||
| 636 | 1 | * @param Event $event |
|
| 637 | 1 | * @return void |
|
| 638 | */ |
||
| 639 | public function addRelated(\DERHANSEN\SfEventMgt\Domain\Model\Event $event) |
||
| 643 | |||
| 644 | /** |
||
| 645 | * Removes a related event |
||
| 646 | 2 | * |
|
| 647 | * @param Event $event |
||
| 648 | 2 | * @return void |
|
| 649 | 2 | */ |
|
| 650 | public function removeRelated(\DERHANSEN\SfEventMgt\Domain\Model\Event $event) |
||
| 654 | |||
| 655 | /** |
||
| 656 | * Adds a Registration |
||
| 657 | * |
||
| 658 | 1 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Registration $registration Registration |
|
| 659 | * |
||
| 660 | 1 | * @return void |
|
| 661 | 1 | */ |
|
| 662 | public function addRegistration(\DERHANSEN\SfEventMgt\Domain\Model\Registration $registration) |
||
| 666 | |||
| 667 | /** |
||
| 668 | 12 | * Removes a Registration |
|
| 669 | * |
||
| 670 | 12 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Registration $registrationToRemove Registration |
|
| 671 | * |
||
| 672 | * @return void |
||
| 673 | */ |
||
| 674 | public function removeRegistration(\DERHANSEN\SfEventMgt\Domain\Model\Registration $registrationToRemove) |
||
| 678 | |||
| 679 | /** |
||
| 680 | 9 | * Returns the Registration |
|
| 681 | * |
||
| 682 | 9 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage $registration |
|
| 683 | 9 | */ |
|
| 684 | public function getRegistration() |
||
| 688 | |||
| 689 | /** |
||
| 690 | * Sets the Registration |
||
| 691 | * |
||
| 692 | 1 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $registration Registration |
|
| 693 | * |
||
| 694 | 1 | * @return void |
|
| 695 | 1 | */ |
|
| 696 | public function setRegistration(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $registration) |
||
| 700 | |||
| 701 | /** |
||
| 702 | * Adds an image |
||
| 703 | * |
||
| 704 | 1 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $image Image |
|
| 705 | * |
||
| 706 | 1 | * @return void |
|
| 707 | 1 | */ |
|
| 708 | public function addImage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $image) |
||
| 712 | |||
| 713 | /** |
||
| 714 | 1 | * Removes an image |
|
| 715 | * |
||
| 716 | 1 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $imageToRemove Image |
|
| 717 | * |
||
| 718 | * @return void |
||
| 719 | */ |
||
| 720 | public function removeImage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $imageToRemove) |
||
| 724 | |||
| 725 | /** |
||
| 726 | 3 | * Returns the image |
|
| 727 | * |
||
| 728 | 3 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage $image |
|
| 729 | 3 | */ |
|
| 730 | public function getImage() |
||
| 734 | |||
| 735 | /** |
||
| 736 | * Sets the image |
||
| 737 | * |
||
| 738 | 2 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $image Image |
|
| 739 | * |
||
| 740 | 2 | * @return void |
|
| 741 | 2 | */ |
|
| 742 | public function setImage(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $image) |
||
| 746 | |||
| 747 | /** |
||
| 748 | * Adds a file |
||
| 749 | * |
||
| 750 | 1 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $file File |
|
| 751 | * |
||
| 752 | 1 | * @return void |
|
| 753 | 1 | */ |
|
| 754 | public function addFiles(\TYPO3\CMS\Extbase\Domain\Model\FileReference $file) |
||
| 758 | |||
| 759 | /** |
||
| 760 | 1 | * Removes a file |
|
| 761 | * |
||
| 762 | 1 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $fileToRemove File |
|
| 763 | * |
||
| 764 | * @return void |
||
| 765 | */ |
||
| 766 | public function removeFiles(\TYPO3\CMS\Extbase\Domain\Model\FileReference $fileToRemove) |
||
| 770 | |||
| 771 | /** |
||
| 772 | 3 | * Returns the files |
|
| 773 | * |
||
| 774 | 3 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage $files |
|
| 775 | 3 | */ |
|
| 776 | public function getFiles() |
||
| 780 | |||
| 781 | /** |
||
| 782 | 2 | * Sets the files |
|
| 783 | * |
||
| 784 | 2 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $files Files |
|
| 785 | * |
||
| 786 | * @return void |
||
| 787 | */ |
||
| 788 | public function setFiles(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $files) |
||
| 792 | |||
| 793 | /** |
||
| 794 | 1 | * Returns YouTube embed code |
|
| 795 | * |
||
| 796 | 1 | * @return string |
|
| 797 | 1 | */ |
|
| 798 | public function getYoutube() |
||
| 802 | |||
| 803 | /** |
||
| 804 | 10 | * Sets YouTube embed code |
|
| 805 | * |
||
| 806 | 10 | * @param string $youtube Youtube |
|
| 807 | 10 | * |
|
| 808 | 3 | * @return void |
|
| 809 | 3 | */ |
|
| 810 | 10 | public function setYoutube($youtube) |
|
| 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() |
||
| 834 | |||
| 835 | /** |
||
| 836 | 1 | * Returns the amount of free places |
|
| 837 | * |
||
| 838 | 1 | * @return int |
|
| 839 | 1 | */ |
|
| 840 | public function getFreePlaces() |
||
| 844 | |||
| 845 | /** |
||
| 846 | 1 | * Sets the location |
|
| 847 | * |
||
| 848 | 1 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Location $location Location |
|
| 849 | * |
||
| 850 | * @return void |
||
| 851 | */ |
||
| 852 | public function setLocation($location) |
||
| 856 | |||
| 857 | /** |
||
| 858 | 10 | * Returns the location |
|
| 859 | * |
||
| 860 | 10 | * @return \DERHANSEN\SfEventMgt\Domain\Model\Location |
|
| 861 | 10 | */ |
|
| 862 | public function getLocation() |
||
| 866 | |||
| 867 | /** |
||
| 868 | 8 | * Sets enableRegistration |
|
| 869 | * |
||
| 870 | 8 | * @param bool $enableRegistration EnableRegistration |
|
| 871 | * |
||
| 872 | * @return void |
||
| 873 | */ |
||
| 874 | public function setEnableRegistration($enableRegistration) |
||
| 878 | 4 | ||
| 879 | /** |
||
| 880 | 4 | * Returns if registration is enabled |
|
| 881 | * |
||
| 882 | * @return bool |
||
| 883 | */ |
||
| 884 | public function getEnableRegistration() |
||
| 888 | |||
| 889 | 5 | /** |
|
| 890 | * Returns enableWaitlist |
||
| 891 | 5 | * |
|
| 892 | 5 | * @return boolean |
|
| 893 | */ |
||
| 894 | public function getEnableWaitlist() |
||
| 898 | |||
| 899 | /** |
||
| 900 | * Sets enableWaitlist |
||
| 901 | 3 | * |
|
| 902 | * @param boolean $enableWaitlist |
||
| 903 | 3 | * @return void |
|
| 904 | 3 | */ |
|
| 905 | public function setEnableWaitlist($enableWaitlist) |
||
| 909 | |||
| 910 | /** |
||
| 911 | 11 | * Sets the registration deadline |
|
| 912 | * |
||
| 913 | 11 | * @param \DateTime $registrationDeadline RegistrationDeadline |
|
| 914 | * |
||
| 915 | * @return void |
||
| 916 | */ |
||
| 917 | public function setRegistrationDeadline(\DateTime $registrationDeadline) |
||
| 921 | |||
| 922 | /** |
||
| 923 | 12 | * Returns the registration deadline |
|
| 924 | * |
||
| 925 | 12 | * @return \DateTime |
|
| 926 | 12 | */ |
|
| 927 | public function getRegistrationDeadline() |
||
| 931 | |||
| 932 | /** |
||
| 933 | 1 | * Sets the link |
|
| 934 | * |
||
| 935 | 1 | * @param string $link Link |
|
| 936 | * |
||
| 937 | * @return void |
||
| 938 | */ |
||
| 939 | public function setLink($link) |
||
| 943 | 1 | ||
| 944 | /** |
||
| 945 | 1 | * Returns the link |
|
| 946 | * |
||
| 947 | * @return string |
||
| 948 | */ |
||
| 949 | public function getLink() |
||
| 953 | 1 | ||
| 954 | /** |
||
| 955 | 1 | * Returns the uri of the link |
|
| 956 | * |
||
| 957 | * @return string |
||
| 958 | */ |
||
| 959 | public function getLinkUrl() |
||
| 963 | 1 | ||
| 964 | /** |
||
| 965 | 1 | * Returns the target of the link |
|
| 966 | * |
||
| 967 | * @return string |
||
| 968 | */ |
||
| 969 | public function getLinkTarget() |
||
| 973 | |||
| 974 | /** |
||
| 975 | * Returns the title of the link |
||
| 976 | * |
||
| 977 | 11 | * @return string |
|
| 978 | */ |
||
| 979 | 11 | public function getLinkTitle() |
|
| 983 | 11 | ||
| 984 | 11 | /** |
|
| 985 | 1 | * Splits link to an array respection that a title with more than one word is |
|
| 986 | 1 | * surrounded by quotation marks. Returns part of the link for usage in fluid |
|
| 987 | 11 | * viewhelpers. |
|
| 988 | * |
||
| 989 | * @param int $part The part |
||
| 990 | * |
||
| 991 | * @return string |
||
| 992 | */ |
||
| 993 | public function getLinkPart($part) |
||
| 1005 | |||
| 1006 | /** |
||
| 1007 | 1 | * Sets topEvent |
|
| 1008 | * |
||
| 1009 | 1 | * @param bool $topEvent TopEvent |
|
| 1010 | * |
||
| 1011 | * @return void |
||
| 1012 | */ |
||
| 1013 | public function setTopEvent($topEvent) |
||
| 1017 | 2 | ||
| 1018 | /** |
||
| 1019 | 2 | * Returns if topEvent is checked |
|
| 1020 | * |
||
| 1021 | * @return bool |
||
| 1022 | */ |
||
| 1023 | public function getTopEvent() |
||
| 1027 | |||
| 1028 | /** |
||
| 1029 | 1 | * Returns max regisrations per user |
|
| 1030 | * |
||
| 1031 | 1 | * @return int |
|
| 1032 | 1 | */ |
|
| 1033 | public function getMaxRegistrationsPerUser() |
||
| 1037 | |||
| 1038 | /** |
||
| 1039 | * Sets max registrations per user |
||
| 1040 | * |
||
| 1041 | * @param int $maxRegistrationsPerUser MaxRegistrationsPerUser |
||
| 1042 | 1 | * |
|
| 1043 | * @return void |
||
| 1044 | 1 | */ |
|
| 1045 | 1 | public function setMaxRegistrationsPerUser($maxRegistrationsPerUser) |
|
| 1049 | |||
| 1050 | |||
| 1051 | /** |
||
| 1052 | * Adds an additionalImage |
||
| 1053 | * |
||
| 1054 | 1 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $additionalImage The Image |
|
| 1055 | * |
||
| 1056 | 1 | * @return void |
|
| 1057 | 1 | */ |
|
| 1058 | public function addAdditionalImage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $additionalImage) |
||
| 1062 | |||
| 1063 | /** |
||
| 1064 | 1 | * Removes an additionalImage |
|
| 1065 | * |
||
| 1066 | 1 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $additionalImageToRemove The Image |
|
| 1067 | * |
||
| 1068 | * @return void |
||
| 1069 | */ |
||
| 1070 | public function removeAdditionalImage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $additionalImageToRemove) |
||
| 1074 | |||
| 1075 | /** |
||
| 1076 | 3 | * Returns the additionalImage |
|
| 1077 | * |
||
| 1078 | 3 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage $additionalImage |
|
| 1079 | 3 | */ |
|
| 1080 | public function getAdditionalImage() |
||
| 1084 | |||
| 1085 | /** |
||
| 1086 | 6 | * Sets the additionalImage |
|
| 1087 | * |
||
| 1088 | 6 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $additionalImage The Image |
|
| 1089 | * |
||
| 1090 | * @return void |
||
| 1091 | */ |
||
| 1092 | public function setAdditionalImage(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $additionalImage) |
||
| 1096 | |||
| 1097 | /** |
||
| 1098 | 6 | * Returns the organisator |
|
| 1099 | * |
||
| 1100 | 6 | * @return Organisator |
|
| 1101 | 6 | */ |
|
| 1102 | public function getOrganisator() |
||
| 1106 | |||
| 1107 | /** |
||
| 1108 | 27 | * Sets the organisator |
|
| 1109 | * |
||
| 1110 | 27 | * @param Organisator $organisator The organisator |
|
| 1111 | * |
||
| 1112 | * @return void |
||
| 1113 | */ |
||
| 1114 | public function setOrganisator($organisator) |
||
| 1118 | |||
| 1119 | /** |
||
| 1120 | 11 | * Returns notifyAdmin |
|
| 1121 | * |
||
| 1122 | 11 | * @return bool |
|
| 1123 | 11 | */ |
|
| 1124 | public function getNotifyAdmin() |
||
| 1128 | |||
| 1129 | /** |
||
| 1130 | 27 | * Sets notifyAdmin |
|
| 1131 | * |
||
| 1132 | 27 | * @param bool $notifyAdmin NotifyAdmin |
|
| 1133 | * |
||
| 1134 | * @return void |
||
| 1135 | */ |
||
| 1136 | public function setNotifyAdmin($notifyAdmin) |
||
| 1140 | |||
| 1141 | /** |
||
| 1142 | 11 | * Returns if notifyAdmin is set |
|
| 1143 | * |
||
| 1144 | 11 | * @return bool |
|
| 1145 | 11 | */ |
|
| 1146 | public function getNotifyOrganisator() |
||
| 1150 | |||
| 1151 | /** |
||
| 1152 | * Sets notifyOrganisator |
||
| 1153 | * |
||
| 1154 | 4 | * @param bool $notifyOrganisator NotifyOrganisator |
|
| 1155 | * |
||
| 1156 | 4 | * @return void |
|
| 1157 | 4 | */ |
|
| 1158 | public function setNotifyOrganisator($notifyOrganisator) |
||
| 1162 | |||
| 1163 | /** |
||
| 1164 | 5 | * Sets enableCancel |
|
| 1165 | * |
||
| 1166 | 5 | * @param bool $enableCancel EnableCancel |
|
| 1167 | * |
||
| 1168 | * @return void |
||
| 1169 | */ |
||
| 1170 | public function setEnableCancel($enableCancel) |
||
| 1174 | |||
| 1175 | /** |
||
| 1176 | 4 | * Returns if registration can be canceled |
|
| 1177 | * |
||
| 1178 | 4 | * @return bool |
|
| 1179 | 4 | */ |
|
| 1180 | public function getEnableCancel() |
||
| 1184 | |||
| 1185 | /** |
||
| 1186 | 4 | * Sets the cancel deadline |
|
| 1187 | * |
||
| 1188 | 4 | * @param \DateTime $cancelDeadline CancelDeadline |
|
| 1189 | * |
||
| 1190 | * @return void |
||
| 1191 | */ |
||
| 1192 | public function setCancelDeadline(\DateTime $cancelDeadline) |
||
| 1196 | 2 | ||
| 1197 | /** |
||
| 1198 | 2 | * Returns the cancel deadline |
|
| 1199 | * |
||
| 1200 | * @return \DateTime |
||
| 1201 | */ |
||
| 1202 | public function getCancelDeadline() |
||
| 1206 | |||
| 1207 | 1 | /** |
|
| 1208 | * Returns if autoconfirmation is enabled |
||
| 1209 | 1 | * |
|
| 1210 | 1 | * @return bool |
|
| 1211 | */ |
||
| 1212 | public function getEnableAutoconfirm() |
||
| 1216 | |||
| 1217 | 5 | /** |
|
| 1218 | * Sets enable autoconfirm |
||
| 1219 | 5 | * |
|
| 1220 | * @param bool $enableAutoconfirm |
||
| 1221 | * @return void |
||
| 1222 | */ |
||
| 1223 | public function setEnableAutoconfirm($enableAutoconfirm) |
||
| 1227 | |||
| 1228 | 3 | /** |
|
| 1229 | * Returns uniqueEmailCheck |
||
| 1230 | 3 | * |
|
| 1231 | 3 | * @return boolean |
|
| 1232 | */ |
||
| 1233 | public function getUniqueEmailCheck() |
||
| 1237 | |||
| 1238 | /** |
||
| 1239 | * Sets UniqueEmailCheck |
||
| 1240 | 3 | * |
|
| 1241 | * @param boolean $uniqueEmailCheck |
||
| 1242 | 3 | * @return void |
|
| 1243 | 3 | */ |
|
| 1244 | public function setUniqueEmailCheck($uniqueEmailCheck) |
||
| 1248 | |||
| 1249 | /** |
||
| 1250 | * Returns price options |
||
| 1251 | * |
||
| 1252 | 1 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
|
| 1253 | */ |
||
| 1254 | 1 | public function getPriceOptions() |
|
| 1258 | |||
| 1259 | /** |
||
| 1260 | * Sets price options |
||
| 1261 | * |
||
| 1262 | 3 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $priceOptions |
|
| 1263 | * @return void |
||
| 1264 | 3 | */ |
|
| 1265 | 3 | public function setPriceOptions($priceOptions) |
|
| 1269 | 2 | ||
| 1270 | 2 | /** |
|
| 1271 | 3 | * Adds a price option |
|
| 1272 | 3 | * |
|
| 1273 | 3 | * @param \DERHANSEN\SfEventMgt\Domain\Model\PriceOption $priceOption Price option |
|
| 1274 | 3 | * |
|
| 1275 | * @return void |
||
| 1276 | */ |
||
| 1277 | public function addPriceOptions(\DERHANSEN\SfEventMgt\Domain\Model\PriceOption $priceOption) |
||
| 1281 | |||
| 1282 | 2 | /** |
|
| 1283 | * Removes a Registration |
||
| 1284 | 2 | * |
|
| 1285 | 2 | * @param \DERHANSEN\SfEventMgt\Domain\Model\PriceOption $priceOption Price option |
|
| 1286 | * |
||
| 1287 | 1 | * @return void |
|
| 1288 | */ |
||
| 1289 | public function removePriceOptions(\DERHANSEN\SfEventMgt\Domain\Model\PriceOption $priceOption) |
||
| 1293 | |||
| 1294 | /** |
||
| 1295 | * Returns all active price options sorted by date ASC |
||
| 1296 | * |
||
| 1297 | * @return array |
||
| 1298 | */ |
||
| 1299 | 1 | public function getActivePriceOptions() |
|
| 1313 | 3 | ||
| 1314 | 3 | /** |
|
| 1315 | * Returns the current price of the event respecting possible price options |
||
| 1316 | * |
||
| 1317 | * @return float |
||
| 1318 | */ |
||
| 1319 | public function getCurrentPrice() |
||
| 1330 | |||
| 1331 | /** |
||
| 1332 | * Returns registrationWaitlist |
||
| 1333 | * |
||
| 1334 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
||
| 1335 | 1 | */ |
|
| 1336 | public function getRegistrationWaitlist() |
||
| 1340 | |||
| 1341 | /** |
||
| 1342 | * Sets registrationWaitlist |
||
| 1343 | * |
||
| 1344 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $registration Registration |
||
| 1345 | 3 | * |
|
| 1346 | * @return void |
||
| 1347 | 3 | */ |
|
| 1348 | public function setRegistrationWaitlist(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $registration) |
||
| 1352 | |||
| 1353 | /** |
||
| 1354 | * Adds a Registration to the waitlist |
||
| 1355 | * |
||
| 1356 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Registration $registration Registration |
||
| 1357 | * |
||
| 1358 | * @return void |
||
| 1359 | */ |
||
| 1360 | public function addRegistrationWaitlist(\DERHANSEN\SfEventMgt\Domain\Model\Registration $registration) |
||
| 1364 | |||
| 1365 | /** |
||
| 1366 | * Removes a Registration from the waitlist |
||
| 1367 | * |
||
| 1368 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Registration $registrationToRemove Registration |
||
| 1369 | * |
||
| 1370 | * @return void |
||
| 1371 | */ |
||
| 1372 | public function removeRegistrationWaitlist(\DERHANSEN\SfEventMgt\Domain\Model\Registration $registrationToRemove) |
||
| 1376 | |||
| 1377 | /** |
||
| 1378 | * Returns, if cancellation for registrations of the event is possible |
||
| 1379 | * |
||
| 1380 | * @return bool |
||
| 1381 | */ |
||
| 1382 | public function getCancellationPossible() |
||
| 1386 | |||
| 1387 | /** |
||
| 1388 | * Returns speaker |
||
| 1389 | * |
||
| 1390 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
||
| 1391 | */ |
||
| 1392 | public function getSpeaker() |
||
| 1396 | |||
| 1397 | /** |
||
| 1398 | * Sets speaker |
||
| 1399 | * |
||
| 1400 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $speaker |
||
| 1401 | * @return void |
||
| 1402 | */ |
||
| 1403 | public function setSpeaker($speaker) |
||
| 1407 | |||
| 1408 | /** |
||
| 1409 | * Adds a speaker |
||
| 1410 | * |
||
| 1411 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Speaker $speaker |
||
| 1412 | * |
||
| 1413 | * @return void |
||
| 1414 | */ |
||
| 1415 | public function addSpeaker(\DERHANSEN\SfEventMgt\Domain\Model\Speaker $speaker) |
||
| 1419 | |||
| 1420 | /** |
||
| 1421 | * Removes a speaker |
||
| 1422 | * |
||
| 1423 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Speaker $speaker |
||
| 1424 | * |
||
| 1425 | * @return void |
||
| 1426 | */ |
||
| 1427 | public function removeSpeaker(\DERHANSEN\SfEventMgt\Domain\Model\Speaker $speaker) |
||
| 1431 | } |
||
| 1432 |