Completed
Pull Request — 1.11.x (#1163)
by José
71:40 queued 25:11
created

Level::getShortName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
/* For licensing terms, see /license.txt */
3
4
namespace Chamilo\SkillBundle\Entity;
5
6
use Gedmo\Mapping\Annotation as Gedmo;
7
use Doctrine\ORM\Mapping as ORM;
8
9
/**
10
 * Level
11
 *
12
 * @ORM\Table(
13
 *  name="skill_level",
14
 * )
15
 * @ORM\Entity
16
 */
17
class Level
18
{
19
    /**
20
     * @var integer
21
     *
22
     * @ORM\Column(name="id", type="integer")
23
     * @ORM\Id
24
     * @ORM\GeneratedValue
25
     */
26
    protected $id;
27
28
    /**
29
     * @var string
30
     *
31
     * @ORM\Column(name="name", type="string", length=255, nullable=false)
32
     */
33
    protected $name;
34
35
    /**
36
     * @Gedmo\SortablePosition
37
     * @ORM\Column(name="position", type="integer")
38
     */
39
    protected $position;
40
41
    /**
42
     * @var string
43
     *
44
     * @ORM\Column(name="short_name", type="string", length=255, nullable=false)
45
     */
46
    protected $shortName;
47
48
    /**
49
     *
50
     * @Gedmo\SortableGroup
51
     * @ORM\ManyToOne(targetEntity="Chamilo\SkillBundle\Entity\Profile", inversedBy="level")
52
     * @ORM\JoinColumn(name="profile_id", referencedColumnName="id")
53
     **/
54
    protected $profile;
55
56
    /**
57
     * @return string
58
     */
59
    public function __toString()
60
    {
61
        return (string) $this->getName();
62
    }
63
64
    /**
65
     * @return int
66
     */
67
    public function getId()
68
    {
69
        return $this->id;
70
    }
71
72
    /**
73
     * @param int $id
74
     * @return Level
75
     */
76
    public function setId($id)
77
    {
78
        $this->id = $id;
79
80
        return $this;
81
    }
82
83
    /**
84
     * @return string
85
     */
86
    public function getName()
87
    {
88
        return $this->name;
89
    }
90
91
    /**
92
     * @param string $name
93
     * @return Level
94
     */
95
    public function setName($name)
96
    {
97
        $this->name = $name;
98
99
        return $this;
100
    }
101
102
    /**
103
     * @return mixed
104
     */
105
    public function getPosition()
106
    {
107
        return $this->position;
108
    }
109
110
    /**
111
     * @param mixed $position
112
     * @return Level
113
     */
114
    public function setPosition($position)
115
    {
116
        $this->position = $position;
117
118
        return $this;
119
    }
120
121
    /**
122
     * @return mixed
123
     */
124
    public function getShortName()
125
    {
126
        return $this->shortName;
127
    }
128
129
    /**
130
     * @param mixed $shortName
131
     * @return Level
132
     */
133
    public function setShortName($shortName)
134
    {
135
        $this->shortName = $shortName;
136
137
        return $this;
138
    }
139
140
    /**
141
     * @return Profile
142
     */
143
    public function getProfile()
144
    {
145
        return $this->profile;
146
    }
147
148
    /**
149
     * @param mixed $profile
150
     * @return Level
151
     */
152
    public function setProfile($profile)
153
    {
154
        $this->profile = $profile;
155
156
        return $this;
157
    }
158
159
160
}
161