Completed
Push — master ( 76b5db...d28136 )
by Julito
13:35
created

CLp::setRef()   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\Resource\AbstractResource;
7
use Chamilo\CoreBundle\Entity\Resource\ResourceInterface;
8
use Doctrine\ORM\Mapping as ORM;
9
10
/**
11
 * CLp.
12
 *
13
 * @ORM\Table(
14
 *  name="c_lp",
15
 *  indexes={
16
 *      @ORM\Index(name="course", columns={"c_id"}),
17
 *     @ORM\Index(name="session", columns={"session_id"})
18
 *  }
19
 * )
20
 * @ORM\Entity
21
 */
22
class CLp 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 int
35
     *
36
     * @ORM\Column(name="c_id", type="integer")
37
     */
38
    protected $cId;
39
40
    /**
41
     * @var int
42
     *
43
     * @ORM\Column(name="id", type="integer", nullable=true)
44
     */
45
    protected $id;
46
47
    /**
48
     * @var int
49
     *
50
     * @ORM\Column(name="lp_type", type="integer", nullable=false)
51
     */
52
    protected $lpType;
53
54
    /**
55
     * @var string
56
     *
57
     * @ORM\Column(name="name", type="string", length=255, nullable=false)
58
     */
59
    protected $name;
60
61
    /**
62
     * @var string
63
     *
64
     * @ORM\Column(name="ref", type="text", nullable=true)
65
     */
66
    protected $ref;
67
68
    /**
69
     * @var string
70
     *
71
     * @ORM\Column(name="description", type="text", nullable=true)
72
     */
73
    protected $description;
74
75
    /**
76
     * @var string
77
     *
78
     * @ORM\Column(name="path", type="text", nullable=false)
79
     */
80
    protected $path;
81
82
    /**
83
     * @var bool
84
     *
85
     * @ORM\Column(name="force_commit", type="boolean", nullable=false)
86
     */
87
    protected $forceCommit;
88
89
    /**
90
     * @var string
91
     *
92
     * @ORM\Column(name="default_view_mod", type="string", length=32, nullable=false, options={"default":"embedded"})
93
     */
94
    protected $defaultViewMod;
95
96
    /**
97
     * @var string
98
     *
99
     * @ORM\Column(name="default_encoding", type="string", length=32, nullable=false, options={"default":"UTF-8"})
100
     */
101
    protected $defaultEncoding;
102
103
    /**
104
     * @var int
105
     *
106
     * @ORM\Column(name="display_order", type="integer", nullable=false, options={"default":"0"})
107
     */
108
    protected $displayOrder;
109
110
    /**
111
     * @var string
112
     *
113
     * @ORM\Column(name="content_maker", type="text", nullable=false)
114
     */
115
    protected $contentMaker;
116
117
    /**
118
     * @var string
119
     *
120
     * @ORM\Column(name="content_local", type="string", length=32, nullable=false, options={"default":"local"})
121
     */
122
    protected $contentLocal;
123
124
    /**
125
     * @var string
126
     *
127
     * @ORM\Column(name="content_license", type="text", nullable=false)
128
     */
129
    protected $contentLicense;
130
131
    /**
132
     * @var bool
133
     *
134
     * @ORM\Column(name="prevent_reinit", type="boolean", nullable=false, options={"default":"1"})
135
     */
136
    protected $preventReinit;
137
138
    /**
139
     * @var string
140
     *
141
     * @ORM\Column(name="js_lib", type="text", nullable=false)
142
     */
143
    protected $jsLib;
144
145
    /**
146
     * @var bool
147
     *
148
     * @ORM\Column(name="debug", type="boolean", nullable=false)
149
     */
150
    protected $debug;
151
152
    /**
153
     * @var string
154
     *
155
     * @ORM\Column(name="theme", type="string", length=255, nullable=false)
156
     */
157
    protected $theme;
