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 | * Title |
||
| 22 | * |
||
| 23 | * @var string |
||
| 24 | * @validate NotEmpty |
||
| 25 | */ |
||
| 26 | protected $title = ''; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Teaser |
||
| 30 | * |
||
| 31 | * @var string |
||
| 32 | */ |
||
| 33 | protected $teaser = ''; |
||
| 34 | |||
| 35 | /** |
||
| 36 | * Description |
||
| 37 | * |
||
| 38 | * @var string |
||
| 39 | */ |
||
| 40 | protected $description = ''; |
||
| 41 | |||
| 42 | /** |
||
| 43 | * Program/Schedule |
||
| 44 | * |
||
| 45 | * @var string |
||
| 46 | */ |
||
| 47 | protected $program = ''; |
||
| 48 | |||
| 49 | /** |
||
| 50 | * Startdate and time |
||
| 51 | * |
||
| 52 | * @var \DateTime |
||
| 53 | */ |
||
| 54 | protected $startdate = null; |
||
| 55 | |||
| 56 | /** |
||
| 57 | * Enddate and time |
||
| 58 | * |
||
| 59 | * @var \DateTime |
||
| 60 | */ |
||
| 61 | protected $enddate = null; |
||
| 62 | |||
| 63 | /** |
||
| 64 | * Max participants |
||
| 65 | * |
||
| 66 | * @var int |
||
| 67 | */ |
||
| 68 | protected $maxParticipants = 0; |
||
| 69 | |||
| 70 | /** |
||
| 71 | * Max registrations per user |
||
| 72 | * |
||
| 73 | * @var int |
||
| 74 | */ |
||
| 75 | protected $maxRegistrationsPerUser = 1; |
||
| 76 | |||
| 77 | /** |
||
| 78 | * Price |
||
| 79 | * |
||
| 80 | * @var float |
||
| 81 | */ |
||
| 82 | protected $price = 0.0; |
||
| 83 | |||
| 84 | /** |
||
| 85 | * Currency |
||
| 86 | * |
||
| 87 | * @var string |
||
| 88 | */ |
||
| 89 | protected $currency = ''; |
||
| 90 | |||
| 91 | /** |
||
| 92 | * Enable payment |
||
| 93 | * |
||
| 94 | * @var bool |
||
| 95 | */ |
||
| 96 | protected $enablePayment = false; |
||
| 97 | |||
| 98 | /** |
||
| 99 | * Restrict payment methods |
||
| 100 | * |
||
| 101 | * @var bool |
||
| 102 | */ |
||
| 103 | protected $restrictPaymentMethods = false; |
||
| 104 | |||
| 105 | /** |
||
| 106 | * Selected payment methods |
||
| 107 | * |
||
| 108 | * @var string |
||
| 109 | */ |
||
| 110 | protected $selectedPaymentMethods = ''; |
||
| 111 | |||
| 112 | /** |
||
| 113 | * Category |
||
| 114 | * |
||
| 115 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\Category> |
||
| 116 | * @lazy |
||
| 117 | */ |
||
| 118 | protected $category = null; |
||
| 119 | |||
| 120 | /** |
||
| 121 | * Related |
||
| 122 | * |
||
| 123 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DERHANSEN\SfEventMgt\Domain\Model\Event> |
||
| 124 | * @lazy |
||
| 125 | */ |
||
| 126 | protected $related; |
||
| 127 | |||
| 128 | /** |
||
| 129 | * Registration |
||
| 130 | * |
||
| 131 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DERHANSEN\SfEventMgt\Domain\Model\Registration> |
||
| 132 | * @cascade remove |
||
| 133 | * @lazy |
||
| 134 | */ |
||
| 135 | protected $registration = null; |
||
| 136 | |||
| 137 | /** |
||
| 138 | * Registration waitlist |
||
| 139 | * |
||
| 140 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DERHANSEN\SfEventMgt\Domain\Model\Registration> |
||
| 141 | * @lazy |
||
| 142 | */ |
||
| 143 | protected $registrationWaitlist; |
||
| 144 | |||
| 145 | /** |
||
| 146 | * Registration fields |
||
| 147 | * |
||
| 148 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DERHANSEN\SfEventMgt\Domain\Model\Registration\Field> |
||
| 149 | * @lazy |
||
| 150 | */ |
||
| 151 | protected $registrationFields; |
||
| 152 | |||
| 153 | /** |
||
| 154 | * Registration deadline date |
||
| 155 | * |
||
| 156 | * @var \DateTime |
||
| 157 | */ |
||
| 158 | protected $registrationDeadline = null; |
||
| 159 | |||
| 160 | /** |
||
| 161 | * The image |
||
| 162 | * |
||
| 163 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference> |
||
| 164 | * @lazy |
||
| 165 | */ |
||
| 166 | protected $image = null; |
||
| 167 | |||
| 168 | /** |
||
| 169 | * Additional files |
||
| 170 | * |
||
| 171 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference> |
||
| 172 | * @lazy |
||
| 173 | */ |
||
| 174 | protected $files = null; |
||
| 175 | |||
| 176 | /** |
||
| 177 | * The Location |
||
| 178 | * |
||
| 179 | * @var \DERHANSEN\SfEventMgt\Domain\Model\Location |
||
| 180 | */ |
||
| 181 | protected $location = null; |
||
| 182 | |||
| 183 | /** |
||
| 184 | * Enable registration |
||
| 185 | * |
||
| 186 | * @var bool |
||
| 187 | */ |
||
| 188 | protected $enableRegistration = false; |
||
| 189 | |||
| 190 | /** |
||
| 191 | * Enable waitlist |
||
| 192 | * |
||
| 193 | * @var bool |
||
| 194 | */ |
||
| 195 | protected $enableWaitlist = false; |
||
| 196 | |||
| 197 | /** |
||
| 198 | * Link |
||
| 199 | * |
||
| 200 | * @var string |
||
| 201 | */ |
||
| 202 | protected $link; |
||
| 203 | |||
| 204 | /** |
||
| 205 | * Top event |
||
| 206 | * |
||
| 207 | * @var bool |
||
| 208 | */ |
||
| 209 | protected $topEvent = false; |
||
| 210 | |||
| 211 | /** |
||
| 212 | * The additionalImage |
||
| 213 | * |
||
| 214 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference> |
||
| 215 | * @lazy |
||
| 216 | */ |
||
| 217 | protected $additionalImage = null; |
||
| 218 | |||
| 219 | /** |
||
| 220 | * The organisator |
||
| 221 | * |
||
| 222 | * @var \DERHANSEN\SfEventMgt\Domain\Model\Organisator |
||
| 223 | */ |
||
| 224 | protected $organisator = null; |
||
| 225 | |||
| 226 | /** |
||
| 227 | * Notify admin |
||
| 228 | * |
||
| 229 | * @var bool |
||
| 230 | */ |
||
| 231 | protected $notifyAdmin = true; |
||
| 232 | |||
| 233 | /** |
||
| 234 | * Notify organisator |
||
| 235 | * |
||
| 236 | * @var bool |
||
| 237 | */ |
||
| 238 | protected $notifyOrganisator = false; |
||
| 239 | |||
| 240 | /** |
||
| 241 | * Enable cancel of registration |
||
| 242 | * |
||
| 243 | * @var bool |
||
| 244 | */ |
||
| 245 | protected $enableCancel = false; |
||
| 246 | |||
| 247 | /** |
||
| 248 | * Deadline for cancel |
||
| 249 | * |
||
| 250 | * @var \DateTime |
||
| 251 | */ |
||
| 252 | protected $cancelDeadline = null; |
||
| 253 | |||
| 254 | /** |
||
| 255 | * Enable auto confirmation |
||
| 256 | * |
||
| 257 | * @var bool |
||
| 258 | */ |
||
| 259 | protected $enableAutoconfirm = false; |
||
| 260 | |||
| 261 | /** |
||
| 262 | * Unique e-mail check |
||
| 263 | * |
||
| 264 | * @var bool |
||
| 265 | */ |
||
| 266 | protected $uniqueEmailCheck = false; |
||
| 267 | |||
| 268 | /** |
||
| 269 | * Price options |
||
| 270 | * |
||
| 271 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DERHANSEN\SfEventMgt\Domain\Model\PriceOption> |
||
| 272 | * @cascade remove |
||
| 273 | * @lazy |
||
| 274 | */ |
||
| 275 | protected $priceOptions = null; |
||
| 276 | |||
| 277 | 181 | /** |
|
| 278 | * Speaker |
||
| 279 | 181 | * |
|
| 280 | 181 | * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\DERHANSEN\SfEventMgt\Domain\Model\Speaker> |
|
| 281 | 181 | * @lazy |
|
| 282 | 181 | */ |
|
| 283 | 181 | protected $speaker = null; |
|
| 284 | 181 | ||
| 285 | 181 | /** |
|
| 286 | 181 | * Constructor |
|
| 287 | 181 | */ |
|
| 288 | public function __construct() |
||
| 301 | |||
| 302 | /** |
||
| 303 | * Returns the title |
||
| 304 | * |
||
| 305 | * @return string $title |
||
| 306 | 1 | */ |
|
| 307 | public function getTitle() |
||
| 311 | |||
| 312 | /** |
||
| 313 | * Sets the title |
||
| 314 | * |
||
| 315 | * @param string $title Title |
||
| 316 | 1 | * |
|
| 317 | * @return void |
||
| 318 | 1 | */ |
|
| 319 | public function setTitle($title) |
||
| 323 | |||
| 324 | /** |
||
| 325 | * Returns the teaser |
||
| 326 | * |
||
| 327 | * @return string |
||
| 328 | 1 | */ |
|
| 329 | public function getTeaser() |
||
| 333 | |||
| 334 | /** |
||
| 335 | * Sets the teaser |
||
| 336 | * |
||
| 337 | * @param string $teaser Teaser |
||
| 338 | 1 | * |
|
| 339 | * @return void |
||
| 340 | 1 | */ |
|
| 341 | public function setTeaser($teaser) |
||
| 345 | |||
| 346 | /** |
||
| 347 | * Returns the description |
||
| 348 | * |
||
| 349 | * @return string $description |
||
| 350 | 1 | */ |
|
| 351 | public function getDescription() |
||
| 355 | |||
| 356 | /** |
||
| 357 | * Sets the description |
||
| 358 | * |
||
| 359 | * @param string $description Description |
||
| 360 | 1 | * |
|
| 361 | * @return void |
||
| 362 | 1 | */ |
|
| 363 | public function setDescription($description) |
||
| 367 | |||
| 368 | /** |
||
| 369 | * Returns the program |
||
| 370 | * |
||
| 371 | * @return string $program |
||
| 372 | 1 | */ |
|
| 373 | public function getProgram() |
||
| 377 | |||
| 378 | /** |
||
| 379 | * Sets the program |
||
| 380 | * |
||
| 381 | * @param string $program The program |
||
| 382 | 11 | * |
|
| 383 | * @return void |
||
| 384 | 11 | */ |
|
| 385 | public function setProgram($program) |
||
| 389 | |||
| 390 | /** |
||
| 391 | * Returns the startdate |
||
| 392 | * |
||
| 393 | * @return \DateTime $startdate |
||
| 394 | 11 | */ |
|
| 395 | public function getStartdate() |
||
| 399 | |||
| 400 | /** |
||
| 401 | * Sets the startdate |
||
| 402 | * |
||
| 403 | * @param \DateTime $startdate Startdate |
||
| 404 | 1 | * |
|
| 405 | * @return void |
||
| 406 | 1 | */ |
|
| 407 | public function setStartdate(\DateTime $startdate) |
||
| 411 | |||
| 412 | /** |
||
| 413 | * Returns the enddate |
||
| 414 | * |
||
| 415 | * @return \DateTime $enddate |
||
| 416 | 1 | */ |
|
| 417 | public function getEnddate() |
||
| 421 | |||
| 422 | /** |
||
| 423 | * Sets the enddate |
||
| 424 | * |
||
| 425 | * @param \DateTime $enddate Enddate |
||
| 426 | 14 | * |
|
| 427 | * @return void |
||
| 428 | 14 | */ |
|
| 429 | public function setEnddate(\DateTime $enddate) |
||
| 433 | |||
| 434 | /** |
||
| 435 | * Returns the participants |
||
| 436 | * |
||
| 437 | * @return int $participants |
||
| 438 | 13 | */ |
|
| 439 | public function getMaxParticipants() |
||
| 443 | |||
| 444 | /** |
||
| 445 | * Sets the participants |
||
| 446 | * |
||
| 447 | * @param int $participants Participants |
||
| 448 | 1 | * |
|
| 449 | * @return void |
||
| 450 | 1 | */ |
|
| 451 | public function setMaxParticipants($participants) |
||
| 455 | |||
| 456 | /** |
||
| 457 | * Returns the price |
||
| 458 | * |
||
| 459 | * @return float $price |
||
| 460 | 3 | */ |
|
| 461 | public function getPrice() |
||
| 465 | |||
| 466 | /** |
||
| 467 | * Sets the price |
||
| 468 | * |
||
| 469 | * @param float $price Price |
||
| 470 | 1 | * |
|
| 471 | * @return void |
||
| 472 | 1 | */ |
|
| 473 | public function setPrice($price) |
||
| 477 | |||
| 478 | /** |
||
| 479 | * Returns the currency |
||
| 480 | * |
||
| 481 | * @return string $currency |
||
| 482 | 1 | */ |
|
| 483 | public function getCurrency() |
||
| 487 | |||
| 488 | /** |
||
| 489 | * Sets the currency |
||
| 490 | * |
||
| 491 | * @param string $currency Currency |
||
| 492 | 4 | * |
|
| 493 | * @return void |
||
| 494 | 4 | */ |
|
| 495 | public function setCurrency($currency) |
||
| 499 | |||
| 500 | /** |
||
| 501 | * Returns if payment is enabled |
||
| 502 | * |
||
| 503 | 3 | * @return boolean |
|
| 504 | */ |
||
| 505 | 3 | public function getEnablePayment() |
|
| 509 | |||
| 510 | /** |
||
| 511 | * Sets enablePayment |
||
| 512 | * |
||
| 513 | 3 | * @param boolean $enablePayment |
|
| 514 | * @return void |
||
| 515 | 3 | */ |
|
| 516 | public function setEnablePayment($enablePayment) |
||
| 520 | |||
| 521 | /** |
||
| 522 | * Returns if payment methods should be restricted |
||
| 523 | * |
||
| 524 | 1 | * @return boolean |
|
| 525 | */ |
||
| 526 | 1 | public function getRestrictPaymentMethods() |
|
| 530 | |||
| 531 | /** |
||
| 532 | * Sets if payment methods should be restricted |
||
| 533 | * |
||
| 534 | 2 | * @param boolean $restrictPaymentMethods |
|
| 535 | * @return void |
||
| 536 | 2 | */ |
|
| 537 | public function setRestrictPaymentMethods($restrictPaymentMethods) |
||
| 541 | |||
| 542 | /** |
||
| 543 | * Returns selected payment methods |
||
| 544 | * |
||
| 545 | 1 | * @return string |
|
| 546 | */ |
||
| 547 | 1 | public function getSelectedPaymentMethods() |
|
| 551 | |||
| 552 | /** |
||
| 553 | * Sets selected payment methods |
||
| 554 | * |
||
| 555 | * @param string $selectedPaymentMethods |
||
| 556 | * @return void |
||
| 557 | 1 | */ |
|
| 558 | public function setSelectedPaymentMethods($selectedPaymentMethods) |
||
| 562 | |||
| 563 | /** |
||
| 564 | * Adds a Category |
||
| 565 | * |
||
| 566 | * @param \TYPO3\CMS\Extbase\Domain\Model\Category $category Category |
||
| 567 | * |
||
| 568 | * @return void |
||
| 569 | 1 | */ |
|
| 570 | public function addCategory(\TYPO3\CMS\Extbase\Domain\Model\Category $category) |
||
| 574 | |||
| 575 | /** |
||
| 576 | * Removes a Category |
||
| 577 | * |
||
| 578 | * @param \TYPO3\CMS\Extbase\Domain\Model\Category $categoryToRemove The Category to be removed |
||
| 579 | 1 | * |
|
| 580 | * @return void |
||
| 581 | 1 | */ |
|
| 582 | public function removeCategory(\TYPO3\CMS\Extbase\Domain\Model\Category $categoryToRemove) |
||
| 586 | |||
| 587 | /** |
||
| 588 | * Returns the category |
||
| 589 | * |
||
| 590 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
||
| 591 | 3 | */ |
|
| 592 | public function getCategory() |
||
| 596 | |||
| 597 | /** |
||
| 598 | * Sets the category |
||
| 599 | * |
||
| 600 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $category Category |
||
| 601 | 2 | * |
|
| 602 | * @return void |
||
| 603 | 2 | */ |
|
| 604 | public function setCategory(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $category) |
||
| 608 | |||
| 609 | /** |
||
| 610 | * Returns related events |
||
| 611 | * |
||
| 612 | 3 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
|
| 613 | */ |
||
| 614 | 3 | public function getRelated() |
|
| 618 | |||
| 619 | /** |
||
| 620 | * Sets related events |
||
| 621 | * |
||
| 622 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $related |
||
| 623 | 1 | * @return void |
|
| 624 | */ |
||
| 625 | 1 | public function setRelated($related) |
|
| 629 | |||
| 630 | /** |
||
| 631 | * Adds a related event |
||
| 632 | * |
||
| 633 | * @param Event $event |
||
| 634 | 1 | * @return void |
|
| 635 | */ |
||
| 636 | 1 | public function addRelated(\DERHANSEN\SfEventMgt\Domain\Model\Event $event) |
|
| 640 | |||
| 641 | /** |
||
| 642 | * Removes a related event |
||
| 643 | * |
||
| 644 | * @param Event $event |
||
| 645 | * @return void |
||
| 646 | 2 | */ |
|
| 647 | public function removeRelated(\DERHANSEN\SfEventMgt\Domain\Model\Event $event) |
||
| 651 | |||
| 652 | /** |
||
| 653 | * Adds a Registration |
||
| 654 | * |
||
| 655 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Registration $registration Registration |
||
| 656 | * |
||
| 657 | * @return void |
||
| 658 | 1 | */ |
|
| 659 | public function addRegistration(\DERHANSEN\SfEventMgt\Domain\Model\Registration $registration) |
||
| 663 | |||
| 664 | /** |
||
| 665 | * Removes a Registration |
||
| 666 | * |
||
| 667 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Registration $registrationToRemove Registration |
||
| 668 | 12 | * |
|
| 669 | * @return void |
||
| 670 | 12 | */ |
|
| 671 | public function removeRegistration(\DERHANSEN\SfEventMgt\Domain\Model\Registration $registrationToRemove) |
||
| 675 | |||
| 676 | /** |
||
| 677 | * Returns the Registration |
||
| 678 | * |
||
| 679 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage $registration |
||
| 680 | 9 | */ |
|
| 681 | public function getRegistration() |
||
| 685 | |||
| 686 | /** |
||
| 687 | * Sets the Registration |
||
| 688 | * |
||
| 689 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $registration Registration |
||
| 690 | * |
||
| 691 | * @return void |
||
| 692 | 1 | */ |
|
| 693 | public function setRegistration(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $registration) |
||
| 697 | |||
| 698 | /** |
||
| 699 | * Adds an image |
||
| 700 | * |
||
| 701 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $image Image |
||
| 702 | * |
||
| 703 | * @return void |
||
| 704 | 1 | */ |
|
| 705 | public function addImage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $image) |
||
| 709 | |||
| 710 | /** |
||
| 711 | * Removes an image |
||
| 712 | * |
||
| 713 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $imageToRemove Image |
||
| 714 | 1 | * |
|
| 715 | * @return void |
||
| 716 | 1 | */ |
|
| 717 | public function removeImage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $imageToRemove) |
||
| 721 | |||
| 722 | /** |
||
| 723 | * Returns the image |
||
| 724 | * |
||
| 725 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage $image |
||
| 726 | 3 | */ |
|
| 727 | public function getImage() |
||
| 731 | |||
| 732 | /** |
||
| 733 | * Sets the image |
||
| 734 | * |
||
| 735 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $image Image |
||
| 736 | * |
||
| 737 | * @return void |
||
| 738 | 2 | */ |
|
| 739 | public function setImage(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $image) |
||
| 743 | |||
| 744 | /** |
||
| 745 | * Adds a file |
||
| 746 | * |
||
| 747 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $file File |
||
| 748 | * |
||
| 749 | * @return void |
||
| 750 | 1 | */ |
|
| 751 | public function addFiles(\TYPO3\CMS\Extbase\Domain\Model\FileReference $file) |
||
| 755 | |||
| 756 | /** |
||
| 757 | * Removes a file |
||
| 758 | * |
||
| 759 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $fileToRemove File |
||
| 760 | 1 | * |
|
| 761 | * @return void |
||
| 762 | 1 | */ |
|
| 763 | public function removeFiles(\TYPO3\CMS\Extbase\Domain\Model\FileReference $fileToRemove) |
||
| 767 | |||
| 768 | /** |
||
| 769 | * Returns the files |
||
| 770 | * |
||
| 771 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage $files |
||
| 772 | 3 | */ |
|
| 773 | public function getFiles() |
||
| 777 | |||
| 778 | /** |
||
| 779 | * Sets the files |
||
| 780 | * |
||
| 781 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $files Files |
||
| 782 | 2 | * |
|
| 783 | * @return void |
||
| 784 | 2 | */ |
|
| 785 | public function setFiles(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $files) |
||
| 789 | |||
| 790 | /** |
||
| 791 | * Returns if the registration for this event is logically possible |
||
| 792 | * |
||
| 793 | * @return bool |
||
| 794 | 1 | */ |
|
| 795 | public function getRegistrationPossible() |
||
| 809 | 3 | ||
| 810 | 10 | /** |
|
| 811 | 10 | * Returns the amount of free places |
|
| 812 | 1 | * |
|
| 813 | 1 | * @return int |
|
| 814 | 10 | */ |
|
| 815 | 10 | public function getFreePlaces() |
|
| 819 | |||
| 820 | /** |
||
| 821 | * Sets the location |
||
| 822 | * |
||
| 823 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Location $location Location |
||
| 824 | 5 | * |
|
| 825 | * @return void |
||
| 826 | 5 | */ |
|
| 827 | public function setLocation($location) |
||
| 831 | |||
| 832 | /** |
||
| 833 | * Returns the location |
||
| 834 | * |
||
| 835 | * @return \DERHANSEN\SfEventMgt\Domain\Model\Location |
||
| 836 | 1 | */ |
|
| 837 | public function getLocation() |
||
| 841 | |||
| 842 | /** |
||
| 843 | * Sets enableRegistration |
||
| 844 | * |
||
| 845 | * @param bool $enableRegistration EnableRegistration |
||
| 846 | 1 | * |
|
| 847 | * @return void |
||
| 848 | 1 | */ |
|
| 849 | public function setEnableRegistration($enableRegistration) |
||
| 853 | |||
| 854 | /** |
||
| 855 | * Returns if registration is enabled |
||
| 856 | * |
||
| 857 | * @return bool |
||
| 858 | 10 | */ |
|
| 859 | public function getEnableRegistration() |
||
| 863 | |||
| 864 | /** |
||
| 865 | * Returns enableWaitlist |
||
| 866 | * |
||
| 867 | * @return boolean |
||
| 868 | 8 | */ |
|
| 869 | public function getEnableWaitlist() |
||
| 873 | |||
| 874 | /** |
||
| 875 | * Sets enableWaitlist |
||
| 876 | * |
||
| 877 | * @param boolean $enableWaitlist |
||
| 878 | 4 | * @return void |
|
| 879 | */ |
||
| 880 | 4 | public function setEnableWaitlist($enableWaitlist) |
|
| 884 | |||
| 885 | /** |
||
| 886 | * Sets the registration deadline |
||
| 887 | * |
||
| 888 | * @param \DateTime $registrationDeadline RegistrationDeadline |
||
| 889 | 5 | * |
|
| 890 | * @return void |
||
| 891 | 5 | */ |
|
| 892 | 5 | public function setRegistrationDeadline(\DateTime $registrationDeadline) |
|
| 896 | |||
| 897 | /** |
||
| 898 | * Returns the registration deadline |
||
| 899 | * |
||
| 900 | * @return \DateTime |
||
| 901 | 3 | */ |
|
| 902 | public function getRegistrationDeadline() |
||
| 906 | |||
| 907 | /** |
||
| 908 | * Sets the link |
||
| 909 | * |
||
| 910 | * @param string $link Link |
||
| 911 | 11 | * |
|
| 912 | * @return void |
||
| 913 | 11 | */ |
|
| 914 | public function setLink($link) |
||
| 918 | |||
| 919 | /** |
||
| 920 | * Returns the link |
||
| 921 | * |
||
| 922 | * @return string |
||
| 923 | 12 | */ |
|
| 924 | public function getLink() |
||
| 928 | |||
| 929 | /** |
||
| 930 | * Returns the uri of the link |
||
| 931 | * |
||
| 932 | * @return string |
||
| 933 | 1 | */ |
|
| 934 | public function getLinkUrl() |
||
| 938 | |||
| 939 | /** |
||
| 940 | * Returns the target of the link |
||
| 941 | * |
||
| 942 | * @return string |
||
| 943 | 1 | */ |
|
| 944 | public function getLinkTarget() |
||
| 948 | |||
| 949 | /** |
||
| 950 | * Returns the title of the link |
||
| 951 | * |
||
| 952 | * @return string |
||
| 953 | 1 | */ |
|
| 954 | public function getLinkTitle() |
||
| 958 | |||
| 959 | /** |
||
| 960 | * Splits link to an array respection that a title with more than one word is |
||
| 961 | * surrounded by quotation marks. Returns part of the link for usage in fluid |
||
| 962 | * viewhelpers. |
||
| 963 | 1 | * |
|
| 964 | * @param int $part The part |
||
| 965 | 1 | * |
|
| 966 | * @return string |
||
| 967 | */ |
||
| 968 | public function getLinkPart($part) |
||
| 980 | 11 | ||
| 981 | 11 | /** |
|
| 982 | 11 | * Sets topEvent |
|
| 983 | 11 | * |
|
| 984 | 11 | * @param bool $topEvent TopEvent |
|
| 985 | 1 | * |
|
| 986 | 1 | * @return void |
|
| 987 | 11 | */ |
|
| 988 | public function setTopEvent($topEvent) |
||
| 992 | |||
| 993 | /** |
||
| 994 | * Returns if topEvent is checked |
||
| 995 | * |
||
| 996 | * @return bool |
||
| 997 | 1 | */ |
|
| 998 | public function getTopEvent() |
||
| 1002 | |||
| 1003 | /** |
||
| 1004 | * Returns max regisrations per user |
||
| 1005 | * |
||
| 1006 | * @return int |
||
| 1007 | 1 | */ |
|
| 1008 | public function getMaxRegistrationsPerUser() |
||
| 1012 | |||
| 1013 | /** |
||
| 1014 | * Sets max registrations per user |
||
| 1015 | * |
||
| 1016 | * @param int $maxRegistrationsPerUser MaxRegistrationsPerUser |
||
| 1017 | 2 | * |
|
| 1018 | * @return void |
||
| 1019 | 2 | */ |
|
| 1020 | public function setMaxRegistrationsPerUser($maxRegistrationsPerUser) |
||
| 1024 | |||
| 1025 | |||
| 1026 | /** |
||
| 1027 | * Adds an additionalImage |
||
| 1028 | * |
||
| 1029 | 1 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $additionalImage The Image |
|
| 1030 | * |
||
| 1031 | 1 | * @return void |
|
| 1032 | 1 | */ |
|
| 1033 | public function addAdditionalImage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $additionalImage) |
||
| 1037 | |||
| 1038 | /** |
||
| 1039 | * Removes an additionalImage |
||
| 1040 | * |
||
| 1041 | * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $additionalImageToRemove The Image |
||
| 1042 | 1 | * |
|
| 1043 | * @return void |
||
| 1044 | 1 | */ |
|
| 1045 | 1 | public function removeAdditionalImage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $additionalImageToRemove) |
|
| 1049 | |||
| 1050 | /** |
||
| 1051 | * Returns the additionalImage |
||
| 1052 | * |
||
| 1053 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage $additionalImage |
||
| 1054 | 1 | */ |
|
| 1055 | public function getAdditionalImage() |
||
| 1059 | |||
| 1060 | /** |
||
| 1061 | * Sets the additionalImage |
||
| 1062 | * |
||
| 1063 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $additionalImage The Image |
||
| 1064 | 1 | * |
|
| 1065 | * @return void |
||
| 1066 | 1 | */ |
|
| 1067 | public function setAdditionalImage(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $additionalImage) |
||
| 1071 | |||
| 1072 | /** |
||
| 1073 | * Returns the organisator |
||
| 1074 | * |
||
| 1075 | * @return Organisator |
||
| 1076 | 3 | */ |
|
| 1077 | public function getOrganisator() |
||
| 1081 | |||
| 1082 | /** |
||
| 1083 | * Sets the organisator |
||
| 1084 | * |
||
| 1085 | * @param Organisator $organisator The organisator |
||
| 1086 | 6 | * |
|
| 1087 | * @return void |
||
| 1088 | 6 | */ |
|
| 1089 | public function setOrganisator($organisator) |
||
| 1093 | |||
| 1094 | /** |
||
| 1095 | * Returns notifyAdmin |
||
| 1096 | * |
||
| 1097 | * @return bool |
||
| 1098 | 6 | */ |
|
| 1099 | public function getNotifyAdmin() |
||
| 1103 | |||
| 1104 | /** |
||
| 1105 | * Sets notifyAdmin |
||
| 1106 | * |
||
| 1107 | * @param bool $notifyAdmin NotifyAdmin |
||
| 1108 | 27 | * |
|
| 1109 | * @return void |
||
| 1110 | 27 | */ |
|
| 1111 | public function setNotifyAdmin($notifyAdmin) |
||
| 1115 | |||
| 1116 | /** |
||
| 1117 | * Returns if notifyAdmin is set |
||
| 1118 | * |
||
| 1119 | * @return bool |
||
| 1120 | 11 | */ |
|
| 1121 | public function getNotifyOrganisator() |
||
| 1125 | |||
| 1126 | /** |
||
| 1127 | * Sets notifyOrganisator |
||
| 1128 | * |
||
| 1129 | * @param bool $notifyOrganisator NotifyOrganisator |
||
| 1130 | 27 | * |
|
| 1131 | * @return void |
||
| 1132 | 27 | */ |
|
| 1133 | public function setNotifyOrganisator($notifyOrganisator) |
||
| 1137 | |||
| 1138 | /** |
||
| 1139 | * Sets enableCancel |
||
| 1140 | * |
||
| 1141 | * @param bool $enableCancel EnableCancel |
||
| 1142 | 11 | * |
|
| 1143 | * @return void |
||
| 1144 | 11 | */ |
|
| 1145 | 11 | public function setEnableCancel($enableCancel) |
|
| 1149 | |||
| 1150 | /** |
||
| 1151 | * Returns if registration can be canceled |
||
| 1152 | * |
||
| 1153 | * @return bool |
||
| 1154 | 4 | */ |
|
| 1155 | public function getEnableCancel() |
||
| 1159 | |||
| 1160 | /** |
||
| 1161 | * Sets the cancel deadline |
||
| 1162 | * |
||
| 1163 | * @param \DateTime $cancelDeadline CancelDeadline |
||
| 1164 | 5 | * |
|
| 1165 | * @return void |
||
| 1166 | 5 | */ |
|
| 1167 | public function setCancelDeadline(\DateTime $cancelDeadline) |
||
| 1171 | |||
| 1172 | /** |
||
| 1173 | * Returns the cancel deadline |
||
| 1174 | * |
||
| 1175 | * @return \DateTime |
||
| 1176 | 4 | */ |
|
| 1177 | public function getCancelDeadline() |
||
| 1181 | |||
| 1182 | /** |
||
| 1183 | * Returns if autoconfirmation is enabled |
||
| 1184 | * |
||
| 1185 | * @return bool |
||
| 1186 | 4 | */ |
|
| 1187 | public function getEnableAutoconfirm() |
||
| 1191 | |||
| 1192 | /** |
||
| 1193 | * Sets enable autoconfirm |
||
| 1194 | * |
||
| 1195 | * @param bool $enableAutoconfirm |
||
| 1196 | 2 | * @return void |
|
| 1197 | */ |
||
| 1198 | 2 | public function setEnableAutoconfirm($enableAutoconfirm) |
|
| 1202 | |||
| 1203 | /** |
||
| 1204 | * Returns uniqueEmailCheck |
||
| 1205 | * |
||
| 1206 | * @return boolean |
||
| 1207 | 1 | */ |
|
| 1208 | public function getUniqueEmailCheck() |
||
| 1212 | |||
| 1213 | /** |
||
| 1214 | * Sets UniqueEmailCheck |
||
| 1215 | * |
||
| 1216 | * @param boolean $uniqueEmailCheck |
||
| 1217 | 5 | * @return void |
|
| 1218 | */ |
||
| 1219 | 5 | public function setUniqueEmailCheck($uniqueEmailCheck) |
|
| 1223 | |||
| 1224 | /** |
||
| 1225 | * Returns price options |
||
| 1226 | * |
||
| 1227 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
||
| 1228 | 3 | */ |
|
| 1229 | public function getPriceOptions() |
||
| 1233 | |||
| 1234 | /** |
||
| 1235 | * Sets price options |
||
| 1236 | * |
||
| 1237 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $priceOptions |
||
| 1238 | * @return void |
||
| 1239 | */ |
||
| 1240 | 3 | public function setPriceOptions($priceOptions) |
|
| 1244 | |||
| 1245 | /** |
||
| 1246 | * Adds a price option |
||
| 1247 | * |
||
| 1248 | * @param \DERHANSEN\SfEventMgt\Domain\Model\PriceOption $priceOption Price option |
||
| 1249 | * |
||
| 1250 | * @return void |
||
| 1251 | */ |
||
| 1252 | 1 | public function addPriceOptions(\DERHANSEN\SfEventMgt\Domain\Model\PriceOption $priceOption) |
|
| 1256 | |||
| 1257 | /** |
||
| 1258 | * Removes a Registration |
||
| 1259 | * |
||
| 1260 | * @param \DERHANSEN\SfEventMgt\Domain\Model\PriceOption $priceOption Price option |
||
| 1261 | * |
||
| 1262 | 3 | * @return void |
|
| 1263 | */ |
||
| 1264 | 3 | public function removePriceOptions(\DERHANSEN\SfEventMgt\Domain\Model\PriceOption $priceOption) |
|
| 1268 | 2 | ||
| 1269 | 2 | /** |
|
| 1270 | 2 | * Returns all active price options sorted by date ASC |
|
| 1271 | 3 | * |
|
| 1272 | 3 | * @return array |
|
| 1273 | 3 | */ |
|
| 1274 | 3 | public function getActivePriceOptions() |
|
| 1288 | |||
| 1289 | /** |
||
| 1290 | 1 | * Returns the current price of the event respecting possible price options |
|
| 1291 | * |
||
| 1292 | * @return float |
||
| 1293 | */ |
||
| 1294 | public function getCurrentPrice() |
||
| 1305 | |||
| 1306 | /** |
||
| 1307 | * Returns registrationWaitlist |
||
| 1308 | * |
||
| 1309 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
||
| 1310 | */ |
||
| 1311 | 3 | public function getRegistrationWaitlist() |
|
| 1315 | |||
| 1316 | /** |
||
| 1317 | * Sets registrationWaitlist |
||
| 1318 | * |
||
| 1319 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $registration Registration |
||
| 1320 | * |
||
| 1321 | * @return void |
||
| 1322 | */ |
||
| 1323 | 1 | public function setRegistrationWaitlist(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $registration) |
|
| 1327 | |||
| 1328 | /** |
||
| 1329 | * Adds a Registration to the waitlist |
||
| 1330 | * |
||
| 1331 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Registration $registration Registration |
||
| 1332 | * |
||
| 1333 | * @return void |
||
| 1334 | */ |
||
| 1335 | 1 | public function addRegistrationWaitlist(\DERHANSEN\SfEventMgt\Domain\Model\Registration $registration) |
|
| 1339 | |||
| 1340 | /** |
||
| 1341 | * Removes a Registration from the waitlist |
||
| 1342 | * |
||
| 1343 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Registration $registrationToRemove Registration |
||
| 1344 | * |
||
| 1345 | 3 | * @return void |
|
| 1346 | */ |
||
| 1347 | 3 | public function removeRegistrationWaitlist(\DERHANSEN\SfEventMgt\Domain\Model\Registration $registrationToRemove) |
|
| 1351 | |||
| 1352 | /** |
||
| 1353 | * Returns, if cancellation for registrations of the event is possible |
||
| 1354 | * |
||
| 1355 | * @return bool |
||
| 1356 | */ |
||
| 1357 | public function getCancellationPossible() |
||
| 1361 | |||
| 1362 | /** |
||
| 1363 | * Returns speaker |
||
| 1364 | * |
||
| 1365 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
||
| 1366 | */ |
||
| 1367 | public function getSpeaker() |
||
| 1371 | |||
| 1372 | /** |
||
| 1373 | * Sets speaker |
||
| 1374 | * |
||
| 1375 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $speaker |
||
| 1376 | * @return void |
||
| 1377 | */ |
||
| 1378 | public function setSpeaker($speaker) |
||
| 1382 | |||
| 1383 | /** |
||
| 1384 | * Adds a speaker |
||
| 1385 | * |
||
| 1386 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Speaker $speaker |
||
| 1387 | * |
||
| 1388 | * @return void |
||
| 1389 | */ |
||
| 1390 | public function addSpeaker(\DERHANSEN\SfEventMgt\Domain\Model\Speaker $speaker) |
||
| 1394 | |||
| 1395 | /** |
||
| 1396 | * Removes a speaker |
||
| 1397 | * |
||
| 1398 | * @param \DERHANSEN\SfEventMgt\Domain\Model\Speaker $speaker |
||
| 1399 | * |
||
| 1400 | * @return void |
||
| 1401 | */ |
||
| 1402 | public function removeSpeaker(\DERHANSEN\SfEventMgt\Domain\Model\Speaker $speaker) |
||
| 1406 | |||
| 1407 | /** |
||
| 1408 | * Returns registrationFields |
||
| 1409 | * |
||
| 1410 | * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage |
||
| 1411 | */ |
||
| 1412 | public function getRegistrationFields() |
||
| 1416 | |||
| 1417 | /** |
||
| 1418 | * Sets registrationWaitlist |
||
| 1419 | * |
||
| 1420 | * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $registrationFields |
||
| 1421 | * |
||
| 1422 | * @return void |
||
| 1423 | */ |
||
| 1424 | public function setRegistrationFields(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $registrationFields) |
||
| 1428 | |||
| 1429 | /** |
||
| 1430 | * Adds a registrationField |
||
| 1431 | * |
||
| 1432 | * @param Field $registrationField |
||
| 1433 | */ |
||
| 1434 | public function addRegistrationFields(Field $registrationField) |
||
| 1438 | |||
| 1439 | /** |
||
| 1440 | * Removed a registrationField |
||
| 1441 | * |
||
| 1442 | * @param Field $registrationField |
||
| 1443 | */ |
||
| 1444 | public function removeRegistrationFields(Field $registrationField) |
||
| 1448 | |||
| 1449 | /** |
||
| 1450 | * Returns an array with registration fields |
||
| 1451 | * |
||
| 1452 | * @return array |
||
| 1453 | */ |
||
| 1454 | public function getRegistrationFieldsUids() |
||
| 1462 | } |
||
| 1463 |