Passed
Push — master ( 4e7d2f...7a7af2 )
by Julito
08:07
created

CLp   F

Complexity

Total Complexity 75

Size/Duplication

Total Lines 1092
Duplicated Lines 0 %

Importance

Changes 3
Bugs 0 Features 0
Metric Value
eloc 175
c 3
b 0
f 0
dl 0
loc 1092
rs 2.4
wmc 75

75 Methods

Rating   Name   Duplication   Size   Complexity  
A setDisplayOrder() 0 5 1
A getResourceIdentifier() 0 3 1
A getUseMaxScore() 0 3 1
A setPublicatedOn() 0 5 1
A getDefaultViewMod() 0 3 1
A __toString() 0 3 1
A getAutolaunch() 0 3 1
A getTheme() 0 3 1
A getHideTocFrame() 0 3 1
A setCreatedOn() 0 5 1
A setSeriousgameMode() 0 5 1
A getForum() 0 3 1
A getAccumulateWorkTime() 0 3 1
A setForum() 0 5 1
A hasForum() 0 3 1
A getAuthor() 0 3 1
A setAutolaunch() 0 5 1
A setDefaultViewMod() 0 5 1
A setForceCommit() 0 5 1
A setDebug() 0 5 1
A setAuthor() 0 5 1
A setSessionId() 0 5 1
A getCreatedOn() 0 3 1
A getDisplayOrder() 0 3 1
A getJsLib() 0 3 1
A getDebug() 0 3 1
A getContentMaker() 0 3 1
A setExpiredOn() 0 5 1
A getContentLocal() 0 3 1
A setModifiedOn() 0 5 1
A getCategory() 0 3 1
A getForceCommit() 0 3 1
A getSeriousgameMode() 0 3 1
A setPrerequisite() 0 5 1
A setDescription() 0 5 1
A setContentMaker() 0 5 1
A getAsset() 0 3 1
A getModifiedOn() 0 3 1
A getIid() 0 3 1
A __construct() 0 29 1
A setPath() 0 5 1
A setResourceName() 0 3 1
A getResourceName() 0 3 1
A setLpType() 0 5 1
A setDefaultEncoding() 0 5 1
A setHideTocFrame() 0 5 1
A getDefaultEncoding() 0 3 1
A getSessionId() 0 3 1
A getSubscribeUsers() 0 3 1
A setJsLib() 0 5 1
A setName() 0 5 1
A setRef() 0 5 1
A getExpiredOn() 0 3 1
A getPath() 0 3 1
A setAsset() 0 5 1
A setSubscribeUsers() 0 5 1
A getLpType() 0 3 1
A setUseMaxScore() 0 5 1
A setAccumulateScormTime() 0 5 1
A getPreventReinit() 0 3 1
A getPublicatedOn() 0 3 1
A setPreventReinit() 0 5 1
A getRef() 0 3 1
A getPrerequisite() 0 3 1
A getDescription() 0 3 1
A setTheme() 0 5 1
A getCId() 0 3 1
A getAccumulateScormTime() 0 3 1
A setContentLicense() 0 5 1
A setAccumulateWorkTime() 0 5 1
A setCId() 0 5 1
A getName() 0 3 1
A setCategory() 0 5 1
A getContentLicense() 0 3 1
A setContentLocal() 0 5 1

How to fix   Complexity   

Complex Class

Complex classes like CLp often do a lot of different things. To break such a class down, we need to identify a cohesive component within that class. A common approach to find such a component is to look for fields/methods that share the same prefixes, or suffixes.

Once you have determined the fields that belong together, you can apply the Extract Class refactoring. If the component makes sense as a sub-class, Extract Subclass is also a candidate, and is often faster.

While breaking up the class, it is a good idea to analyze how other classes use CLp, and based on these observations, apply Extract Interface, too.

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\Asset;
9
use Chamilo\CoreBundle\Entity\ResourceInterface;
10
use Doctrine\Common\Collections\ArrayCollection;
11
use Doctrine\ORM\Mapping as ORM;
12
use Gedmo\Mapping\Annotation as Gedmo;
13
use Symfony\Component\Validator\Constraints as Assert;
14
15
/**
16
 * CLp.
17
 *
18
 * @ORM\Table(
19
 *  name="c_lp"
20
 * )
21
 * @ORM\Entity
22
 */
