Completed
Pull Request — master (#3464)
by Julito
14:18 queued 01:15
created

CStudentPublicationRelUser::setUser()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 5
rs 10
c 0
b 0
f 0
1
<?php
2
3
/* For licensing terms, see /license.txt */
4
5
namespace Chamilo\CourseBundle\Entity;
6
7
use Doctrine\ORM\Mapping as ORM;
8
use Chamilo\CoreBundle\Entity\User;
9
10
/**
11
 * CStudentPublicationRelUser.
12
 *
13
 * @ORM\Table(
14
 *  name="c_student_publication_rel_user",
15
 *  indexes={
16
 *      @ORM\Index(name="course", columns={"c_id"}),
17
 *      @ORM\Index(name="work", columns={"work_id"}),
18
 *      @ORM\Index(name="user", columns={"user_id"})
19
 *  }
20
 * )
21
 * @ORM\Entity
22
 */
23
class CStudentPublicationRelUser
24
{
25
    /**
26
     * @var int
27
     *
28
     * @ORM\Column(name="iid", type="integer")
29
     * @ORM\Id
30
     * @ORM\GeneratedValue
31
     */
32
    protected $iid;
33
34
    /**
35
     * @var int
36
     *
37
     * @ORM\Column(name="c_id", type="integer")
38
     */
39
    protected $cId;
40
41
    /**
42
     * @var int
43
     *
44
     * @ORM\Column(name="work_id", type="integer", nullable=false)
45
     */
46
    protected $workId;
47
48
    /**
49
     * @var User
50
     * @ORM\ManyToOne (
51
     *    targetEntity="Chamilo\CoreBundle\Entity\User",
52
     *    inversedBy="cStudentPublicationRelUsers"
53
     * )
54
     * @ORM\JoinColumn(
55
     *    name="user_id",
56
     *    referencedColumnName="id",
57
     *    onDelete="CASCADE"
58
     * )
59
     */
60
    protected $user;
61
62
    /**
63
     * Get user.
64
     *
65
     */
66
    public function getUser(): User
67
    {
68
        return $this->user;
69
    }
70
71
    /**
72
     * Set user.
73
     *
74
     */
75
    public function setUser($user)
76
    {
77
        $this->user = $user;
78
79
        return $this;
80
    }
81
82
    /**
83
     * Set workId.
84
     *
85
     * @param int $workId
86
     *
87
     * @return CStudentPublicationRelUser
88
     */
89
    public function setWorkId($workId)
90
    {
91
        $this->workId = $workId;
92
93
        return $this;
94
    }
95
96
    /**
97
     * Get workId.
98
     *
99
     * @return int
100
     */
101
    public function getWorkId()
102
    {
103
        return $this->workId;
104
    }
105
106
    /**
107
     * Set cId.
108
     *
109
     * @param int $cId
110
     *
111
     * @return CStudentPublicationRelUser
112
     */
113
    public function setCId($cId)
114
    {
115
        $this->cId = $cId;
116
117
        return $this;
118
    }
119
120
    /**
121
     * Get cId.
122
     *
123
     * @return int
124
     */
125
    public function getCId()
126
    {
127
        return $this->cId;
128
    }
129
130
    /**
131
     * Get id.
132
     *
133
     * @return int
134
     */
135
    public function getId()
136
    {
137
        return $this->id;
0 ignored issues
show
Bug Best Practice introduced by
The property id does not exist on Chamilo\CourseBundle\Ent...udentPublicationRelUser. Did you maybe forget to declare it?
Loading history...
138
    }
139
}
140