Passed
Pull Request — 1.11.x (#4900)
by Angel Fernando Quiroz
08:35
created

Log::getAction()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
/* For licensing terms, see /license.txt */
4
5
namespace Chamilo\PluginBundle\ExerciseFocused\Entity;
6
7
use Chamilo\CoreBundle\Entity\TrackEExercises;
8
use Chamilo\CoreBundle\Traits\TimestampableTypedEntity;
9
use Doctrine\ORM\Mapping as ORM;
10
11
/**
12
 * Class EmbedRegistry.
13
 *
14
 * @package Chamilo\PluginBundle\Entity\EmbedRegistry
15
 *
16
 * @ORM\Entity(repositoryClass="Chamilo\PluginBundle\ExerciseFocused\Repository\LogRepository")
17
 * @ORM\Table(name="plugin_exercisefocused_log")
18
 */
19
class Log
20
{
21
    use TimestampableTypedEntity;
22
23
    public const TYPE_RETURN = 'return';
24
    public const TYPE_OUTFOCUSED = 'outfocused';
25
    public const TYPE_OUTFOCUSED_LIMIT = 'outfocused_limit';
26
    public const TYPE_TIME_LIMIT = 'time_limit';
27
28
    /**
29
     * @var int
30
     *
31
     * @ORM\Column(name="id", type="integer")
32
     * @ORM\Id
33
     * @ORM\GeneratedValue
34
     */
35
    private $id;
36
37
    /**
38
     * @var TrackEExercises
39
     *
40
     * @ORM\ManyToOne(targetEntity="Chamilo\CoreBundle\Entity\TrackEExercises")
41
     * @ORM\JoinColumn(name="exe_id", referencedColumnName="exe_id", onDelete="SET NULL")
42
     */
43
    private $exe;
44
45
    /**
46
     * @var string
47
     *
48
     * @ORM\Column(name="action", type="string", nullable=false)
49
     */
50
    private $action;
51
52
    public function getId(): int
53
    {
54
        return $this->id;
55
    }
56
57
    public function getExe(): TrackEExercises
58
    {
59
        return $this->exe;
60
    }
61
62
    public function setExe(TrackEExercises $exe): Log
63
    {
64
        $this->exe = $exe;
65
66
        return $this;
67
    }
68
69
    public function getAction(): string
70
    {
71
        return $this->action;
72
    }
73
74
    public function setAction(string $action): Log
75
    {
76
        $this->action = $action;
77
78
        return $this;
79
    }
80
}
81