23
class CLp extends AbstractResource implements ResourceInterface
24
{
25
    public const LP_TYPE = 1;
26
    public const SCORM_TYPE = 2;
27
28
    /**
29
     * @var int
30
     *
31
     * @ORM\Column(name="iid", type="integer")
32
     * @ORM\Id
33
     * @ORM\GeneratedValue
34
     */
35
    protected $iid;
36
37
    /**
38
     * @var int
39
     *
40
     * @ORM\Column(name="c_id", type="integer")
41
     */
42
    protected $cId;
43
44
    /**
45
     * @var int
46
     *
47
     * @ORM\Column(name="lp_type", type="integer", nullable=false)
48
     */
49
    protected $lpType;
50
51
    /**
52
     * @var string
53
     * @Assert\NotBlank()
54
     * @ORM\Column(name="name", type="string", length=255, nullable=false)
55
     */
56
    protected $name;
57
58
    /**
59
     * @var string
60
     *
61
     * @ORM\Column(name="ref", type="text", nullable=true)
62
     */
63
    protected $ref;
64
65
    /**
66
     * @var string
67
     *
68
     * @ORM\Column(name="description", type="text", nullable=true)
69
     */
70
    protected $description;
71
72
    /**
73
     * @var string
74
     *
75
     * @ORM\Column(name="path", type="text", nullable=false)
76
     */
77
    protected $path;
78
79
    /**
80
     * @var bool
81
     *
82
     * @ORM\Column(name="force_commit", type="boolean", nullable=false)
83
     */
84
    protected $forceCommit;
85
86
    /**
87
     * @var string
88
     *
89
     * @ORM\Column(name="default_view_mod", type="string", length=32, nullable=false, options={"default":"embedded"})
90
     */
91
    protected $defaultViewMod;
92
93
    /**
94
     * @var string
95
     *
96
     * @ORM\Column(name="default_encoding", type="string", length=32, nullable=false, options={"default":"UTF-8"})
97
     */
98
    protected $defaultEncoding;
99
100
    /**
101
     * @var int
102
     *
103
     * @ORM\Column(name="display_order", type="integer", nullable=false, options={"default":"0"})
104
     */
105
    protected $displayOrder;
106
107
    /**
108
     * @var string
109
     *
110
     * @ORM\Column(name="content_maker", type="text", nullable=false)
111
     */
112
    protected $contentMaker;
113
114
    /**
115
     * @var string
116
     *
117
     * @ORM\Column(name="content_local", type="string", length=32, nullable=false, options={"default":"local"})
118
     */
119
    protected $contentLocal;
120
121
    /**
122
     * @var string
123
     *
124
     * @ORM\Column(name="content_license", type="text", nullable=false)
125
     */
126
    protected $contentLicense;
127
128
    /**
129
     * @var bool
130
     *
131
     * @ORM\Column(name="prevent_reinit", type="boolean", nullable=false, options={"default":"1"})
132
     */
133
    protected $preventReinit;
134
135
    /**
136
     * @var string
137
     *
138
     * @ORM\Column(name="js_lib", type="text", nullable=false)
139
     */
140
    protected $jsLib;
141
142
    /**
143
     * @var bool
144
     *
145
     * @ORM\Column(name="debug", type="boolean", nullable=false)
146
     */
147
    protected $debug;
148
149
    /**
150
     * @var string
151
     *
152
     * @ORM\Column(name="theme", type="string", length=255, nullable=false)
153
     */
154
    protected $theme;
155
156
    /**
157
     * @var string
158
     *
159
     * @ORM\Column(name="author", type="text", nullable=false)
160
     */
161
    protected $author;
162
163
    /**
164
     * @var int
165
     *
166
     * @ORM\Column(name="session_id", type="integer", nullable=false)
167
     */
168
    protected $sessionId;
169
170
    /**
171
     * @var int
172
     *
173
     * @ORM\Column(name="prerequisite", type="integer", nullable=false)
174
     */
175
    protected $prerequisite;
176
177
    /**
178
     * @var bool
179
     *
180
     * @ORM\Column(name="hide_toc_frame", type="boolean", nullable=false)
181
     */
182
    protected $hideTocFrame;
183
184
    /**
185
     * @var bool
186
     *
187
     * @ORM\Column(name="seriousgame_mode", type="boolean", nullable=false)
188
     */
189
    protected $seriousgameMode;
190
191
    /**
192
     * @var int
193
     *
194
     * @ORM\Column(name="use_max_score", type="integer", nullable=false, options={"default":"1"})
195
     */
196
    protected $useMaxScore;
197
198
    /**
199
     * @var int
200
     *
201
     * @ORM\Column(name="autolaunch", type="integer", nullable=false)
202
     */
203
    protected $autolaunch;
204
205
    /**
206
     * @var CLpCategory|null
207
     *
208
     * @ORM\ManyToOne(targetEntity="Chamilo\CourseBundle\Entity\CLpCategory", inversedBy="lps")
209
     * @ORM\JoinColumn(name="category_id", referencedColumnName="iid")
210
     */
211
    protected $category;
212
213
    /**
214
     * @var int
215
     *
216
     * @ORM\Column(name="max_attempts", type="integer", nullable=false)
217
     */
218
    protected $maxAttempts;
219
220
    /**
221
     * @var int
222
     *
223
     * @ORM\Column(name="subscribe_users", type="integer", nullable=false)
224
     */
225
    protected $subscribeUsers;
226
227
    /**
228
     * @var \DateTime
229
     *
230
     * @Gedmo\Timestampable(on="create")
231
     *
232
     * @ORM\Column(name="created_on", type="datetime", nullable=false)
233
     */
234
    protected $createdOn;
235
236
    /**
237
     * @var \DateTime
238
     *
239
     * @Gedmo\Timestampable(on="update")
240
     *
241
     * @ORM\Column(name="modified_on", type="datetime", nullable=false)
242
     */
243
    protected $modifiedOn;
244
245
    /**
246
     * @var \DateTime
247
     *
248
     * @ORM\Column(name="publicated_on", type="datetime", nullable=true)
249
     */
250
    protected $publicatedOn;
251
252
    /**
253
     * @var \DateTime
254
     *
255
     * @ORM\Column(name="expired_on", type="datetime", nullable=true)
256
     */
257
    protected $expiredOn;
258
259
    /**
260
     * @var int
261
     *
262
     * @ORM\Column(name="accumulate_scorm_time", type="integer", nullable=false, options={"default":1})
263
     */
264
    protected $accumulateScormTime;
265
266
    /**
267
     * @var int
268
     *
269
     * @ORM\Column(name="accumulate_work_time", type="integer", nullable=false, options={"default":0})
270
     */
271
    protected $accumulateWorkTime;
272
273
    /**
274
     * @var CLpItem[]
275
     *
276
     * @ORM\OneToMany(targetEntity="CLpItem", mappedBy="lp", cascade={"persist", "remove"}, orphanRemoval=true)
277
     */
278
    protected $items;
279
280
    /**
281
     * @var CForumForum
282
     * @ORM\OneToOne(targetEntity="Chamilo\CourseBundle\Entity\CForumForum", mappedBy="lp")
283
     */
284
    protected $forum;
285
286
    /**
287
     * @var Asset|null
288
     *
289
     * @ORM\ManyToOne(targetEntity="Chamilo\CoreBundle\Entity\Asset")
290
     * @ORM\JoinColumn(name="asset_id", referencedColumnName="id")
291
     */
292
    protected $asset;
293
294
    public function __construct()
295
    {
296
        $this->accumulateScormTime = 1;
297
        $this->accumulateWorkTime = 0;
298
        $this->author = '';
299
        $this->autolaunch = 0;
300
        $this->contentLocal = 'local';
301
        $this->contentMaker = 'chamilo';
302
        $this->contentLicense = '';
303
        $this->createdOn = new \DateTime();
304
        $this->modifiedOn = new \DateTime();
305
        $this->publicatedOn = new \DateTime();
306
        $this->defaultEncoding = 'UTF-8';
307
        $this->defaultViewMod = 'embedded';
308
        $this->description = '';
309
        $this->displayOrder = 0;
310
        $this->debug = 0;
0 ignored issues
show
Documentation Bug introduced by
The property $debug was declared of type boolean, but 0 is of type integer. Maybe add a type cast?

This check looks for assignments to scalar types that may be of the wrong type.

To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.

$answer = 42;

$correct = false;

$correct = (bool) $answer;
Loading history...
311
        $this->forceCommit = 0;
0 ignored issues
show
Documentation Bug introduced by
The property $forceCommit was declared of type boolean, but 0 is of type integer. Maybe add a type cast?

This check looks for assignments to scalar types that may be of the wrong type.

To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.

$answer = 42;

$correct = false;

$correct = (bool) $answer;
Loading history...
312
        $this->hideTocFrame = 0;
0 ignored issues
show
Documentation Bug introduced by
The property $hideTocFrame was declared of type boolean, but 0 is of type integer. Maybe add a type cast?

This check looks for assignments to scalar types that may be of the wrong type.

To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.

$answer = 42;

$correct = false;

$correct = (bool) $answer;
Loading history...
313
        $this->jsLib = '';
314
        $this->maxAttempts = 0;
315
        $this->preventReinit = true;
316
        $this->path = '';
317
        $this->prerequisite = 0;
318
        $this->seriousgameMode = 0;
0 ignored issues
show
Documentation Bug introduced by
The property $seriousgameMode was declared of type boolean, but 0 is of type integer. Maybe add a type cast?

This check looks for assignments to scalar types that may be of the wrong type.

To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.

$answer = 42;

$correct = false;

$correct = (bool) $answer;
Loading history...
319
        $this->subscribeUsers = 0;
320
        $this->useMaxScore = 1;
321
        $this->theme = '';
322
        $this->items = new ArrayCollection();
0 ignored issues
show
Documentation Bug introduced by
It seems like new Doctrine\Common\Collections\ArrayCollection() of type Doctrine\Common\Collections\ArrayCollection is incompatible with the declared type Chamilo\CourseBundle\Entity\CLpItem[] of property $items.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
323
    }
324
325
    public function __toString(): string
326
    {
327
        return $this->getName();
328
    }
329
330
    /**
331
     * Set lpType.
332
     *
333
     * @param int $lpType
334
     *
335
     * @return CLp
336
     */
337
    public function setLpType($lpType)
338
    {
339
        $this->lpType = $lpType;
340
341
        return $this;
342
    }
343
344
    /**
345
     * Get lpType.
346
     *
347
     * @return int
348
     */
349
    public function getLpType()
350
    {
351
        return $this->lpType;
352
    }
353
354
    /**
355
     * Set name.
356
     *
357
     * @param string $name
358
     *
359
     * @return CLp
360
     */
361
    public function setName($name)
362
    {
363
        $this->name = $name;
364
365
        return $this;
366
    }
367
368
    /**
369
     * Get name.
370
     *
371
     * @return string
372
     */
373
    public function getName()
374
    {
375
        return (string) $this->name;
376
    }
377
378
    /**
379
     * Set ref.
380
     *
381
     * @param string $ref
382
     *
383
     * @return CLp
384
     */
385
    public function setRef($ref)
386
    {
387
        $this->ref = $ref;
388
389
        return $this;
390
    }
391
392
    /**
393
     * Get ref.
394
     *
395
     * @return string
396
     */
397
    public function getRef()
398
    {
399
        return $this->ref;
400
    }
401
402
    /**
403
     * Set description.
404
     *
405
     * @param string $description
406
     *
407
     * @return CLp
408
     */
409
    public function setDescription($description)
410
    {
411
        $this->description = $description;
412
413
        return $this;
414
    }
415
416
    /**
417
     * Get description.
418
     *
419
     * @return string
420
     */
421
    public function getDescription()
422
    {
423
        return $this->description;
424
    }
425
426
    /**
427
     * Set path.
428
     *
429
     * @param string $path
430
     *
431
     * @return CLp
432
     */
433
    public function setPath($path)
434
    {
435
        $this->path = $path;
436
437
        return $this;
438
    }
439
440
    /**
441
     * Get path.
442
     *
443
     * @return string
444
     */
445
    public function getPath()
446
    {
447
        return $this->path;
448
    }
449
450
    /**
451
     * Set forceCommit.
452
     *
453
     * @param bool $forceCommit
454
     *
455
     * @return CLp
456
     */
457
    public function setForceCommit($forceCommit)
458
    {
459
        $this->forceCommit = $forceCommit;
460
461
        return $this;
462
    }
463
464
    /**
465
     * Get forceCommit.
466
     *
467
     * @return bool
468
     */
469
    public function getForceCommit()
470
    {
471
        return $this->forceCommit;
472
    }
473
474
    /**
475
     * Set defaultViewMod.
476
     *
477
     * @param string $defaultViewMod
478
     *
479
     * @return CLp
480
     */
481
    public function setDefaultViewMod($defaultViewMod)
482
    {
483
        $this->defaultViewMod = $defaultViewMod;
484
485
        return $this;
486
    }
487
488
    /**
489
     * Get defaultViewMod.
490
     *
491
     * @return string
492
     */
493
    public function getDefaultViewMod()
494
    {
495
        return $this->defaultViewMod;
496
    }
497
498
    /**
499
     * Set defaultEncoding.
500
     *
501
     * @param string $defaultEncoding
502
     *
503
     * @return CLp
504
     */
505
    public function setDefaultEncoding($defaultEncoding)
506
    {
507
        $this->defaultEncoding = $defaultEncoding;
508
509
        return $this;
510
    }
511
512
    /**
513
     * Get defaultEncoding.
514
     *
515
     * @return string
516
     */
517
    public function getDefaultEncoding()
518
    {
519
        return $this->defaultEncoding;
520
    }
521
522
    /**
523
     * Set displayOrder.
524
     *
525
     * @param int $displayOrder
526
     *
527
     * @return CLp
528
     */
529
    public function setDisplayOrder($displayOrder)
530
    {
531
        $this->displayOrder = $displayOrder;
532
533
        return $this;
534
    }
535
536
    /**
537
     * Get displayOrder.
538
     *
539
     * @return int
540
     */
541
    public function getDisplayOrder()
542
    {
543
        return $this->displayOrder;
544
    }
545
546
    /**
547
     * Set contentMaker.
548
     *
549
     * @param string $contentMaker
550
     *
551
     * @return CLp
552
     */
553
    public function setContentMaker($contentMaker)
554
    {
555
        $this->contentMaker = $contentMaker;
556
557
        return $this;
558
    }
559
560
    /**
561
     * Get contentMaker.
562
     *
563
     * @return string
564
     */
565
    public function getContentMaker()
566
    {
567
        return $this->contentMaker;
568
    }
569
570
    /**
571
     * Set contentLocal.
572
     *
573
     * @param string $contentLocal
574
     *
575
     * @return CLp
576
     */
577
    public function setContentLocal($contentLocal)
578
    {
579
        $this->contentLocal = $contentLocal;
580
581
        return $this;
582
    }
583
584
    /**
585
     * Get contentLocal.
586
     *
587
     * @return string
588
     */
589
    public function getContentLocal()
590
    {
591
        return $this->contentLocal;
592
    }
593
594
    /**
595
     * Set contentLicense.
596
     *
597
     * @param string $contentLicense
598
     *
599
     * @return CLp
600
     */
601
    public function setContentLicense($contentLicense)
602
    {
603
        $this->contentLicense = $contentLicense;
604
605
        return $this;
606
    }
607
608
    /**
609
     * Get contentLicense.
610
     *
611
     * @return string
612
     */
613
    public function getContentLicense()
614
    {
615
        return $this->contentLicense;
616
    }
617
618
    /**
619
     * Set preventReinit.
620
     *
621
     * @param bool $preventReinit
622
     *
623
     * @return CLp
624
     */
625
    public function setPreventReinit($preventReinit)
626
    {
627
        $this->preventReinit = $preventReinit;
628
629
        return $this;
630
    }
631
632
    /**
633
     * Get preventReinit.
634
     *
635
     * @return bool
636
     */
637
    public function getPreventReinit()
638
    {
639
        return $this->preventReinit;
640
    }
641
642
    /**
643
     * Set jsLib.
644
     *
645
     * @param string $jsLib
646
     *
647
     * @return CLp
648
     */
649
    public function setJsLib($jsLib)
650
    {
651
        $this->jsLib = $jsLib;
652
653
        return $this;
654
    }
655
656
    /**
657
     * Get jsLib.
658
     *
659
     * @return string
660
     */
661
    public function getJsLib()
662
    {
663
        return $this->jsLib;
664
    }
665
666
    /**
667
     * Set debug.
668
     *
669
     * @param bool $debug
670
     *
671
     * @return CLp
672
     */
673
    public function setDebug($debug)
674
    {
675
        $this->debug = $debug;
676
677
        return $this;
678
    }
679
680
    /**
681
     * Get debug.
682
     *
683
     * @return bool
684
     */
685
    public function getDebug()
686
    {
687
        return $this->debug;
688
    }
689
690
    /**
691
     * Set theme.
692
     *
693
     * @param string $theme
694
     *
695
     * @return CLp
696
     */
697
    public function setTheme($theme)
698
    {
699
        $this->theme = $theme;
700
701
        return $this;
702
    }
703
704
    /**
705
     * Get theme.
706
     *
707
     * @return string
708
     */
709
    public function getTheme()
710
    {
711
        return $this->theme;
712
    }
713
714
    /**
715
     * Set author.
716
     *
717
     * @param string $author
718
     *
719
     * @return CLp
720
     */
721
    public function setAuthor($author)
722
    {
723
        $this->author = $author;
724
725
        return $this;
726
    }
727
728
    /**
729
     * Get author.
730
     *
731
     * @return string
732
     */
733
    public function getAuthor()
734
    {
735
        return $this->author;
736
    }
737
738
    /**
739
     * Set sessionId.
740
     *
741
     * @param int $sessionId
742
     *
743
     * @return CLp
744
     */
745
    public function setSessionId($sessionId)
746
    {
747
        $this->sessionId = $sessionId;
748
749
        return $this;
750
    }
751
752
    /**
753
     * Get sessionId.
754
     *
755
     * @return int
756
     */
757
    public function getSessionId()
758
    {
759
        return $this->sessionId;
760
    }
761
762
    /**
763
     * Set prerequisite.
764
     *
765
     * @param int $prerequisite
766
     *
767
     * @return CLp
768
     */
769
    public function setPrerequisite($prerequisite)
770
    {
771
        $this->prerequisite = $prerequisite;
772
773
        return $this;
774
    }
775
776
    /**
777
     * Get prerequisite.
778
     *
779
     * @return int
780
     */
781
    public function getPrerequisite()
782
    {
783
        return $this->prerequisite;
784
    }
785
786
    /**
787
     * Set hideTocFrame.
788
     *
789
     * @param bool $hideTocFrame
790
     *
791
     * @return CLp
792
     */
793
    public function setHideTocFrame($hideTocFrame)
794
    {
795
        $this->hideTocFrame = $hideTocFrame;
796
797
        return $this;
798
    }
799
800
    /**
801
     * Get hideTocFrame.
802
     *
803
     * @return bool
804
     */
805
    public function getHideTocFrame()
806
    {
807
        return $this->hideTocFrame;
808
    }
809
810
    /**
811
     * Set seriousgameMode.
812
     *
813
     * @param bool $seriousgameMode
814
     *
815
     * @return CLp
816
     */
817
    public function setSeriousgameMode($seriousgameMode)
818
    {
819
        $this->seriousgameMode = $seriousgameMode;
820
821
        return $this;
822
    }
823
824
    /**
825
     * Get seriousgameMode.
826
     *
827
     * @return bool
828
     */
829
    public function getSeriousgameMode()
830
    {
831
        return $this->seriousgameMode;
832
    }
833
834
    /**
835
     * Set useMaxScore.
836
     *
837
     * @param int $useMaxScore
838
     *
839
     * @return CLp
840
     */
841
    public function setUseMaxScore($useMaxScore)
842
    {
843
        $this->useMaxScore = $useMaxScore;
844
845
        return $this;
846
    }
847
848
    /**
849
     * Get useMaxScore.
850
     *
851
     * @return int
852
     */
853
    public function getUseMaxScore()
854
    {
855
        return $this->useMaxScore;
856
    }
857
858
    /**
859
     * Set autolaunch.
860
     *
861
     * @param int $autolaunch
862
     *
863
     * @return CLp
864
     */
865
    public function setAutolaunch($autolaunch)
866
    {
867
        $this->autolaunch = $autolaunch;
868
869
        return $this;
870
    }
871
872
    /**
873
     * Get autolaunch.
874
     *
875
     * @return int
876
     */
877
    public function getAutolaunch()
878
    {
879
        return $this->autolaunch;
880
    }
881
882
    /**
883
     * Set createdOn.
884
     *
885
     * @param \DateTime $createdOn
886
     *
887
     * @return CLp
888
     */
889
    public function setCreatedOn($createdOn)
890
    {
891
        $this->createdOn = $createdOn;
892
893
        return $this;
894
    }
895
896
    /**
897
     * Get createdOn.
898
     *
899
     * @return \DateTime
900
     */
901
    public function getCreatedOn()
902
    {
903
        return $this->createdOn;
904
    }
905
906
    /**
907
     * Set modifiedOn.
908
     *
909
     * @param \DateTime $modifiedOn
910
     *
911
     * @return CLp
912
     */
913
    public function setModifiedOn($modifiedOn)
914
    {
915
        $this->modifiedOn = $modifiedOn;
916
917
        return $this;
918
    }
919
920
    /**
921
     * Get modifiedOn.
922
     *
923
     * @return \DateTime
924
     */
925
    public function getModifiedOn()
926
    {
927
        return $this->modifiedOn;
928
    }
929
930
    /**
931
     * Set publicatedOn.
932
     *
933
     * @param \DateTime $publicatedOn
934
     *
935
     * @return CLp
936
     */
937
    public function setPublicatedOn($publicatedOn)
938
    {
939
        $this->publicatedOn = $publicatedOn;
940
941
        return $this;
942
    }
943
944
    /**
945
     * Get publicatedOn.
946
     *
947
     * @return \DateTime
948
     */
949
    public function getPublicatedOn()
950
    {
951
        return $this->publicatedOn;
952
    }
953
954
    /**
955
     * Set expiredOn.
956
     *
957
     * @param \DateTime $expiredOn
958
     *
959
     * @return CLp
960
     */
961
    public function setExpiredOn($expiredOn)
962
    {
963
        $this->expiredOn = $expiredOn;
964
965
        return $this;
966
    }
967
968
    /**
969
     * Get expiredOn.
970
     *
971
     * @return \DateTime
972
     */
973
    public function getExpiredOn()
974
    {
975
        return $this->expiredOn;
976
    }
977
978
    /**
979
     * Set cId.
980
     *
981
     * @param int $cId
982
     *
983
     * @return CLp
984
     */
985
    public function setCId($cId)
986
    {
987
        $this->cId = $cId;
988
989
        return $this;
990
    }
991
992
    /**
993
     * Get cId.
994
     *
995
     * @return int
996
     */
997
    public function getCId()
998
    {
999
        return $this->cId;
1000
    }
1001
1002
    public function getCategory()
1003
    {
1004
        return $this->category;
1005
    }
1006
1007
    public function setCategory($category)
1008
    {
1009
        $this->category = $category;
1010
1011
        return $this;
1012
    }
1013
1014
    /**
1015
     * @return int
1016
     */
1017
    public function getAccumulateScormTime()
1018
    {
1019
        return $this->accumulateScormTime;
1020
    }
1021
1022
    /**
1023
     * @param int $accumulateScormTime
1024
     *
1025
     * @return CLp
1026
     */
1027
    public function setAccumulateScormTime($accumulateScormTime)
1028
    {
1029
        $this->accumulateScormTime = $accumulateScormTime;
1030
1031
        return $this;
1032
    }
1033
1034
    public function getAccumulateWorkTime(): int
1035
    {
1036
        return $this->accumulateWorkTime;
1037
    }
1038
1039
    public function setAccumulateWorkTime(int $accumulateWorkTime): self
1040
    {
1041
        $this->accumulateWorkTime = $accumulateWorkTime;
1042
1043
        return $this;
1044
    }
1045
1046
    /**
1047
     * Get iid.
1048
     *
1049
     * @return int
1050
     */
1051
    public function getIid()
1052
    {
1053
        return $this->iid;
1054
    }
1055
1056
    /**
1057
     * Get subscribeUsers.
1058
     *
1059
     * @return int
1060
     */
1061
    public function getSubscribeUsers()
1062
    {
1063
        return $this->subscribeUsers;
1064
    }
1065
1066
    public function setSubscribeUsers($value): self
1067
    {
1068
        $this->subscribeUsers = $value;
1069
1070
        return $this;
1071
    }
1072
1073
    public function getForum(): ?CForumForum
1074
    {
1075
        return $this->forum;
1076
    }
1077
1078
    public function hasForum(): bool
1079
    {
1080
        return null !== $this->forum;
1081
    }
1082
1083
    public function setForum(CForumForum $forum): self
1084
    {
1085
        $this->forum = $forum;
1086
1087
        return $this;
1088
    }
1089
1090
    public function getAsset(): ?Asset
1091
    {
1092
        return $this->asset;
1093
    }
1094
1095
    public function setAsset(?Asset $asset): self
1096
    {
1097
        $this->asset = $asset;
1098
1099
        return $this;
1100
    }
1101
1102
    public function getResourceIdentifier(): int
1103
    {
1104
        return $this->getIid();
1105
    }
1106
1107
    public function getResourceName(): string
1108
    {
1109
        return $this->getName();
1110
    }
1111
1112
    public function setResourceName(string $name): self
1113
    {
1114
        return $this->setName($name);
1115
    }
1116
}
1117