Passed
Push — master ( c13cd8...09b141 )
by Julito
10:19
created

Templates   A

Complexity

Total Complexity 13

Size/Duplication

Total Lines 202
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 27
c 0
b 0
f 0
dl 0
loc 202
rs 10
wmc 13

13 Methods

Rating   Name   Duplication   Size   Complexity  
A getTitle() 0 3 1
A getUserId() 0 3 1
A setImage() 0 5 1
A setUserId() 0 5 1
A setTitle() 0 5 1
A getImage() 0 3 1
A getRefDoc() 0 3 1
A getCourse() 0 3 1
A setRefDoc() 0 5 1
A setCourse() 0 5 1
A getDescription() 0 3 1
A getId() 0 3 1
A setDescription() 0 5 1
1
<?php
2
/* For licensing terms, see /license.txt */
3
4
namespace Chamilo\CoreBundle\Entity;
5
6
use Doctrine\ORM\Mapping as ORM;
7
8
/**
9
 * Templates.
10
 *
11
 * @ORM\Table(name="templates")
12
 * @ORM\Entity(repositoryClass="Chamilo\CoreBundle\Repository\TemplatesRepository")
13
 */
14
class Templates
15
{
16
    /**
17
     * @var int
18
     *
19
     * @ORM\Column(name="id", type="integer")
20
     * @ORM\Id
21
     * @ORM\GeneratedValue(strategy="IDENTITY")
22
     */
23
    protected $id;
24
25
    /**
26
     * @var string
27
     *
28
     * @ORM\Column(name="title", type="string", length=100, nullable=false)
29
     */
30
    protected $title;
31
32
    /**
33
     * @var string
34
     *
35
     * @ORM\Column(name="description", type="string", length=250, nullable=false)
36
     */
37
    protected $description;
38
39
    /**
40
     * @var Course
41
     *
42
     * @ORM\ManyToOne(targetEntity="Chamilo\CoreBundle\Entity\Course", cascade={"persist"})
43
     * @ORM\JoinColumn(name="c_id", referencedColumnName="id")
44
     */
45
    protected $course;
46
47
    /**
48
     * @var int
49
     *
50
     * @ORM\Column(name="user_id", type="integer", nullable=false)
51
     */
52
    protected $userId;
53
54
    /**
55
     * @var int
56
     *
57
     * @ORM\Column(name="ref_doc", type="integer", nullable=false)
58
     */
59
    protected $refDoc;
60
61
    /**
62
     * @var string
63
     *
64
     * @ORM\Column(name="image", type="string", length=250, nullable=false)
65
     */
66
    protected $image;
67
68
    /**
69
     * Set title.
70
     *
71
     * @param string $title
72
     *
73
     * @return Templates
74
     */
75
    public function setTitle($title)
76
    {
77
        $this->title = $title;
78
79
        return $this;
80
    }
81
82
    /**
83
     * Get title.
84
     *
85
     * @return string
86
     */
87
    public function getTitle()
88
    {
89
        return $this->title;
90
    }
91
92
    /**
93
     * Set description.
94
     *
95
     * @param string $description
96
     *
97
     * @return Templates
98
     */
99
    public function setDescription($description)
100
    {
101
        $this->description = $description;
102
103
        return $this;
104
    }
105
106
    /**
107
     * Get description.
108
     *
109
     * @return string
110
     */
111
    public function getDescription()
112
    {
113
        return $this->description;
114
    }
115
116
    /**
117
     * Set userId.
118
     *
119
     * @param int $userId
120
     *
121
     * @return Templates
122
     */
123
    public function setUserId($userId)
124
    {
125
        $this->userId = $userId;
126
127
        return $this;
128
    }
129
130
    /**
131
     * Get userId.
132
     *
133
     * @return int
134
     */
135
    public function getUserId()
136
    {
137
        return $this->userId;
138
    }
139
140
    /**
141
     * Set refDoc.
142
     *
143
     * @param int $refDoc
144
     *
145
     * @return Templates
146
     */
147
    public function setRefDoc($refDoc)
148
    {
149
        $this->refDoc = $refDoc;
150
151
        return $this;
152
    }
153
154
    /**
155
     * Get refDoc.
156
     *
157
     * @return int
158
     */
159
    public function getRefDoc()
160
    {
161
        return $this->refDoc;
162
    }
163
164
    /**
165
     * Set image.
166
     *
167
     * @param string $image
168
     *
169
     * @return Templates
170
     */
171
    public function setImage($image)
172
    {
173
        $this->image = $image;
174
175
        return $this;
176
    }
177
178
    /**
179
     * Get image.
180
     *
181
     * @return string
182
     */
183
    public function getImage()
184
    {
185
        return $this->image;
186
    }
187
188
    /**
189
     * Get id.
190
     *
191
     * @return int
192
     */
193
    public function getId()
194
    {
195
        return $this->id;
196
    }
197
198
    /**
199
     * @return Course
200
     */
201
    public function getCourse(): Course
202
    {
203
        return $this->course;
204
    }
205
206
    /**
207
     * @param Course $course
208
     *
209
     * @return Templates
210
     */
211
    public function setCourse(Course $course): Templates
212
    {
213
        $this->course = $course;
214
215
        return $this;
216
    }
217
}
218