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

UserCourseCategory::getUserId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
/* For licensing terms, see /license.txt */
4
5
namespace Chamilo\CoreBundle\Entity;
6
7
use Doctrine\ORM\Mapping as ORM;
8
9
/**
10
 * UserCourseCategory.
11
 *
12
 * @ORM\Table(name="user_course_category", indexes={@ORM\Index(name="idx_user_c_cat_uid", columns={"user_id"})})
13
 * @ORM\Entity
14
 */
15
class UserCourseCategory
16
{
17
    /**
18
     * @var int
19
     *
20
     * @ORM\Column(name="id", type="integer")
21
     * @ORM\Id
22
     * @ORM\GeneratedValue
23
     */
24
    protected $id;
25
26
    /**
27
     * @var User
28
     * @ORM\ManyToOne (
29
     *    targetEntity="Chamilo\CoreBundle\Entity\User",
30
     *    inversedBy="userCourseCategorys"
31
     * )
32
     * @ORM\JoinColumn(
33
     *    name="user_id",
34
     *    referencedColumnName="id",
35
     *    onDelete="CASCADE"
36
     * )
37
     */
38
    protected $user;
39
40
    /**
41
     * Get user.
42
     *
43
     */
44
    public function getUser(): User
45
    {
46
        return $this->user;
47
    }
48
49
    /**
50
     * Set user.
51
     *
52
     */
53
    public function setUser($user)
54
    {
55
        $this->user = $user;
56
57
        return $this;
58
    }
59
60
    /**
61
     * @var string
62
     *
63
     * @ORM\Column(name="title", type="text", nullable=false)
64
     */
65
    protected $title;
66
67
    /**
68
     * @var int
69
     *
70
     * @ORM\Column(name="sort", type="integer", nullable=true)
71
     */
72
    protected $sort;
73
74
    /**
75
     * @var bool
76
     *
77
     * @ORM\Column(name="collapsed", type="boolean", nullable=true)
78
     */
79
    protected $isCollapsed;
80
81
    /**
82
     * Set title.
83
     *
84
     * @param string $title
85
     *
86
     * @return UserCourseCategory
87
     */
88
    public function setTitle($title)
89
    {
90
        $this->title = $title;
91
92
        return $this;
93
    }
94
95
    /**
96
     * Get title.
97
     *
98
     * @return string
99
     */
100
    public function getTitle()
101
    {
102
        return $this->title;
103
    }
104
105
    /**
106
     * Set sort.
107
     *
108
     * @param int $sort
109
     *
110
     * @return UserCourseCategory
111
     */
112
    public function setSort($sort)
113
    {
114
        $this->sort = $sort;
115
116
        return $this;
117
    }
118
119
    /**
120
     * Get sort.
121
     *
122
     * @return int
123
     */
124
    public function getSort()
125
    {
126
        return $this->sort;
127
    }
128
129
    /**
130
     * Get id.
131
     *
132
     * @return int
133
     */
134
    public function getId()
135
    {
136
        return $this->id;
137
    }
138
}
139