Passed
Push — master ( 164a3a...6f5f89 )
by Julito
13:30
created

CLinkCategory   A

Complexity

Total Complexity 18

Size/Duplication

Total Lines 229
Duplicated Lines 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
eloc 32
c 1
b 1
f 0
dl 0
loc 229
rs 10
wmc 18

18 Methods

Rating   Name   Duplication   Size   Complexity  
A getIid() 0 3 1
A setSessionId() 0 5 1
A setDescription() 0 5 1
A getDescription() 0 3 1
A setId() 0 5 1
A setIid() 0 5 1
A getSessionId() 0 3 1
A setCId() 0 5 1
A getId() 0 3 1
A setDisplayOrder() 0 5 1
A getDisplayOrder() 0 3 1
A getResourceName() 0 3 1
A getCategoryTitle() 0 3 1
A getResourceIdentifier() 0 3 1
A __construct() 0 2 1
A __toString() 0 3 1
A setCategoryTitle() 0 5 1
A getCId() 0 3 1
1
<?php
2
3
/* For licensing terms, see /license.txt */
4
5
namespace Chamilo\CourseBundle\Entity;
6
7
use Chamilo\CoreBundle\Entity\Resource\AbstractResource;
8
use Chamilo\CoreBundle\Entity\Resource\ResourceInterface;
9
use Doctrine\ORM\Mapping as ORM;
10
11
/**
12
 * CLinkCategory.
13
 *
14
 * @ORM\Table(
15
 *  name="c_link_category",
16
 *  indexes={
17
 *      @ORM\Index(name="course", columns={"c_id"}),
18
 *      @ORM\Index(name="session_id", columns={"session_id"})
19
 *  }
20
 * )
21
 * @ORM\Entity
22
 */
23
class CLinkCategory extends AbstractResource implements ResourceInterface
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="id", type="integer", nullable=true)
45
     */
46
    protected $id;
47
48
    /**
49
     * @var string
50
     *
51
     * @ORM\Column(name="category_title", type="string", length=255, nullable=false)
52
     */
53
    protected $categoryTitle;
54
55
    /**
56
     * @var string
57
     *
58
     * @ORM\Column(name="description", type="text", nullable=true)
59
     */
60
    protected $description;
61
62
    /**
63
     * @var int
64
     *
65
     * @ORM\Column(name="display_order", type="integer", nullable=false)
66
     */
67
    protected $displayOrder;
68
69
    /**
70
     * @var int
71
     *
72
     * @ORM\Column(name="session_id", type="integer", nullable=true)
73
     */
74
    protected $sessionId;
75
76
    public function __construct()
77
    {
78
    }
79
80
    public function __toString(): string
81
    {
82
        return $this->getCategoryTitle();
83
    }
84
85
    public function getIid(): int
86
    {
87
        return $this->iid;
88
    }
89
90
    public function setIid(int $iid): self
91
    {
92
        $this->iid = $iid;
93
94
        return $this;
95
    }
96
97
    /**
98
     * Set categoryTitle.
99
     *
100
     * @param string $categoryTitle
101
     *
102
     * @return CLinkCategory
103
     */
104
    public function setCategoryTitle($categoryTitle)
105
    {
106
        $this->categoryTitle = $categoryTitle;
107
108
        return $this;
109
    }
110
111
    /**
112
     * Get categoryTitle.
113
     *
114
     * @return string
115
     */
116
    public function getCategoryTitle()
117
    {
118
        return (string) $this->categoryTitle;
119
    }
120
121
    /**
122
     * Set description.
123
     *
124
     * @param string $description
125
     *
126
     * @return CLinkCategory
127
     */
128
    public function setDescription($description)
129
    {
130
        $this->description = $description;
131
132
        return $this;
133
    }
134
135
    /**
136
     * Get description.
137
     *
138
     * @return string
139
     */
140
    public function getDescription()
141
    {
142
        return $this->description;
143
    }
144
145
    /**
146
     * Set displayOrder.
147
     *
148
     * @param int $displayOrder
149
     *
150
     * @return CLinkCategory
151
     */
152
    public function setDisplayOrder($displayOrder)
153
    {
154
        $this->displayOrder = $displayOrder;
155
156
        return $this;
157
    }
158
159
    /**
160
     * Get displayOrder.
161
     *
162
     * @return int
163
     */
164
    public function getDisplayOrder()
165
    {
166
        return $this->displayOrder;
167
    }
168
169
    /**
170
     * Set sessionId.
171
     *
172
     * @param int $sessionId
173
     *
174
     * @return CLinkCategory
175
     */
176
    public function setSessionId($sessionId)
177
    {
178
        $this->sessionId = $sessionId;
179
180
        return $this;
181
    }
182
183
    /**
184
     * Get sessionId.
185
     *
186
     * @return int
187
     */
188
    public function getSessionId()
189
    {
190
        return $this->sessionId;
191
    }
192
193
    /**
194
     * Set id.
195
     *
196
     * @param int $id
197
     *
198
     * @return CLinkCategory
199
     */
200
    public function setId($id)
201
    {
202
        $this->id = $id;
203
204
        return $this;
205
    }
206
207
    /**
208
     * Get id.
209
     *
210
     * @return int
211
     */
212
    public function getId()
213
    {
214
        return $this->id;
215
    }
216
217
    /**
218
     * Set cId.
219
     *
220
     * @param int $cId
221
     *
222
     * @return CLinkCategory
223
     */
224
    public function setCId($cId)
225
    {
226
        $this->cId = $cId;
227
228
        return $this;
229
    }
230
231
    /**
232
     * Get cId.
233
     *
234
     * @return int
235
     */
236
    public function getCId()
237
    {
238
        return $this->cId;
239
    }
240
241
    /**
242
     * Resource identifier.
243
     */
244
    public function getResourceIdentifier(): int
245
    {
246
        return $this->iid;
247
    }
248
249
    public function getResourceName(): string
250
    {
251
        return $this->getCategoryTitle();
252
    }
253
}
254