Completed
Push — master ( c9546d...95f607 )
by Julito
09:41
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 Chamilo\CoreBundle\Traits\UserTrait;
8
use Doctrine\ORM\Mapping as ORM;
9
10
/**
11
 * UserCourseCategory.
12
 *
13
 * @ORM\Table(name="user_course_category", indexes={@ORM\Index(name="idx_user_c_cat_uid", columns={"user_id"})})
14
 * @ORM\Entity
15
 */
16
class UserCourseCategory
17
{
18
    use UserTrait;
19
20
    /**
21
     * @var int
22
     *
23
     * @ORM\Column(name="id", type="integer")
24
     * @ORM\Id
25
     * @ORM\GeneratedValue
26
     */
27
    protected $id;
28
29
    /**
30
     * @var User
31
     *
32
     * @ORM\ManyToOne(targetEntity="Chamilo\CoreBundle\Entity\User", inversedBy="userCourseCategories")
33
     * @ORM\JoinColumn(name="user_id", referencedColumnName="id", onDelete="CASCADE")
34
     */
35
    protected $user;
36
37
    /**
38
     * @var string
39
     *
40
     * @ORM\Column(name="title", type="text", nullable=false)
41
     */
42
    protected $title;
43
44
    /**
45
     * @var int
46
     *
47
     * @ORM\Column(name="sort", type="integer", nullable=true)
48
     */
49
    protected $sort;
50
51
    /**
52
     * @var bool
53
     *
54
     * @ORM\Column(name="collapsed", type="boolean", nullable=true)
55
     */
56
    protected $isCollapsed;
57
58
    /**
59
     * Set title.
60
     *
61
     * @param string $title
62
     *
63
     * @return UserCourseCategory
64
     */
65
    public function setTitle($title)
66
    {
67
        $this->title = $title;
68
69
        return $this;
70
    }
71
72
    /**
73
     * Get title.
74
     *
75
     * @return string
76
     */
77
    public function getTitle()
78
    {
79
        return $this->title;
80
    }
81
82
    /**
83
     * Set sort.
84
     *
85
     * @param int $sort
86
     *
87
     * @return UserCourseCategory
88
     */
89
    public function setSort($sort)
90
    {
91
        $this->sort = $sort;
92
93
        return $this;
94
    }
95
96
    /**
97
     * Get sort.
98
     *
99
     * @return int
100
     */
101
    public function getSort()
102
    {
103
        return $this->sort;
104
    }
105
106
    /**
107
     * Get id.
108
     *
109
     * @return int
110
     */
111
    public function getId()
112
    {
113
        return $this->id;
114
    }
115
}
116