Completed
Push — master ( 9dadb1...edd250 )
by Julito
12:09 queued 19s
created

CGroupCategory::setMaxStudent()   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 Chamilo\CoreBundle\Entity\AbstractResource;
8
use Chamilo\CoreBundle\Entity\ResourceInterface;
9
use Doctrine\ORM\Mapping as ORM;
10
use Symfony\Component\Validator\Constraints as Assert;
11
12
/**
13
 * CGroupCategory.
14
 *
15
 * @ORM\Table(
16
 *  name="c_group_category",
17
 *  indexes={
18
 *  }
19
 * )
20
 * @ORM\Entity
21
 */
22
class CGroupCategory extends AbstractResource implements ResourceInterface
23
{
24
    /**
25
     * @var int
26
     *
27
     * @ORM\Column(name="iid", type="integer")
28
     * @ORM\Id
29
     * @ORM\GeneratedValue
30
     */
31
    protected $iid;
32
33
    /**
34
     * @var string
35
     *
36
     * @Assert\NotBlank()
37
     *
38
     * @ORM\Column(name="title", type="string", length=255, nullable=false)
39
     */
40
    protected $title;
41
42
    /**
43
     * @var string
44
     *
45
     * @ORM\Column(name="description", type="text", nullable=false)
46
     */
47
    protected $description;
48
49
    /**
50
     * @var bool
51
     *
52
     * @ORM\Column(name="doc_state", type="boolean", nullable=false)
53
     */
54
    protected $docState;
55
56
    /**
57
     * @var bool
58
     *
59
     * @ORM\Column(name="calendar_state", type="boolean", nullable=false)
60
     */
61
    protected $calendarState;
62
63
    /**
64
     * @var bool
65
     *
66
     * @ORM\Column(name="work_state", type="boolean", nullable=false)
67
     */
68
    protected $workState;
69
70
    /**
71
     * @var bool
72
     *
73
     * @ORM\Column(name="announcements_state", type="boolean", nullable=false)
74
     */
75
    protected $announcementsState;
76
77
    /**
78
     * @var bool
79
     *
80
     * @ORM\Column(name="forum_state", type="boolean", nullable=false)
81
     */
82
    protected $forumState;
83
84
    /**
85
     * @var bool
86
     *
87
     * @ORM\Column(name="wiki_state", type="boolean", nullable=false)
88
     */
89
    protected $wikiState;
90
91
    /**
92
     * @var bool
93
     *
94
     * @ORM\Column(name="chat_state", type="boolean", nullable=false)
95
     */
96
    protected $chatState;
97
98
    /**
99
     * @var int
100
     *
101
     * @ORM\Column(name="max_student", type="integer", nullable=false)
102
     */
103
    protected $maxStudent;
104
105
    /**
106
     * @var bool
107
     *
108
     * @ORM\Column(name="self_reg_allowed", type="boolean", nullable=false)
109
     */
110
    protected $selfRegAllowed;
111
112
    /**
113
     * @var bool
114
     *
115
     * @ORM\Column(name="self_unreg_allowed", type="boolean", nullable=false)
116
     */
117
    protected $selfUnregAllowed;
118
119
    /**
120
     * @var int
121
     *
122
     * @ORM\Column(name="groups_per_user", type="integer", nullable=false)
123
     */
124
    protected $groupsPerUser;
125
126
    /**
127
     * @var int
128
     *
129
     * @ORM\Column(name="document_access", type="integer", nullable=false, options={"default":0})
130
     */
131
    protected $documentAccess;
132
133
    public function __construct()
134
    {
135
    }
136
137
    public function getIid(): int
138
    {
139
        return $this->iid;
140
    }
141
142
    public function __toString(): string
143
    {
144
        return $this->getTitle();
145
    }
146
147
    /**
148
     * Set title.
149
     *
150
     * @param string $title
151
     *
152
     * @return CGroupCategory
153
     */
154
    public function setTitle($title)
155
    {
156
        $this->title = $title;
157
158
        return $this;
159
    }
160
161
    /**
162
     * Get title.
163
     */
164
    public function getTitle(): string
165
    {
166
        return (string) $this->title;
167
    }
168
169
    /**
170
     * Set description.
171
     *
172
     * @param string $description
173
     */
174
    public function setDescription($description): self
175
    {
176
        $this->description = $description;
177
178
        return $this;
179
    }
180
181
    /**
182
     * Get description.
183
     *
184
     * @return string
185
     */
186
    public function getDescription()
187
    {
188
        return $this->description;
189
    }
190
191
    /**
192
     * Set docState.
193
     *
194
     * @param bool $docState
195
     *
196
     * @return CGroupCategory
197
     */
198
    public function setDocState($docState)
199
    {
200
        $this->docState = $docState;
201
202
        return $this;
203
    }
204
205
    /**
206
     * Get docState.
207
     *
208
     * @return bool
209
     */
210
    public function getDocState()
211
    {
212
        return $this->docState;
213
    }
214
215
    /**
216
     * Set calendarState.
217
     *
218
     * @param bool $calendarState
219
     *
220
     * @return CGroupCategory
221
     */
222
    public function setCalendarState($calendarState)
223
    {
224
        $this->calendarState = $calendarState;
225
226
        return $this;
227
    }
228
229
    /**
230
     * Get calendarState.
231
     *
232
     * @return bool
233
     */
234
    public function getCalendarState()
235
    {
236
        return $this->calendarState;
237
    }
238
239
    /**
240
     * Set workState.
241
     *
242
     * @param bool $workState
243
     *
244
     * @return CGroupCategory
245
     */
246
    public function setWorkState($workState)
247
    {
248
        $this->workState = $workState;
249
250
        return $this;
251
    }
252
253
    /**
254
     * Get workState.
255
     *
256
     * @return bool
257
     */
258
    public function getWorkState()
259
    {
260
        return $this->workState;
261
    }
262
263
    /**
264
     * Set announcementsState.
265
     *
266
     * @param bool $announcementsState
267
     *
268
     * @return CGroupCategory
269
     */
270
    public function setAnnouncementsState($announcementsState)
271
    {
272
        $this->announcementsState = $announcementsState;
273
274
        return $this;
275
    }
276
277
    /**
278
     * Get announcementsState.
279
     *
280
     * @return bool
281
     */
282
    public function getAnnouncementsState()
283
    {
284
        return $this->announcementsState;
285
    }
286
287
    /**
288
     * Set forumState.
289
     *
290
     * @param bool $forumState
291
     *
292
     * @return CGroupCategory
293
     */
294
    public function setForumState($forumState)
295
    {
296
        $this->forumState = $forumState;
297
298
        return $this;
299
    }
300
301
    /**
302
     * Get forumState.
303
     *
304
     * @return bool
305
     */
306
    public function getForumState()
307
    {
308
        return $this->forumState;
309
    }
310
311
    /**
312
     * Set wikiState.
313
     *
314
     * @param bool $wikiState
315
     *
316
     * @return CGroupCategory
317
     */
318
    public function setWikiState($wikiState)
319
    {
320
        $this->wikiState = $wikiState;
321
322
        return $this;
323
    }
324
325
    /**
326
     * Get wikiState.
327
     *
328
     * @return bool
329
     */
330
    public function getWikiState()
331
    {
332
        return $this->wikiState;
333
    }
334
335
    /**
336
     * Set chatState.
337
     *
338
     * @param bool $chatState
339
     *
340
     * @return CGroupCategory
341
     */
342
    public function setChatState($chatState)
343
    {
344
        $this->chatState = $chatState;
345
346
        return $this;
347
    }
348
349
    /**
350
     * Get chatState.
351
     *
352
     * @return bool
353
     */
354
    public function getChatState()
355
    {
356
        return $this->chatState;
357
    }
358
359
    /**
360
     * Set maxStudent.
361
     *
362
     * @param int $maxStudent
363
     *
364
     * @return CGroupCategory
365
     */
366
    public function setMaxStudent($maxStudent)
367
    {
368
        $this->maxStudent = $maxStudent;
369
370
        return $this;
371
    }
372
373
    /**
374
     * Get maxStudent.
375
     *
376
     * @return int
377
     */
378
    public function getMaxStudent()
379
    {
380
        return $this->maxStudent;
381
    }
382
383
    /**
384
     * Set selfRegAllowed.
385
     *
386
     * @param bool $selfRegAllowed
387
     *
388
     * @return CGroupCategory
389
     */
390
    public function setSelfRegAllowed($selfRegAllowed)
391
    {
392
        $this->selfRegAllowed = $selfRegAllowed;
393
394
        return $this;
395
    }
396
397
    /**
398
     * Get selfRegAllowed.
399
     *
400
     * @return bool
401
     */
402
    public function getSelfRegAllowed()
403
    {
404
        return $this->selfRegAllowed;
405
    }
406
407
    /**
408
     * Set selfUnregAllowed.
409
     *
410
     * @param bool $selfUnregAllowed
411
     *
412
     * @return CGroupCategory
413
     */
414
    public function setSelfUnregAllowed($selfUnregAllowed)
415
    {
416
        $this->selfUnregAllowed = $selfUnregAllowed;
417
418
        return $this;
419
    }
420
421
    /**
422
     * Get selfUnregAllowed.
423
     *
424
     * @return bool
425
     */
426
    public function getSelfUnregAllowed()
427
    {
428
        return $this->selfUnregAllowed;
429
    }
430
431
    /**
432
     * Set groupsPerUser.
433
     *
434
     * @param int $groupsPerUser
435
     *
436
     * @return CGroupCategory
437
     */
438
    public function setGroupsPerUser($groupsPerUser)
439
    {
440
        $this->groupsPerUser = $groupsPerUser;
441
442
        return $this;
443
    }
444
445
    /**
446
     * Get groupsPerUser.
447
     *
448
     * @return int
449
     */
450
    public function getGroupsPerUser()
451
    {
452
        return $this->groupsPerUser;
453
    }
454
455
    public function getDocumentAccess(): int
456
    {
457
        return $this->documentAccess;
458
    }
459
460
    public function setDocumentAccess(int $documentAccess): self
461
    {
462
        $this->documentAccess = $documentAccess;
463
464
        return $this;
465
    }
466
467
    public function getResourceIdentifier(): int
468
    {
469
        return $this->iid;
470
    }
471
472
    public function getResourceName(): string
473
    {
474
        return $this->getTitle();
475
    }
476
477
    public function setResourceName(string $name): self
478
    {
479
        return $this->setTitle($name);
480
    }
481
}
482