158
159
    /**
160
     * @var string
161
     *
162
     * @ORM\Column(name="preview_image", type="string", length=255, nullable=false)
163
     */
164
    protected $previewImage;
165
166
    /**
167
     * @var string
168
     *
169
     * @ORM\Column(name="author", type="text", nullable=false)
170
     */
171
    protected $author;
172
173
    /**
174
     * @var int
175
     *
176
     * @ORM\Column(name="session_id", type="integer", nullable=false)
177
     */
178
    protected $sessionId;
179
180
    /**
181
     * @var int
182
     *
183
     * @ORM\Column(name="prerequisite", type="integer", nullable=false)
184
     */
185
    protected $prerequisite;
186
187
    /**
188
     * @var bool
189
     *
190
     * @ORM\Column(name="hide_toc_frame", type="boolean", nullable=false)
191
     */
192
    protected $hideTocFrame;
193
194
    /**
195
     * @var bool
196
     *
197
     * @ORM\Column(name="seriousgame_mode", type="boolean", nullable=false)
198
     */
199
    protected $seriousgameMode;
200
201
    /**
202
     * @var int
203
     *
204
     * @ORM\Column(name="use_max_score", type="integer", nullable=false, options={"default":"1"})
205
     */
206
    protected $useMaxScore;
207
208
    /**
209
     * @var int
210
     *
211
     * @ORM\Column(name="autolaunch", type="integer", nullable=false)
212
     */
213
    protected $autolaunch;
214
215
    /**
216
     * @var int
217
     *
218
     * @ORM\Column(name="category_id", type="integer", nullable=false, unique=false)
219
     */
220
    protected $categoryId;
221
222
    /**
223
     * @var int
224
     *
225
     * @ORM\Column(name="max_attempts", type="integer", nullable=false)
226
     */
227
    protected $maxAttempts;
228
229
    /**
230
     * @var int
231
     *
232
     * @ORM\Column(name="subscribe_users", type="integer", nullable=false)
233
     */
234
    protected $subscribeUsers;
235
236
    /**
237
     * @var \DateTime
238
     *
239
     * @ORM\Column(name="created_on", type="datetime", nullable=false)
240
     */
241
    protected $createdOn;
242
243
    /**
244
     * @var \DateTime
245
     *
246
     * @ORM\Column(name="modified_on", type="datetime", nullable=false)
247
     */
248
    protected $modifiedOn;
249
250
    /**
251
     * @var \DateTime
252
     *
253
     * @ORM\Column(name="publicated_on", type="datetime", nullable=true)
254
     */
255
    protected $publicatedOn;
256
257
    /**
258
     * @var \DateTime
259
     *
260
     * @ORM\Column(name="expired_on", type="datetime", nullable=true)
261
     */
262
    protected $expiredOn;
263
264
    /**
265
     * @var string
266
     *
267
     * @ORM\Column(name="accumulate_scorm_time", type="integer", nullable=false, options={"default":1})
268
     */
269
    protected $accumulateScormTime;
270
271
    /**
272
     * Constructor.
273
     */
274
    public function __construct()
275
    {
276
        $this->defaultViewMod = 'embedded';
277
        $this->defaultEncoding = 'UTF-8';
278
        $this->displayOrder = 0;
279
        $this->contentLocal = 'local';
280
        $this->preventReinit = true;
281
        $this->useMaxScore = 1;
282
        $this->createdOn = new \DateTime();
283
    }
284
285
    /**
286
     * Set lpType.
287
     *
288
     * @param int $lpType
289
     *
290
     * @return CLp
291
     */
292
    public function setLpType($lpType)
293
    {
294
        $this->lpType = $lpType;
295
296
        return $this;
297
    }
298
299
    /**
300
     * Get lpType.
301
     *
302
     * @return int
303
     */
304
    public function getLpType()
305
    {
306
        return $this->lpType;
307
    }
308
309
    /**
310
     * Set name.
311
     *
312
     * @param string $name
313
     *
314
     * @return CLp
315
     */
