Passed
Pull Request — 1.11.x (#4088)
by Angel Fernando Quiroz
10:36
created

AgendaEventInvitee::getInvitation()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
/* For licensing terms, see /license.txt */
4
5
namespace Chamilo\CoreBundle\Entity;
6
7
use Chamilo\CoreBundle\Traits\TimestampableTypedEntity;
8
use Chamilo\UserBundle\Entity\User;
9
use Doctrine\ORM\Mapping as ORM;
10
11
/**
12
 * Add @ to the next lineactivating the agenda_collective_invitations configuration setting.
13
 * ORM\Entity().
14
 *
15
 * @ORM\Table(name="agenda_event_invitee")
16
 */
17
class AgendaEventInvitee
18
{
19
    use TimestampableTypedEntity;
20
21
    /**
22
     * @var int
23
     *
24
     * @ORM\Id()
25
     * @ORM\Column(type="bigint")
26
     * @ORM\GeneratedValue
27
     */
28
    protected $id;
29
30
    /**
31
     * @var AgendaEventInvitation|null
32
     *
33
     * @ORM\ManyToOne(targetEntity="AgendaEventInvitation", inversedBy="invitees")
34
     * @ORM\JoinColumn(name="invitation_id", referencedColumnName="id", onDelete="CASCADE")
35
     */
36
    protected $invitation;
37
38
    /**
39
     * @var User|null
40
     *
41
     * @ORM\ManyToOne(targetEntity="Chamilo\UserBundle\Entity\User")
42
     * @ORM\JoinColumn(name="user_id", referencedColumnName="id", nullable=true, onDelete="SET NULL")
43
     */
44
    protected $user;
45
46
    public function getId(): int
47
    {
48
        return $this->id;
49
    }
50
51
    public function getInvitation(): ?AgendaEventInvitation
52
    {
53
        return $this->invitation;
54
    }
55
56
    public function setInvitation(?AgendaEventInvitation $invitation): AgendaEventInvitee
57
    {
58
        $this->invitation = $invitation;
59
60
        return $this;
61
    }
62
63
    public function getUser(): ?User
64
    {
65
        return $this->user;
66
    }
67
68
    public function setUser(?User $user): AgendaEventInvitee
69
    {
70
        $this->user = $user;
71
72
        return $this;
73
    }
74
}
75