Completed
Push — development ( 8cdb52...07deae )
by Torben
43:06
created

Registration::getLastname()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
namespace DERHANSEN\SfEventMgt\Domain\Model;
3
4
/*
5
 * This file is part of the TYPO3 CMS project.
6
 *
7
 * It is free software; you can redistribute it and/or modify it under
8
 * the terms of the GNU General Public License, either version 2
9
 * of the License, or any later version.
10
 *
11
 * For the full copyright and license information, please read the
12
 * LICENSE.txt file that was distributed with this source code.
13
 *
14
 * The TYPO3 project - inspiring people to share!
15
 */
16
17
/**
18
 * Registration
19
 *
20
 * @author Torben Hansen <[email protected]>
21
 */
22
class Registration extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
23
{
24
25
    /**
26
     * Firstname
27
     *
28
     * @var string
29
     * @validate NotEmpty
30
     */
31
    protected $firstname = '';
32
33
    /**
34
     * Lastname
35
     *
36
     * @var string
37
     * @validate NotEmpty
38
     */
39
    protected $lastname = '';
40
41
    /**
42
     * Title
43
     *
44
     * @var string
45
     */
46
    protected $title = '';
47
48
    /**
49
     * Company
50
     *
51
     * @var string
52
     */
53
    protected $company = '';
54
55
    /**
56
     * Address
57
     *
58
     * @var string
59
     */
60
    protected $address = '';
61
62
    /**
63
     * Zip
64
     *
65
     * @var string
66
     */
67
    protected $zip = '';
68
69
    /**
70
     * City
71
     *
72
     * @var string
73
     */
74
    protected $city = '';
75
76
    /**
77
     * Country
78
     *
79
     * @var string
80
     */
81
    protected $country = '';
82
83
    /**
84
     * Phone
85
     *
86
     * @var string
87
     */
88
    protected $phone = '';
89
90
    /**
91
     * E-Mail
92
     *
93
     * @var string
94
     * @validate NotEmpty, EmailAddress
95
     */
96
    protected $email = '';
97
98
    /**
99
     * Ignore notifications
100
     *
101
     * @var bool
102
     */
103
    protected $ignoreNotifications = false;
104
105
    /**
106
     * Gender
107
     *
108
     * @var string
109
     */
110
    protected $gender = '';
111
112
    /**
113
     * Date of birth
114
     *
115
     * @var \DateTime
116
     */
117
    protected $dateOfBirth = null;
118
119
    /**
120
     * Accept terms and conditions
121
     *
122
     * @var bool
123
     */
124
    protected $accepttc = false;
125
126
    /**
127
     * Confirmed
128
     *
129
     * @var bool
130
     */
131
    protected $confirmed = false;
132
133
    /**
134
     * Paid
135
     *
136
     * @var bool
137
     */
138
    protected $paid = false;
139
140
    /**
141
     * Notes
142
     *
143
     * @var string
144
     */
145
    protected $notes = '';
146
147
    /**
148
     * Event
149
     *
150
     * @var \DERHANSEN\SfEventMgt\Domain\Model\Event
151
     */
152
    protected $event = null;
153
154
    /**
155
     * Main registration (if available)
156
     *
157
     * @var \DERHANSEN\SfEventMgt\Domain\Model\Registration
158
     */
159
    protected $mainRegistration = null;
160
161
    /**
162
     * DateTime until the registration must be confirmed
163
     *
164
     * @var \DateTime
165
     */
166
    protected $confirmationUntil = null;
167
168
    /**
169
     * Indicates if record is hidden
170
     *
171
     * @var bool
172
     */
173
    protected $hidden = false;
174
175
    /**
176
     * Amount of registrations (if multiple registrations created by one user)
177
     *
178
     * @var int
179
     */
180
    protected $amountOfRegistrations = 1;
181
182
    /**
183
     * The language (e.g. de)
184
     *
185
     * @var string
186
     */
187
    protected $language = '';
188
189
    /**
190
     * reCaptcha
191
     *
192
     * @var string
193
     */
194
    protected $recaptcha = '';
195
196
    /**
197
     * FrontendUser if available
198
     *
199
     * @var \TYPO3\CMS\Extbase\Domain\Model\FrontendUser
200
     */
201
    protected $feUser = null;
202
203
    /**
204
     * Returns the firstname
205
     *
206
     * @return string $firstname
207
     */
208 2
    public function getFirstname()
209
    {
210 2
        return $this->firstname;
211
    }
212
213
    /**
214
     * Sets the firstname
215
     *
216
     * @param string $firstname Firstname
217
     *
218
     * @return void
219
     */
220 22
    public function setFirstname($firstname)
221
    {
222 22
        $this->firstname = $firstname;
223 22
    }
224
225
    /**
226
     * Returns the lastname
227
     *
228
     * @return string $lastname
229
     */
230 2
    public function getLastname()
231
    {
232 2
        return $this->lastname;
233
    }
234
235
    /**
236
     * Sets the lastname
237
     *
238
     * @param string $lastname Lastname
239
     *
240
     * @return void
241
     */
242 22
    public function setLastname($lastname)
243
    {
244 22
        $this->lastname = $lastname;
245 22
    }
246
247
    /**
248
     * Returns the title
249
     *
250
     * @return string $title
251
     */
252 2
    public function getTitle()
253
    {
254 2
        return $this->title;
255
    }
256
257
    /**
258
     * Sets the title
259
     *
260
     * @param string $title Title
261
     *
262
     * @return void
263
     */
264 2
    public function setTitle($title)
265
    {
266 2
        $this->title = $title;
267 2
    }
268
269
    /**
270
     * Returns the company
271
     *
272
     * @return string $company
273
     */
274 2
    public function getCompany()
275
    {
276 2
        return $this->company;
277
    }
278
279
    /**
280
     * Sets the company
281
     *
282
     * @param string $company Company
283
     *
284
     * @return void
285
     */
286 2
    public function setCompany($company)
287
    {
288 2
        $this->company = $company;
289 2
    }
290
291
    /**
292
     * Returns the address
293
     *
294
     * @return string $address
295
     */
296 2
    public function getAddress()
297
    {
298 2
        return $this->address;
299
    }
300
301
    /**
302
     * Sets the address
303
     *
304
     * @param string $address Address
305
     *
306
     * @return void
307
     */
308 2
    public function setAddress($address)
309
    {
310 2
        $this->address = $address;
311 2
    }
312
313
    /**
314
     * Returns the zip
315
     *
316
     * @return string $zip
317
     */
318 2
    public function getZip()
319
    {
320 2
        return $this->zip;
321
    }
322
323
    /**
324
     * Sets the zip
325
     *
326
     * @param string $zip Zip
327
     *
328
     * @return void
329
     */
330 2
    public function setZip($zip)
331
    {
332 2
        $this->zip = $zip;
333 2
    }
334
335
    /**
336
     * Returns the city
337
     *
338
     * @return string $city
339
     */
340 2
    public function getCity()
341
    {
342 2
        return $this->city;
343
    }
344
345
    /**
346
     * Sets the city
347
     *
348
     * @param string $city City
349
     *
350
     * @return void
351
     */
352 2
    public function setCity($city)
353
    {
354 2
        $this->city = $city;
355 2
    }
356
357
    /**
358
     * Returns the country
359
     *
360
     * @return string $country
361
     */
362 2
    public function getCountry()
363
    {
364 2
        return $this->country;
365
    }
366
367
    /**
368
     * Sets the country
369
     *
370
     * @param string $country Country
371
     *
372
     * @return void
373
     */
374 2
    public function setCountry($country)
375
    {
376 2
        $this->country = $country;
377 2
    }
378
379
    /**
380
     * Returns the phone
381
     *
382
     * @return string $phone
383
     */
384 2
    public function getPhone()
385
    {
386 2
        return $this->phone;
387
    }
388
389
    /**
390
     * Sets the phone
391
     *
392
     * @param string $phone Phone
393
     *
394
     * @return void
395
     */
396 2
    public function setPhone($phone)
397
    {
398 2
        $this->phone = $phone;
399 2
    }
400
401
    /**
402
     * Returns the email
403
     *
404
     * @return string $email
405
     */
406 14
    public function getEmail()
407
    {
408 14
        return $this->email;
409
    }
410
411
    /**
412
     * Sets the email
413
     *
414
     * @param string $email E-Mail
415
     *
416
     * @return void
417
     */
418 40
    public function setEmail($email)
419
    {
420 40
        $this->email = $email;
421 40
    }
422
423
    /**
424
     * Returns boolean state of ignoreNotifications
425
     *
426
     * @return bool
427
     */
428 22
    public function isIgnoreNotifications()
429
    {
430 22
        return $this->ignoreNotifications;
431
    }
432
433
    /**
434
     * Returns ignoreNotifications
435
     *
436
     * @return bool
437
     */
438 4
    public function getIgnoreNotifications()
439
    {
440 4
        return $this->ignoreNotifications;
441
    }
442
443
    /**
444
     * Sets ignoreNotifications
445
     *
446
     * @param bool $ignoreNotifications IgnoreNotifications
447
     *
448
     * @return void
449
     */
450 14
    public function setIgnoreNotifications($ignoreNotifications)
451
    {
452 14
        $this->ignoreNotifications = $ignoreNotifications;
453 14
    }
454
455
    /**
456
     * Returns the gender
457
     *
458
     * @return string $gender
459
     */
460 2
    public function getGender()
461
    {
462 2
        return $this->gender;
463
    }
464
465
    /**
466
     * Sets the gender
467
     *
468
     * @param string $gender Gender
469
     *
470
     * @return void
471
     */
472 2
    public function setGender($gender)
473
    {
474 2
        $this->gender = $gender;
475 2
    }
476
477
    /**
478
     * Sets the date of birth
479
     *
480
     * @param \DateTime $dateOfBirth DateOfBirth
481
     *
482
     * @return void
483
     */
484 2
    public function setDateOfBirth($dateOfBirth)
485
    {
486 2
        $this->dateOfBirth = $dateOfBirth;
487 2
    }
488
489
    /**
490
     * Returns the date of birth
491
     *
492
     * @return \DateTime
493
     */
494 2
    public function getDateOfBirth()
495
    {
496 2
        return $this->dateOfBirth;
497
    }
498
499
    /**
500
     * Returns accept terms and conditions
501
     *
502
     * @return bool $accepttc
503
     */
504 2
    public function getAccepttc()
505
    {
506 2
        return $this->accepttc;
507
    }
508
509
    /**
510
     * Sets accept terms and conditions
511
     *
512
     * @param bool $accepttc Accept terms and conditions
513
     *
514
     * @return void
515
     */
516 2
    public function setAccepttc($accepttc)
517
    {
518 2
        $this->accepttc = $accepttc;
519 2
    }
520
521
    /**
522
     * Returns the confirmed
523
     *
524
     * @return bool $confirmed Confirmed
525
     */
526 2
    public function getConfirmed()
527
    {
528 2
        return $this->confirmed;
529
    }
530
531
    /**
532
     * Sets the confirmed
533
     *
534
     * @param bool $confirmed Confirmed
535
     *
536
     * @return void
537
     */
538 10
    public function setConfirmed($confirmed)
539
    {
540 10
        $this->confirmed = $confirmed;
541 10
    }
542
543
    /**
544
     * Returns the boolean state of confirmed
545
     *
546
     * @return bool
547
     */
548 8
    public function isConfirmed()
549
    {
550 8
        return $this->confirmed;
551
    }
552
553
    /**
554
     * Returns the paid
555
     *
556
     * @return bool $paid
557
     */
558 2
    public function getPaid()
559
    {
560 2
        return $this->paid;
561
    }
562
563
    /**
564
     * Sets the paid
565
     *
566
     * @param bool $paid Paid
567
     *
568
     * @return void
569
     */
570 4
    public function setPaid($paid)
571
    {
572 4
        $this->paid = $paid;
573 4
    }
574
575
    /**
576
     * Returns the boolean state of paid
577
     *
578
     * @return bool
579
     */
580 2
    public function isPaid()
581
    {
582 2
        return $this->paid;
583
    }
584
585
    /**
586
     * Sets the event
587
     *
588
     * @param \DERHANSEN\SfEventMgt\Domain\Model\Event $event Event
589
     *
590
     * @return void
591
     */
592 2
    public function setEvent($event)
593
    {
594 2
        $this->event = $event;
595 2
    }
596
597
    /**
598
     * Returns the event
599
     *
600
     * @return \DERHANSEN\SfEventMgt\Domain\Model\Event
601
     */
602 2
    public function getEvent()
603
    {
604 2
        return $this->event;
605
    }
606
607
    /**
608
     * Sets the mainRegistration
609
     *
610
     * @param \DERHANSEN\SfEventMgt\Domain\Model\Registration $registration Registration
611
     *
612
     * @return void
613
     */
614 2
    public function setMainRegistration($registration)
615
    {
616 2
        $this->mainRegistration = $registration;
617 2
    }
618
619
    /**
620
     * Returns the event
621
     *
622
     * @return \DERHANSEN\SfEventMgt\Domain\Model\Registration
623
     */
624 4
    public function getMainRegistration()
625
    {
626 4
        return $this->mainRegistration;
627
    }
628
629
    /**
630
     * Setter for notes
631
     *
632
     * @param string $notes Notes
633
     *
634
     * @return void
635
     */
636 2
    public function setNotes($notes)
637
    {
638 2
        $this->notes = $notes;
639 2
    }
640
641
    /**
642
     * Getter for notes
643
     *
644
     * @return string
645
     */
646 2
    public function getNotes()
647
    {
648 2
        return $this->notes;
649
    }
650
651
    /**
652
     * Sets confirmUntil
653
     *
654
     * @param \DateTime $confirmationUntil Confirmation Until
655
     *
656
     * @return void
657
     */
658 2
    public function setConfirmationUntil($confirmationUntil)
659
    {
660 2
        $this->confirmationUntil = $confirmationUntil;
661 2
    }
662
663
    /**
664
     * Returns confirmationUntil
665
     *
666
     * @return \DateTime
667
     */
668 2
    public function getConfirmationUntil()
669
    {
670 2
        return $this->confirmationUntil;
671
    }
672
673
    /**
674
     * Sets hidden
675
     *
676
     * @param bool $hidden Hidden
677
     *
678
     * @return void
679
     */
680 2
    public function setHidden($hidden)
681
    {
682 2
        $this->hidden = $hidden;
683 2
    }
684
685
    /**
686
     * Returns hidden
687
     *
688
     * @return bool
689
     */
690 4
    public function getHidden()
691
    {
692 4
        return $this->hidden;
693
    }
694
695
    /**
696
     * Returns amountOfRegistrations
697
     *
698
     * @return int
699
     */
700 4
    public function getAmountOfRegistrations()
701
    {
702 4
        return $this->amountOfRegistrations;
703
    }
704
705
    /**
706
     * Sets amountOfRegistrations
707
     *
708
     * @param int $amountOfRegistrations AmountOfRegistrations
709
     *
710
     * @return void
711
     */
712 2
    public function setAmountOfRegistrations($amountOfRegistrations)
713
    {
714 2
        $this->amountOfRegistrations = $amountOfRegistrations;
715 2
    }
716
717
    /**
718
     * Returns the language
719
     *
720
     * @return string
721
     */
722 40
    public function getLanguage()
723
    {
724 40
        return $this->language;
725
    }
726
727
    /**
728
     * Sets the language
729
     *
730
     * @param string $language
731
     * @return void
732
     */
733 2
    public function setLanguage($language)
734
    {
735 2
        $this->language = $language;
736 2
    }
737
738
    /**
739
     * Returns recaptcha
740
     *
741
     * @return string
742
     */
743 4
    public function getRecaptcha()
744
    {
745 4
        return $this->recaptcha;
746
    }
747
748
    /**
749
     * Sets recaptcha
750
     *
751
     * @param string $recaptcha
752
     * @return void
753
     */
754 2
    public function setRecaptcha($recaptcha)
755
    {
756 2
        $this->recaptcha = $recaptcha;
757 2
    }
758
759
    /**
760
     * Returns the frontenduser
761
     *
762
     * @return \TYPO3\CMS\Extbase\Domain\Model\FrontendUser
763
     */
764 4
    public function getFeUser()
765
    {
766 4
        return $this->feUser;
767
    }
768
769
    /**
770
     * Sets the frontenduser
771
     *
772
     * @param \TYPO3\CMS\Extbase\Domain\Model\FrontendUser $feUser
773
     * @return void
774
     */
775 2
    public function setFeUser($feUser)
776
    {
777 2
        $this->feUser = $feUser;
778 2
    }
779
780
}