316
    public function setName($name)
317
    {
318
        $this->name = $name;
319
320
        return $this;
321
    }
322
323
    /**
324
     * Get name.
325
     *
326
     * @return string
327
     */
328
    public function getName()
329
    {
330
        return $this->name;
331
    }
332
333
    /**
334
     * Set ref.
335
     *
336
     * @param string $ref
337
     *
338
     * @return CLp
339
     */
340
    public function setRef($ref)
341
    {
342
        $this->ref = $ref;
343
344
        return $this;
345
    }
346
347
    /**
348
     * Get ref.
349
     *
350
     * @return string
351
     */
352
    public function getRef()
353
    {
354
        return $this->ref;
355
    }
356
357
    /**
358
     * Set description.
359
     *
360
     * @param string $description
361
     *
362
     * @return CLp
363
     */
364
    public function setDescription($description)
365
    {
366
        $this->description = $description;
367
368
        return $this;
369
    }
370
371
    /**
372
     * Get description.
373
     *
374
     * @return string
375
     */
376
    public function getDescription()
377
    {
378
        return $this->description;
379
    }
380
381
    /**
382
     * Set path.
383
     *
384
     * @param string $path
385
     *
386
     * @return CLp
387
     */
388
    public function setPath($path)
389
    {
390
        $this->path = $path;
391
392
        return $this;
393
    }
394
395
    /**
396
     * Get path.
397
     *
398
     * @return string
399
     */
400
    public function getPath()
401
    {
402
        return $this->path;
403
    }
404
405
    /**
406
     * Set forceCommit.
407
     *
408
     * @param bool $forceCommit
409
     *
410
     * @return CLp
411
     */
412
    public function setForceCommit($forceCommit)
413
    {
414
        $this->forceCommit = $forceCommit;
415
416
        return $this;
417
    }
418
419
    /**
420
     * Get forceCommit.
421
     *
422
     * @return bool
423
     */
424
    public function getForceCommit()
425
    {
426
        return $this->forceCommit;
427
    }
428
429
    /**
430
     * Set defaultViewMod.
431
     *
432
     * @param string $defaultViewMod
433
     *
434
     * @return CLp
435
     */
436
    public function setDefaultViewMod($defaultViewMod)
437
    {
438
        $this->defaultViewMod = $defaultViewMod;
439
440
        return $this;
441
    }
442
443
    /**
444
     * Get defaultViewMod.
445
     *
446
     * @return string
447
     */
448
    public function getDefaultViewMod()
449
    {
450
        return $this->defaultViewMod;
451
    }
452
453
    /**
454
     * Set defaultEncoding.
455
     *
456
     * @param string $defaultEncoding
457
     *
458
     * @return CLp
459
     */
460
    public function setDefaultEncoding($defaultEncoding)
461
    {
462
        $this->defaultEncoding = $defaultEncoding;
463
464
        return $this;
465
    }
466
467
    /**
468
     * Get defaultEncoding.
469
     *
470
     * @return string
471
     */
472
    public function getDefaultEncoding()
473
    {
474
        return $this->defaultEncoding;
475
    }
476
477
    /**
478
     * Set displayOrder.
479
     *
480
     * @param int $displayOrder
481
     *
482
     * @return CLp
483
     */
484
    public function setDisplayOrder($displayOrder)
485
    {
486
        $this->displayOrder = $displayOrder;
487
488
        return $this;
489
    }
490
491
    /**
492
     * Get displayOrder.
493
     *
494
     * @return int
495
     */
496
    public function getDisplayOrder()
497
    {
498
        return $this->displayOrder;
499
    }
500
501
    /**
502
     * Set contentMaker.
503
     *
504
     * @param string $contentMaker
505
     *
506
     * @return CLp
507
     */
508
    public function setContentMaker($contentMaker)
509
    {
510
        $this->contentMaker = $contentMaker;
511
512
        return $this;
513
    }
