Passed
Push — master ( 06a804...32f36d )
by Julito
13:31
created

SettingsCurrent::setVariable()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 5
rs 10
c 0
b 0
f 0
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
 * SettingsCurrent.
10
 *
11
 * @ORM\Table(
12
 *     name="settings_current",
13
 *     options={"row_format":"DYNAMIC"},
14
 *     uniqueConstraints={
15
 *     @ORM\UniqueConstraint(
16
 *         name="unique_setting",
17
 *         columns={"variable", "subkey", "access_url"})
18
 *     },
19
 *     indexes={@ORM\Index(name="access_url", columns={"access_url"})}
20
 * )
21
 * @ORM\Entity
22
 */
23
class SettingsCurrent
24
{
25
    /**
26
     * @ORM\ManyToOne(targetEntity="AccessUrl", inversedBy="settings", cascade={"persist"})
27
     * @ORM\JoinColumn(name="access_url", referencedColumnName="id")
28
     */
29
    protected $url;
30
    /**
31
     * @var int
32
     *
33
     * @ORM\Column(name="id", type="integer")
34
     * @ORM\Id
35
     * @ORM\GeneratedValue
36
     */
37
    protected $id;
38
39
    /**
40
     * @var string
41
     *
42
     * @ORM\Column(name="variable", type="string", length=190, nullable=true)
43
     */
44
    protected $variable;
45
46
    /**
47
     * @var string
48
     *
49
     * @ORM\Column(name="subkey", type="string", length=190, nullable=true)
50
     */
51
    protected $subkey;
52
53
    /**
54
     * @var string
55
     *
56
     * @ORM\Column(name="type", type="string", length=255, nullable=true)
57
     */
58
    protected $type;
59
60
    /**
61
     * @var string
62
     *
63
     * @ORM\Column(name="category", type="string", length=255, nullable=true)
64
     */
65
    protected $category;
66
67
    /**
68
     * @var string
69
     *
70
     * @ORM\Column(name="selected_value", type="string", length=255, nullable=true)
71
     */
72
    protected $selectedValue;
73
74
    /**
75
     * @var string
76
     *
77
     * @ORM\Column(name="title", type="string", length=255, nullable=false)
78
     */
79
    protected $title;
80
81
    /**
82
     * @var string
83
     *
84
     * @ORM\Column(name="comment", type="string", length=255, nullable=true)
85
     */
86
    protected $comment;
87
88
    /**
89
     * @var string
90
     *
91
     * @ORM\Column(name="scope", type="string", length=50, nullable=true)
92
     */
93
    protected $scope;
94
95
    /**
96
     * @var string
97
     *
98
     * @ORM\Column(name="subkeytext", type="string", length=255, nullable=true)
99
     */
100
    protected $subkeytext;
101
102
    /**
103
     * @var int
104
     *
105
     * @ORM\Column(name="access_url", type="integer", nullable=false, options={"default": 1 } )
106
     */
107
    protected $accessUrl;
108
109
    /**
110
     * @var int
111
     *
112
     * @ORM\Column(name="access_url_changeable", type="integer", nullable=false)
113
     */
114
    protected $accessUrlChangeable;
115
116
    /**
117
     * @var int
118
     *
119
     * @ORM\Column(name="access_url_locked", type="integer", nullable=false, options={"default": 0 } )
120
     */
121
    protected $accessUrlLocked = 0;
122
123
    /**
124
     * Constructor.
125
     */
126
    public function __construct()
127
    {
128
        $this->accessUrlLocked = 0;
129
    }
130
131
    /**
132
     * Set variable.
133
     *
134
     * @param string $variable
135
     *
136
     * @return SettingsCurrent
137
     */
138
    public function setVariable($variable)
139
    {
140
        $this->variable = $variable;
141
142
        return $this;
143
    }
144
145
    /**
146
     * Get variable.
147
     *
148
     * @return string
149
     */
150
    public function getVariable()
151
    {
152
        return $this->variable;
153
    }
154
155
    /**
156
     * Set subkey.
157
     *
158
     * @param string $subkey
159
     *
160
     * @return SettingsCurrent
161
     */
162
    public function setSubkey($subkey)
163
    {
164
        $this->subkey = $subkey;
165
166
        return $this;
167
    }
168
169
    /**
170
     * Get subkey.
171
     *
172
     * @return string
173
     */
174
    public function getSubkey()
175
    {
176
        return $this->subkey;
177
    }
178
179
    /**
180
     * Set type.
181
     *
182
     * @param string $type
183
     *
184
     * @return SettingsCurrent
185
     */
186
    public function setType($type)
187
    {
188
        $this->type = $type;
189
190
        return $this;
191
    }
192
193
    /**
194
     * Get type.
195
     *
196
     * @return string
197
     */
198
    public function getType()
199
    {
200
        return $this->type;
201
    }
202
203
    /**
204
     * Set category.
205
     *
206
     * @param string $category
207
     *
208
     * @return SettingsCurrent
209
     */
210
    public function setCategory($category)
211
    {
212
        $this->category = $category;
213
214
        return $this;
215
    }
216
217
    /**
218
     * Get category.
219
     *
220
     * @return string
221
     */
222
    public function getCategory()
223
    {
224
        return $this->category;
225
    }
226
227
    /**
228
     * Set selectedValue.
229
     *
230
     * @param string $selectedValue
231
     *
232
     * @return SettingsCurrent
233
     */
234
    public function setSelectedValue($selectedValue)
235
    {
236
        $this->selectedValue = $selectedValue;
237
238
        return $this;
239
    }
240
241
    /**
242
     * Get selectedValue.
243
     *
244
     * @return string
245
     */
246
    public function getSelectedValue()
247
    {
248
        return $this->selectedValue;
249
    }
250
251
    /**
252
     * Set title.
253
     *
254
     * @param string $title
255
     *
256
     * @return SettingsCurrent
257
     */
258
    public function setTitle($title)
259
    {
260
        $this->title = $title;
261
262
        return $this;
263
    }
264
265
    /**
266
     * Get title.
267
     *
268
     * @return string
269
     */
270
    public function getTitle()
271
    {
272
        return $this->title;
273
    }
274
275
    /**
276
     * Set comment.
277
     *
278
     * @param string $comment
279
     *
280
     * @return SettingsCurrent
281
     */
282
    public function setComment($comment)
283
    {
284
        $this->comment = $comment;
285
286
        return $this;
287
    }
288
289
    /**
290
     * Get comment.
291
     *
292
     * @return string
293
     */
294
    public function getComment()
295
    {
296
        return $this->comment;
297
    }
298
299
    /**
300
     * Set scope.
301
     *
302
     * @param string $scope
303
     *
304
     * @return SettingsCurrent
305
     */
306
    public function setScope($scope)
307
    {
308
        $this->scope = $scope;
309
310
        return $this;
311
    }
312
313
    /**
314
     * Get scope.
315
     *
316
     * @return string
317
     */
318
    public function getScope()
319
    {
320
        return $this->scope;
321
    }
322
323
    /**
324
     * Set subkeytext.
325
     *
326
     * @param string $subkeytext
327
     *
328
     * @return SettingsCurrent
329
     */
330
    public function setSubkeytext($subkeytext)
331
    {
332
        $this->subkeytext = $subkeytext;
333
334
        return $this;
335
    }
336
337
    /**
338
     * Get subkeytext.
339
     *
340
     * @return string
341
     */
342
    public function getSubkeytext()
343
    {
344
        return $this->subkeytext;
345
    }
346
347
    /**
348
     * Set accessUrl.
349
     *
350
     * @param int $accessUrl
351
     *
352
     * @return SettingsCurrent
353
     */
354
    public function setAccessUrl($accessUrl)
355
    {
356
        $this->accessUrl = $accessUrl;
357
358
        return $this;
359
    }
360
361
    /**
362
     * Get accessUrl.
363
     *
364
     * @return int
365
     */
366
    public function getAccessUrl()
367
    {
368
        return $this->accessUrl;
369
    }
370
371
    /**
372
     * Set accessUrlChangeable.
373
     *
374
     * @param int $accessUrlChangeable
375
     *
376
     * @return SettingsCurrent
377
     */
378
    public function setAccessUrlChangeable($accessUrlChangeable)
379
    {
380
        $this->accessUrlChangeable = $accessUrlChangeable;
381
382
        return $this;
383
    }
384
385
    /**
386
     * Get accessUrlChangeable.
387
     *
388
     * @return int
389
     */
390
    public function getAccessUrlChangeable()
391
    {
392
        return $this->accessUrlChangeable;
393
    }
394
395
    /**
396
     * Set accessUrlLocked.
397
     *
398
     * @param int $accessUrlLocked
399
     *
400
     * @return SettingsCurrent
401
     */
402
    public function setAccessUrlLocked($accessUrlLocked)
403
    {
404
        $this->accessUrlLocked = intval($accessUrlLocked);
405
406
        return $this;
407
    }
408
409
    /**
410
     * Get accessUrlLocked.
411
     *
412
     * @return int
413
     */
414
    public function getAccessUrlLocked()
415
    {
416
        return $this->accessUrlLocked;
417
    }
418
419
    /**
420
     * Get id.
421
     *
422
     * @return int
423
     */
424
    public function getId()
425
    {
426
        return $this->id;
427
    }
428
429
    /**
430
     * @return AccessUrl
431
     */
432
    public function getUrl()
433
    {
434
        return $this->url;
435
    }
436
437
    /**
438
     * @param AccessUrl $url
439
     *
440
     * @return SettingsCurrent
441
     */
442
    public function setUrl($url)
443
    {
444
        $this->url = $url;
445
446
        return $this;
447
    }
448
}
449