Completed
Push — master ( 0dfc19...c58ed8 )
by Julito
10:02
created

Level::getName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
/* For licensing terms, see /license.txt */
4
5
namespace Chamilo\CoreBundle\Entity;
6
7
use Doctrine\ORM\Mapping as ORM;
8
use Gedmo\Mapping\Annotation as Gedmo;
9
10
/**
11
 * Level.
12
 *
13
 * @ORM\Table(name="skill_level")
14
 * @ORM\Entity
15
 */
16
class Level
17
{
18
    /**
19
     * @var int
20
     *
21
     * @ORM\Column(name="id", type="integer")
22
     * @ORM\Id
23
     * @ORM\GeneratedValue
24
     */
25
    protected $id;
26
27
    /**
28
     * @var string
29
     *
30
     * @ORM\Column(name="name", type="string", length=255, nullable=false)
31
     */
32
    protected $name;
33
34
    /**
35
     * @Gedmo\SortablePosition
36
     *
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
     * @Gedmo\SortableGroup
50
     *
51
     * @ORM\ManyToOne(targetEntity="Chamilo\CoreBundle\Entity\Profile", inversedBy="levels")
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
     *
75
     * @return Level
76
     */
77
    public function setId($id)
78
    {
79
        $this->id = $id;
80
81
        return $this;
82
    }
83
84
    /**
85
     * @return string
86
     */
87
    public function getName()
88
    {
89
        return $this->name;
90
    }
91
92
    /**
93
     * @param string $name
94
     *
95
     * @return Level
96
     */
97
    public function setName($name)
98
    {
99
        $this->name = $name;
100
101
        return $this;
102
    }
103
104
    public function getPosition()
105
    {
106
        return $this->position;
107
    }
108
109
    /**
110
     * @return Level
111
     */
112
    public function setPosition($position)
113
    {
114
        $this->position = $position;
115
116
        return $this;
117
    }
118
119
    public function getShortName()
120
    {
121
        return $this->shortName;
122
    }
123
124
    /**
125
     * @return Level
126
     */
127
    public function setShortName($shortName)
128
    {
129
        $this->shortName = $shortName;
130
131
        return $this;
132
    }
133
134
    /**
135
     * @return Profile
136
     */
137
    public function getProfile()
138
    {
139
        return $this->profile;
140
    }
141
142
    /**
143
     * @return Level
144
     */
145
    public function setProfile($profile)
146
    {
147
        $this->profile = $profile;
148
149
        return $this;
150
    }
151
}
152