514
515
    /**
516
     * Get contentMaker.
517
     *
518
     * @return string
519
     */
520
    public function getContentMaker()
521
    {
522
        return $this->contentMaker;
523
    }
524
525
    /**
526
     * Set contentLocal.
527
     *
528
     * @param string $contentLocal
529
     *
530
     * @return CLp
531
     */
532
    public function setContentLocal($contentLocal)
533
    {
534
        $this->contentLocal = $contentLocal;
535
536
        return $this;
537
    }
538
539
    /**
540
     * Get contentLocal.
541
     *
542
     * @return string
543
     */
544
    public function getContentLocal()
545
    {
546
        return $this->contentLocal;
547
    }
548
549
    /**
550
     * Set contentLicense.
551
     *
552
     * @param string $contentLicense
553
     *
554
     * @return CLp
555
     */
556
    public function setContentLicense($contentLicense)
557
    {
558
        $this->contentLicense = $contentLicense;
559
560
        return $this;
561
    }
562
563
    /**
564
     * Get contentLicense.
565
     *
566
     * @return string
567
     */
568
    public function getContentLicense()
569
    {
570
        return $this->contentLicense;
571
    }
572
573
    /**
574
     * Set preventReinit.
575
     *
576
     * @param bool $preventReinit
577
     *
578
     * @return CLp
579
     */
580
    public function setPreventReinit($preventReinit)
581
    {
582
        $this->preventReinit = $preventReinit;
583
584
        return $this;
585
    }
586
587
    /**
588
     * Get preventReinit.
589
     *
590
     * @return bool
591
     */
592
    public function getPreventReinit()
593
    {
594
        return $this->preventReinit;
595
    }
596
597
    /**
598
     * Set jsLib.
599
     *
600
     * @param string $jsLib
601
     *
602
     * @return CLp
603
     */
604
    public function setJsLib($jsLib)
605
    {
606
        $this->jsLib = $jsLib;
607
608
        return $this;
609
    }
610
611
    /**
612
     * Get jsLib.
613
     *
614
     * @return string
615
     */
616
    public function getJsLib()
617
    {
618
        return $this->jsLib;
619
    }
620
621
    /**
622
     * Set debug.
623
     *
624
     * @param bool $debug
625
     *
626
     * @return CLp
627
     */
628
    public function setDebug($debug)
629
    {
630
        $this->debug = $debug;
631
632
        return $this;
633
    }
634
635
    /**
636
     * Get debug.
637
     *
638
     * @return bool
639
     */
640
    public function getDebug()
641
    {
642
        return $this->debug;
643
    }
644
645
    /**
646
     * Set theme.
647
     *
648
     * @param string $theme
649
     *
650
     * @return CLp
651
     */
652
    public function setTheme($theme)
653
    {
654
        $this->theme = $theme;
655
656
        return $this;
657
    }
658
659
    /**
660
     * Get theme.
661
     *
662
     * @return string
663
     */
664
    public function getTheme()
665
    {
666
        return $this->theme;
667
    }
668
669
    /**
670
     * Set previewImage.
671
     *
672
     * @param string $previewImage
673
     *
674
     * @return CLp
675
     */
676
    public function setPreviewImage($previewImage)
677
    {
678
        $this->previewImage = $previewImage;
679
680
        return $this;
681
    }
682
683
    /**
684
     * Get previewImage.
685
     *
686
     * @return string
687
     */
688
    public function getPreviewImage()
689
    {
690
        return $this->previewImage;
691
    }
692
693
    /**
694
     * Set author.
695
     *
696
     * @param string $author
697
     *
698
     * @return CLp
699
     */
700
    public function setAuthor($author)
701
    {
702
        $this->author = $author;
703
704
        return $this;
705
    }
706
707
    /**
708
     * Get author.
709
     *
710
     * @return string
711
     */
712
    public function getAuthor()
713
    {
714
        return $this->author;
715
    }
