Completed
Push — master ( 121b59...921fdf )
by Craig
07:11
created

ThemeEntity::setDisplayname()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
/*
4
 * This file is part of the Zikula package.
5
 *
6
 * Copyright Zikula Foundation - http://zikula.org/
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Zikula\ThemeModule\Entity;
13
14
use Zikula\Core\Doctrine\EntityAccess;
15
use Doctrine\ORM\Mapping as ORM;
16
use Zikula\ThemeModule\Entity\Repository\ThemeEntityRepository;
17
18
/**
19
 * Theme entity class.
20
 *
21
 * @ORM\Entity(repositoryClass="Zikula\ThemeModule\Entity\Repository\ThemeEntityRepository")
22
 * @ORM\Table(name="themes")
23
 */
24
class ThemeEntity extends EntityAccess
25
{
26
    /**
27
     * theme id
28
     *
29
     * @ORM\Id
30
     * @ORM\Column(type="integer")
31
     * @ORM\GeneratedValue(strategy="AUTO")
32
     */
33
    private $id;
34
35
    /**
36
     * theme name
37
     *
38
     * @ORM\Column(type="string", length=64)
39
     */
40
    private $name;
41
42
    /**
43
     * theme type
44
     *
45
     * @ORM\Column(type="smallint")
46
     */
47
    private $type;
48
49
    /**
50
     * display name for theme
51
     *
52
     * @ORM\Column(type="string", length=64)
53
     */
54
    private $displayname;
55
56
    /**
57
     * theme description
58
     *
59
     * @ORM\Column(type="string", length=255)
60
     */
61
    private $description;
62
63
    /**
64
     * theme version
65
     *
66
     * @ORM\Column(type="string", length=10)
67
     */
68
    private $version;
69
70
    /**
71
     * contact for theme
72
     *
73
     * @ORM\Column(type="string", length=255)
74
     */
75
    private $contact;
76
77
    /**
78
     * is theme an admin capable theme
79
     *
80
     * @ORM\Column(type="smallint")
81
     */
82
    private $admin;
83
84
    /**
85
     * is theme an user capable theme
86
     *
87
     * @ORM\Column(type="smallint")
88
     */
89
    private $user;
90
91
    /**
92
     * is theme an system theme
93
     *
94
     * @ORM\Column(type="smallint")
95
     */
96
    private $system;
97
98
    /**
99
     * state of the theme
100
     *
101
     * @ORM\Column(type="smallint")
102
     */
103
    private $state;
104
105
    /**
106
     * is theme xhtml compliant
107
     *
108
     * @ORM\Column(type="smallint")
109
     */
110
    private $xhtml;
111
112
    /**
113
     * constructor
114
     */
115
    public function __construct()
116
    {
117
        $this->name = '';
118
        $this->type = 0;
119
        $this->displayname = '';
120
        $this->description = '';
121
        $this->directory = '';
0 ignored issues
show
Bug introduced by
The property directory does not exist. Did you maybe forget to declare it?

In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:

class MyClass { }

$x = new MyClass();
$x->foo = true;

Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion:

class MyClass {
    public $foo;
}

$x = new MyClass();
$x->foo = true;
Loading history...
122
        $this->version = '0.0';
123
        $this->contact = '';
124
        $this->admin = 0;
125
        $this->user = 0;
126
        $this->system = 0;
127
        $this->state = ThemeEntityRepository::STATE_INACTIVE;
128
        $this->xhtml = 1;
129
    }
130
131
    /**
132
     * get the id of the theme
133
     *
134
     * @return integer the theme's id
135
     */
136
    public function getId()
137
    {
138
        return $this->id;
139
    }
140
141
    /**
142
     * set the id for the theme
143
     *
144
     * @param integer $id the theme's id
145
     */
146
    public function setId($id)
147
    {
148
        $this->id = $id;
149
    }
150
151
    /**
152
     * get the name of the theme
153
     *
154
     * @return string the theme's name
155
     */
156
    public function getName()
157
    {
158
        return $this->name;
159
    }
160
161
    /**
162
     * set the name for the theme
163
     *
164
     * @param string $name the theme's name
165
     */
166
    public function setName($name)
167
    {
168
        $this->name = $name;
169
    }
170
171
    /**
172
     * get the type of the theme
173
     *
174
     * @return integer the theme's type
175
     */
176
    public function getType()
177
    {
178
        return $this->type;
179
    }
180
181
    /**
182
     * set the type for the theme
183
     *
184
     * @param integer $type the theme's type
185
     */
186
    public function setType($type)
187
    {
188
        $this->type = $type;
189
    }
190
191
    /**
192
     * get the displayname of the theme
193
     *
194
     * @return string the theme's displayname
195
     */
196
    public function getDisplayname()
197
    {
198
        return $this->displayname;
199
    }
200
201
    /**
202
     * set the displayname for the theme
203
     *
204
     * @param string $displayname the theme's displayname
205
     */
206
    public function setDisplayname($displayname)
207
    {
208
        $this->displayname = $displayname;
209
    }
210
211
    /**
212
     * get the description of the theme
213
     *
214
     * @return string the theme's description
215
     */
216
    public function getDescription()
217
    {
218
        return $this->description;
219
    }
220
221
    /**
222
     * set the description for the theme
223
     *
224
     * @param string $description the theme's description
225
     */
226
    public function setDescription($description)
227
    {
228
        $this->description = $description;
229
    }
230
231
    /**
232
     * get the version of the theme
233
     *
234
     * @return string the theme's version
235
     */
236
    public function getVersion()
237
    {
238
        return $this->version;
239
    }
240
241
    /**
242
     * set the version for the theme
243
     *
244
     * @param string $version the theme's version
245
     */
246
    public function setVersion($version)
247
    {
248
        $this->version = $version;
249
    }
250
251
    /**
252
     * get the contact of the theme
253
     *
254
     * @return string the theme's contact
255
     */
256
    public function getContact()
257
    {
258
        return $this->contact;
259
    }
260
261
    /**
262
     * set the contact for the theme
263
     *
264
     * @param string $contact the theme's contact
265
     */
266
    public function setContact($contact)
267
    {
268
        $this->contact = $contact;
269
    }
270
271
    /**
272
     * get the admin of the theme
273
     *
274
     * @return integer the theme's admin
275
     */
276
    public function getAdmin()
277
    {
278
        return $this->admin;
279
    }
280
281
    /**
282
     * set the admin for the theme
283
     *
284
     * @param integer $admin the theme's admin
285
     */
286
    public function setAdmin($admin)
287
    {
288
        $this->admin = $admin;
289
    }
290
291
    /**
292
     * get the user of the theme
293
     *
294
     * @return integer the theme's user
295
     */
296
    public function getUser()
297
    {
298
        return $this->user;
299
    }
300
301
    /**
302
     * set the user for the theme
303
     *
304
     * @param integer $user the theme's user
305
     */
306
    public function setUser($user)
307
    {
308
        $this->user = $user;
309
    }
310
311
    /**
312
     * get the system of the theme
313
     *
314
     * @return integer the theme's system
315
     */
316
    public function getSystem()
317
    {
318
        return $this->system;
319
    }
320
321
    /**
322
     * set the system for the theme
323
     *
324
     * @param integer $system the theme's system
325
     */
326
    public function setSystem($system)
327
    {
328
        $this->system = $system;
329
    }
330
331
    /**
332
     * get the state of the theme
333
     *
334
     * @return integer the theme's state
335
     */
336
    public function getState()
337
    {
338
        return $this->state;
339
    }
340
341
    /**
342
     * set the state for the theme
343
     *
344
     * @param integer $state the theme's state
345
     */
346
    public function setState($state)
347
    {
348
        $this->state = $state;
349
    }
350
351
    /**
352
     * get the xhtml of the theme
353
     *
354
     * @return integer the theme's xhtml
355
     */
356
    public function getXhtml()
357
    {
358
        return $this->xhtml;
359
    }
360
361
    /**
362
     * set the xhtml for the theme
363
     *
364
     * @param integer $xhtml the theme's xhtml
365
     */
366
    public function setXhtml($xhtml)
367
    {
368
        $this->xhtml = $xhtml;
369
    }
370
}
371