Passed
Push — master ( 30a646...7ef6af )
by Julito
29:23
created

CGroupInfo::setCId()   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
/* For licensing terms, see /license.txt */
3
4
namespace Chamilo\CourseBundle\Entity;
5
6
use Chamilo\CoreBundle\Entity\Course;
7
use Chamilo\CoreBundle\Traits\CourseTrait;
8
use Doctrine\ORM\Mapping as ORM;
9
10
/**
11
 * CGroupInfo.
12
 *
13
 * @ORM\Table(
14
 *  name="c_group_info",
15
 *  indexes={
16
 *      @ORM\Index(name="course", columns={"c_id"}),
17
 *      @ORM\Index(name="session_id", columns={"session_id"})
18
 *  }
19
 * )
20
 * @ORM\Entity
21
 */
22
class CGroupInfo
23
{
24
    use CourseTrait;
25
26
    /**
27
     * @var int
28
     *
29
     * @ORM\Column(name="iid", type="integer")
30
     * @ORM\Id
31
     * @ORM\GeneratedValue
32
     */
33
    protected $iid;
34
35
    /**
36
     * @var int
37
     *
38
     * @ORM\Column(name="id", type="integer", nullable=true)
39
     */
40
    protected $id;
41
42
    /**
43
     * @var string
44
     *
45
     * @ORM\Column(name="name", type="string", length=100, nullable=true)
46
     */
47
    protected $name;
48
49
    /**
50
     * @var bool
51
     *
52
     * @ORM\Column(name="status", type="boolean", nullable=true)
53
     */
54
    protected $status;
55
56
    /**
57
     * @var int
58
     *
59
     * @ORM\Column(name="category_id", type="integer", nullable=true)
60
     */
61
    protected $categoryId;
62
63
    /**
64
     * @var string
65
     *
66
     * @ORM\Column(name="description", type="text", nullable=true)
67
     */
68
    protected $description;
69
70
    /**
71
     * @var int
72
     *
73
     * @ORM\Column(name="max_student", type="integer", nullable=false)
74
     */
75
    protected $maxStudent;
76
77
    /**
78
     * @var bool
79
     *
80
     * @ORM\Column(name="doc_state", type="boolean", nullable=false)
81
     */
82
    protected $docState;
83
84
    /**
85
     * @var bool
86
     *
87
     * @ORM\Column(name="calendar_state", type="boolean", nullable=false)
88
     */
89
    protected $calendarState;
90
91
    /**
92
     * @var bool
93
     *
94
     * @ORM\Column(name="work_state", type="boolean", nullable=false)
95
     */
96
    protected $workState;
97
98
    /**
99
     * @var bool
100
     *
101
     * @ORM\Column(name="announcements_state", type="boolean", nullable=false)
102
     */
103
    protected $announcementsState;
104
105
    /**
106
     * @var bool
107
     *
108
     * @ORM\Column(name="forum_state", type="boolean", nullable=false)
109
     */
110
    protected $forumState;
111
112
    /**
113
     * @var bool
114
     *
115
     * @ORM\Column(name="wiki_state", type="boolean", nullable=false)
116
     */
117
    protected $wikiState;
118
119
    /**
120
     * @var bool
121
     *
122
     * @ORM\Column(name="chat_state", type="boolean", nullable=false)
123
     */
124
    protected $chatState;
125
126
    /**
127
     * @var string
128
     *
129
     * @ORM\Column(name="secret_directory", type="string", length=255, nullable=true)
130
     */
131
    protected $secretDirectory;
132
133
    /**
134
     * @var bool
135
     *
136
     * @ORM\Column(name="self_registration_allowed", type="boolean", nullable=false)
137
     */
138
    protected $selfRegistrationAllowed;
139
140
    /**
141
     * @var bool
142
     *
143
     * @ORM\Column(name="self_unregistration_allowed", type="boolean", nullable=false)
144
     */
145
    protected $selfUnregistrationAllowed;
146
147
    /**
148
     * @var int
149
     *
150
     * @ORM\Column(name="session_id", type="integer", nullable=false)
151
     */
152
    protected $sessionId;
153
154
    /**
155
     * @var int
156
     *
157
     * ORM\Column(name="doc_access", type="integer", nullable=false, options={"default":0})
158
     */
159
    protected $docAccess;
160
161
    /**
162
     * @var int
163
     *
164
     * @ORM\Column(name="document_access", type="integer", nullable=false, options={"default":0})
165
     */
166
    protected $documentAccess;
167
168
    /**
169
     * @var Course
170
     *
171
     * @ORM\ManyToOne(targetEntity="Chamilo\CoreBundle\Entity\Course", inversedBy="courses", cascade={"persist"})
172
     * @ORM\JoinColumn(name="c_id", referencedColumnName="id", nullable=false)
173
     */
174
    protected $course;
175
176
    /**
177
     * Set name.
178
     *
179
     * @param string $name
180
     *
181
     * @return CGroupInfo
182
     */
183
    public function setName($name)
184
    {
185
        $this->name = $name;
186
187
        return $this;
188
    }
189
190
    /**
191
     * Get name.
192
     *
193
     * @return string
194
     */
195
    public function getName()
196
    {
197
        return $this->name;
198
    }
199
200
    /**
201
     * Set status.
202
     *
203
     * @param bool $status
204
     *
205
     * @return CGroupInfo
206
     */
207
    public function setStatus($status)
208
    {
209
        $this->status = $status;
210
211
        return $this;
212
    }
213
214
    /**
215
     * Get status.
216
     *
217
     * @return bool
218
     */
219
    public function getStatus()
220
    {
221
        return $this->status;
222
    }
223
224
    /**
225
     * Set categoryId.
226
     *
227
     * @param int $categoryId
228
     *
229
     * @return CGroupInfo
230
     */
231
    public function setCategoryId($categoryId)
232
    {
233
        $this->categoryId = $categoryId;
234
235
        return $this;
236
    }
237
238
    /**
239
     * Get categoryId.
240
     *
241
     * @return int
242
     */
243
    public function getCategoryId()
244
    {
245
        return $this->categoryId;
246
    }
247
248
    /**
249
     * Set description.
250
     *
251
     * @param string $description
252
     *
253
     * @return CGroupInfo
254
     */
255
    public function setDescription($description)
256
    {
257
        $this->description = $description;
258
259
        return $this;
260
    }
261
262
    /**
263
     * Get description.
264
     *
265
     * @return string
266
     */
267
    public function getDescription()
268
    {
269
        return $this->description;
270
    }
271
272
    /**
273
     * Set maxStudent.
274
     *
275
     * @param int $maxStudent
276
     *
277
     * @return CGroupInfo
278
     */
279
    public function setMaxStudent($maxStudent)
280
    {
281
        $this->maxStudent = $maxStudent;
282
283
        return $this;
284
    }
285
286
    /**
287
     * Get maxStudent.
288
     *
289
     * @return int
290
     */
291
    public function getMaxStudent()
292
    {
293
        return $this->maxStudent;
294
    }
295
296
    /**
297
     * Set docState.
298
     *
299
     * @param bool $docState
300
     *
301
     * @return CGroupInfo
302
     */
303
    public function setDocState($docState)
304
    {
305
        $this->docState = $docState;
306
307
        return $this;
308
    }
309
310
    /**
311
     * Get docState.
312
     *
313
     * @return bool
314
     */
315
    public function getDocState()
316
    {
317
        return $this->docState;
318
    }
319
320
    /**
321
     * Set calendarState.
322
     *
323
     * @param bool $calendarState
324
     *
325
     * @return CGroupInfo
326
     */
327
    public function setCalendarState($calendarState)
328
    {
329
        $this->calendarState = $calendarState;
330
331
        return $this;
332
    }
333
334
    /**
335
     * Get calendarState.
336
     *
337
     * @return bool
338
     */
339
    public function getCalendarState()
340
    {
341
        return $this->calendarState;
342
    }
343
344
    /**
345
     * Set workState.
346
     *
347
     * @param bool $workState
348
     *
349
     * @return CGroupInfo
350
     */
351
    public function setWorkState($workState)
352
    {
353
        $this->workState = $workState;
354
355
        return $this;
356
    }
357
358
    /**
359
     * Get workState.
360
     *
361
     * @return bool
362
     */
363
    public function getWorkState()
364
    {
365
        return $this->workState;
366
    }
367
368
    /**
369
     * Set announcementsState.
370
     *
371
     * @param bool $announcementsState
372
     *
373
     * @return CGroupInfo
374
     */
375
    public function setAnnouncementsState($announcementsState)
376
    {
377
        $this->announcementsState = $announcementsState;
378
379
        return $this;
380
    }
381
382
    /**
383
     * Get announcementsState.
384
     *
385
     * @return bool
386
     */
387
    public function getAnnouncementsState()
388
    {
389
        return $this->announcementsState;
390
    }
391
392
    /**
393
     * Set forumState.
394
     *
395
     * @param bool $forumState
396
     *
397
     * @return CGroupInfo
398
     */
399
    public function setForumState($forumState)
400
    {
401
        $this->forumState = $forumState;
402
403
        return $this;
404
    }
405
406
    /**
407
     * Get forumState.
408
     *
409
     * @return bool
410
     */
411
    public function getForumState()
412
    {
413
        return $this->forumState;
414
    }
415
416
    /**
417
     * Set wikiState.
418
     *
419
     * @param bool $wikiState
420
     *
421
     * @return CGroupInfo
422
     */
423
    public function setWikiState($wikiState)
424
    {
425
        $this->wikiState = $wikiState;
426
427
        return $this;
428
    }
429
430
    /**
431
     * Get wikiState.
432
     *
433
     * @return bool
434
     */
435
    public function getWikiState()
436
    {
437
        return $this->wikiState;
438
    }
439
440
    /**
441
     * Set chatState.
442
     *
443
     * @param bool $chatState
444
     *
445
     * @return CGroupInfo
446
     */
447
    public function setChatState($chatState)
448
    {
449
        $this->chatState = $chatState;
450
451
        return $this;
452
    }
453
454
    /**
455
     * Get chatState.
456
     *
457
     * @return bool
458
     */
459
    public function getChatState()
460
    {
461
        return $this->chatState;
462
    }
463
464
    /**
465
     * Set secretDirectory.
466
     *
467
     * @param string $secretDirectory
468
     *
469
     * @return CGroupInfo
470
     */
471
    public function setSecretDirectory($secretDirectory)
472
    {
473
        $this->secretDirectory = $secretDirectory;
474
475
        return $this;
476
    }
477
478
    /**
479
     * Get secretDirectory.
480
     *
481
     * @return string
482
     */
483
    public function getSecretDirectory()
484
    {
485
        return $this->secretDirectory;
486
    }
487
488
    /**
489
     * Set selfRegistrationAllowed.
490
     *
491
     * @param bool $selfRegistrationAllowed
492
     *
493
     * @return CGroupInfo
494
     */
495
    public function setSelfRegistrationAllowed($selfRegistrationAllowed)
496
    {
497
        $this->selfRegistrationAllowed = $selfRegistrationAllowed;
498
499
        return $this;
500
    }
501
502
    /**
503
     * Get selfRegistrationAllowed.
504
     *
505
     * @return bool
506
     */
507
    public function getSelfRegistrationAllowed()
508
    {
509
        return $this->selfRegistrationAllowed;
510
    }
511
512
    /**
513
     * Set selfUnregistrationAllowed.
514
     *
515
     * @param bool $selfUnregistrationAllowed
516
     *
517
     * @return CGroupInfo
518
     */
519
    public function setSelfUnregistrationAllowed($selfUnregistrationAllowed)
520
    {
521
        $this->selfUnregistrationAllowed = $selfUnregistrationAllowed;
522
523
        return $this;
524
    }
525
526
    /**
527
     * Get selfUnregistrationAllowed.
528
     *
529
     * @return bool
530
     */
531
    public function getSelfUnregistrationAllowed()
532
    {
533
        return $this->selfUnregistrationAllowed;
534
    }
535
536
    /**
537
     * Set sessionId.
538
     *
539
     * @param int $sessionId
540
     *
541
     * @return CGroupInfo
542
     */
543
    public function setSessionId($sessionId)
544
    {
545
        $this->sessionId = $sessionId;
546
547
        return $this;
548
    }
549
550
    /**
551
     * Get sessionId.
552
     *
553
     * @return int
554
     */
555
    public function getSessionId()
556
    {
557
        return $this->sessionId;
558
    }
559
560
    /**
561
     * Set id.
562
     *
563
     * @param int $id
564
     *
565
     * @return CGroupInfo
566
     */
567
    public function setId($id)
568
    {
569
        $this->id = $id;
570
571
        return $this;
572
    }
573
574
    /**
575
     * Get id.
576
     *
577
     * @return int
578
     */
579
    public function getId()
580
    {
581
        return $this->id;
582
    }
583
584
    /**
585
     * @return int
586
     */
587
    public function getDocumentAccess(): int
588
    {
589
        return $this->documentAccess;
590
    }
591
592
    /**
593
     * @param int $documentAccess
594
     *
595
     * @return CGroupInfo
596
     */
597
    public function setDocumentAccess(int $documentAccess): CGroupInfo
598
    {
599
        $this->documentAccess = $documentAccess;
600
601
        return $this;
602
    }
603
}
604