716
717
    /**
718
     * Set sessionId.
719
     *
720
     * @param int $sessionId
721
     *
722
     * @return CLp
723
     */
724
    public function setSessionId($sessionId)
725
    {
726
        $this->sessionId = $sessionId;
727
728
        return $this;
729
    }
730
731
    /**
732
     * Get sessionId.
733
     *
734
     * @return int
735
     */
736
    public function getSessionId()
737
    {
738
        return $this->sessionId;
739
    }
740
741
    /**
742
     * Set prerequisite.
743
     *
744
     * @param int $prerequisite
745
     *
746
     * @return CLp
747
     */
748
    public function setPrerequisite($prerequisite)
749
    {
750
        $this->prerequisite = $prerequisite;
751
752
        return $this;
753
    }
754
755
    /**
756
     * Get prerequisite.
757
     *
758
     * @return int
759
     */
760
    public function getPrerequisite()
761
    {
762
        return $this->prerequisite;
763
    }
764
765
    /**
766
     * Set hideTocFrame.
767
     *
768
     * @param bool $hideTocFrame
769
     *
770
     * @return CLp
771
     */
772
    public function setHideTocFrame($hideTocFrame)
773
    {
774
        $this->hideTocFrame = $hideTocFrame;
775
776
        return $this;
777
    }
778
779
    /**
780
     * Get hideTocFrame.
781
     *
782
     * @return bool
783
     */
784
    public function getHideTocFrame()
785
    {
786
        return $this->hideTocFrame;
787
    }
788
789
    /**
790
     * Set seriousgameMode.
791
     *
792
     * @param bool $seriousgameMode
793
     *
794
     * @return CLp
795
     */
796
    public function setSeriousgameMode($seriousgameMode)
797
    {
798
        $this->seriousgameMode = $seriousgameMode;
799
800
        return $this;
801
    }
802
803
    /**
804
     * Get seriousgameMode.
805
     *
806
     * @return bool
807
     */
808
    public function getSeriousgameMode()
809
    {
810
        return $this->seriousgameMode;
811
    }
812
813
    /**
814
     * Set useMaxScore.
815
     *
816
     * @param int $useMaxScore
817
     *
818
     * @return CLp
819
     */
820
    public function setUseMaxScore($useMaxScore)
821
    {
822
        $this->useMaxScore = $useMaxScore;
823
824
        return $this;
825
    }
826
827
    /**
828
     * Get useMaxScore.
829
     *
830
     * @return int
831
     */
832
    public function getUseMaxScore()
833
    {
834
        return $this->useMaxScore;
835
    }
836
837
    /**
838
     * Set autolaunch.
839
     *
840
     * @param int $autolaunch
841
     *
842
     * @return CLp
843
     */
844
    public function setAutolaunch($autolaunch)
845
    {
846
        $this->autolaunch = $autolaunch;
847
848
        return $this;
849
    }
850
851
    /**
852
     * Get autolaunch.
853
     *
854
     * @return int
855
     */
856
    public function getAutolaunch()
857
    {
858
        return $this->autolaunch;
859
    }
860
861
    /**
862
     * Set createdOn.
863
     *
864
     * @param \DateTime $createdOn
865
     *
866
     * @return CLp
867
     */
868
    public function setCreatedOn($createdOn)
869
    {
870
        $this->createdOn = $createdOn;
871
872
        return $this;
873
    }
874
875
    /**
876
     * Get createdOn.
877
     *
878
     * @return \DateTime
879
     */
880
    public function getCreatedOn()
881
    {
882
        return $this->createdOn;
883
    }
884
885
    /**
886
     * Set modifiedOn.
887
     *
888
     * @param \DateTime $modifiedOn
889
     *
890
     * @return CLp
891
     */
892
    public function setModifiedOn($modifiedOn)
893
    {
894
        $this->modifiedOn = $modifiedOn;
895
896
        return $this;
897
    }
898
899
    /**
900
     * Get modifiedOn.
901
     *
902
     * @return \DateTime
903
     */
904
    public function getModifiedOn()
905
    {
906
        return $this->modifiedOn;
907
    }
908
909
    /**
910
     * Set publicatedOn.
911
     *
912
     * @param \DateTime $publicatedOn
913
     *
914
     * @return CLp
915
     */
916
    public function setPublicatedOn($publicatedOn)
917
    {
918
        $this->publicatedOn = $publicatedOn;
919
920
        return $this;
921
    }
922
923
    /**
924
     * Get publicatedOn.
925
     *
926
     * @return \DateTime
927
     */
928
    public function getPublicatedOn()
929
    {
930
        return $this->publicatedOn;
931
    }
932
933
    /**
934
     * Set expiredOn.
935
     *
936
     * @param \DateTime $expiredOn
937
     *
938
     * @return CLp
939
     */
940
    public function setExpiredOn($expiredOn)
941
    {
942
        $this->expiredOn = $expiredOn;
943
944
        return $this;
945
    }
946
947
    /**
948
     * Get expiredOn.
949
     *
950
     * @return \DateTime
951
     */
952
    public function getExpiredOn()
953
    {
954
        return $this->expiredOn;
955
    }
956
957
    /**
958
     * Set id.
959
     *
960
     * @param int $id
961
     *
962
     * @return CLp
963
     */
964
    public function setId($id)
965
    {
966
        $this->id = $id;
967
968
        return $this;
969
    }
970
971
    /**
972
     * Get id.
973
     *
974
     * @return int
975
     */
976
    public function getId()
977
    {
978
        return $this->id;
979
    }
980
981
    /**
982
     * Set cId.
983
     *
984
     * @param int $cId
985
     *
986
     * @return CLp
987
     */
988
    public function setCId($cId)
989
    {
990
        $this->cId = $cId;
991
992
        return $this;
993
    }
994
995
    /**
996
     * Get cId.
997
     *
998
     * @return int
999
     */
1000
    public function getCId()
1001
    {
1002
        return $this->cId;
1003
    }
1004
1005
    /**
1006
     * @return int
1007
     */
1008
    public function getCategoryId()
1009
    {
1010
        return $this->categoryId;
1011
    }
1012
1013
    /**
1014
     * @param int $categoryId
1015
     *
1016
     * @return CLp
1017
     */
1018
    public function setCategoryId($categoryId)
1019
    {
1020
        $this->categoryId = $categoryId;
1021
1022
        return $this;
1023
    }
1024
1025
    /**
1026
     * @return string
1027
     */
1028
    public function getAccumulateScormTime()
1029
    {
1030
        return $this->accumulateScormTime;
1031
    }
1032
1033
    /**
1034
     * @param string $accumulateScormTime
1035
     *
1036
     * @return CLp
1037
     */
1038
    public function setAccumulateScormTime($accumulateScormTime)
1039
    {
1040
        $this->accumulateScormTime = $accumulateScormTime;
1041
1042
        return $this;
1043
    }
1044
1045
    /**
1046
     * Get iid.
1047
     *
1048
     * @return int
1049
     */
1050
    public function getIid()
1051
    {
1052
        return $this->iid;
1053
    }
1054
1055
    /**
1056
     * Get subscribeUsers.
1057
     *
1058
     * @return int
1059
     */
1060
    public function getSubscribeUsers()
1061
    {
1062
        return $this->subscribeUsers;
1063
    }
1064
1065
    /**
1066
     * Resource identifier.
1067
     */
1068
    public function getResourceIdentifier(): int
1069
    {
1070
        return $this->getIid();
1071
    }
1072
1073
    public function getResourceName(): string
1074
    {
1075
        return $this->getName();
1076
    }
1077
1078
    public function getResourceFieldName(): string
1079
    {
1080
        return 'name';
1081
    }
1082
1083
    public function __toString(): string
1084
    {
1085
        return $this->getName();
1086
    }
1087
}
1088