Module   A
last analyzed

Complexity

Total Complexity 28

Size/Duplication

Total Lines 294
Duplicated Lines 0 %

Importance

Changes 7
Bugs 0 Features 3
Metric Value
eloc 42
c 7
b 0
f 3
dl 0
loc 294
rs 10
wmc 28

26 Methods

Rating   Name   Duplication   Size   Complexity  
A setActive() 0 3 1
A getUrlAdmin() 0 3 1
A getDisplayed() 0 3 1
A getTitle() 0 3 1
A getUrl() 0 3 1
A getTemplate() 0 3 1
A getOrder() 0 3 1
A getFormattedDisplayed() 0 3 2
A setDevMode() 0 5 1
A getTitleTag() 0 3 1
A getId() 0 3 1
A setDisplayed() 0 3 1
A setId() 0 3 1
A getDescriptionTag() 0 3 1
A setPackageName() 0 3 1
A setDescriptionTag() 0 3 1
A setTemplate() 0 3 1
A getDevMode() 0 3 1
A getActive() 0 3 1
A setUrlAdmin() 0 3 1
A setUrl() 0 3 1
A getPackageName() 0 3 1
A setOrder() 0 3 1
A setTitle() 0 3 1
A setTitleTag() 0 3 1
A getFormattedActive() 0 3 2
1
<?php
2
3
namespace PiouPiou\RibsAdminBundle\Entity;
4
5
use Doctrine\ORM\Mapping as ORM;
6
use Gedmo\Mapping\Annotation as Gedmo;
7
8
/**
9
 * Module
10
 *
11
 * @ORM\Table(name="module", uniqueConstraints={@ORM\UniqueConstraint(name="guid_UNIQUE_module", columns={"guid"})})
12
 * @ORM\Entity
13
 * @ORM\EntityListeners({"PiouPiou\RibsAdminBundle\EventListener\GuidAwareListener", "PiouPiou\RibsAdminBundle\EventListener\CreateUpdateAwareListener"})
14
 */
15
class Module
16
{
17
    use GuidTrait;
18
    use CreatedUpdatedTrait;
19
20
    /**
21
     * @var integer
22
     *
23
     * @ORM\Column(name="id", type="integer", nullable=false, options={"unsigned"=true})
24
     * @ORM\Id
25
     * @ORM\GeneratedValue(strategy="IDENTITY")
26
     */
27
    private $id;
28
29
    /**
30
     * @var string
31
     *
32
     * @ORM\Column(name="package_name", type="string", length=255, nullable=false)
33
     */
34
    private $packageName;
35
36
    /**
37
     * @var string
38
     *
39
     * @ORM\Column(name="title_tag", type="string", length=70, nullable=true)
40
     */
41
    private $titleTag;
42
43
    /**
44
     * @var string
45
     *
46
     * @ORM\Column(name="description_tag", type="string", length=160, nullable=true)
47
     */
48
    private $descriptionTag;
49
50
    /**
51
     * @var string
52
     *
53
     * @ORM\Column(name="title", type="string", length=255, nullable=false)
54
     */
55
    private $title;
56
57
    /**
58
     * @var string
59
     *
60
     * @ORM\Column(name="template", type="string", length=255, nullable=true)
61
     */
62
    private $template;
63
64
    /**
65
     * @var string
66
     *
67
     * @ORM\Column(name="url", type="string", length=255, nullable=true)
68
     */
69
    private $url;
70
71
    /**
72
     * @var string
73
     *
74
     * @ORM\Column(name="url_admin", type="string", length=255, nullable=true)
75
     */
76
    private $urlAdmin;
77
78
    /**
79
     * @var boolean
80
     *
81
     * @ORM\Column(name="active", type="boolean", nullable=false)
82
     */
83
    private $active;
84
85
    /**
86
     * @var integer
87
     *
88
     * @ORM\Column(name="`order`", type="integer", nullable=true)
89
     */
90
    private $order;
91
92
    /**
93
     * @var boolean
94
     *
95
     * @ORM\Column(name="displayed", type="boolean", nullable=false)
96
     */
97
    private $displayed;
98
99
    /**
100
     * @var boolean
101
     *
102
     * @ORM\Column(name="dev_mode", type="boolean", nullable=false)
103
     */
104
    private $devMode = false;
105
106
    /**
107
     * @return int
108
     */
109
    public function getId(): int
110
    {
111
        return $this->id;
112
    }
113
114
    /**
115
     * @param int $id
116
     */
117
    public function setId(int $id)
118
    {
119
        $this->id = $id;
120
    }
121
122
    /**
123
     * @return string
124
     */
125
    public function getPackageName(): ?string
126
    {
127
        return $this->packageName;
128
    }
129
130
    /**
131
     * @param string $package_name
132
     */
133
    public function setPackageName(string $package_name)
134
    {
135
        $this->packageName = $package_name;
136
    }
137
138
    /**
139
     * @return string
140
     */
141
    public function getTitleTag(): ?string
142
    {
143
        return $this->titleTag;
144
    }
145
146
    /**
147
     * @param string $titleTag
148
     */
149
    public function setTitleTag(string $titleTag)
150
    {
151
        $this->titleTag = $titleTag;
152
    }
153
154
    /**
155
     * @return string
156
     */
157
    public function getDescriptionTag(): ?string
158
    {
159
        return $this->descriptionTag;
160
    }
161
162
    /**
163
     * @param string $descriptionTag
164
     */
165
    public function setDescriptionTag(string $descriptionTag)
166
    {
167
        $this->descriptionTag = $descriptionTag;
168
    }
169
170
    /**
171
     * @return string
172
     */
173
    public function getTitle(): ?string
174
    {
175
        return $this->title;
176
    }
177
178
    /**
179
     * @param string $title
180
     */
181
    public function setTitle(string $title)
182
    {
183
        $this->title = $title;
184
    }
185
186
    /**
187
     * @return string
188
     */
189
    public function getTemplate(): ?string
190
    {
191
        return $this->template;
192
    }
193
194
    /**
195
     * @param string $template
196
     */
197
    public function setTemplate(string $template)
198
    {
199
        $this->template = $template;
200
    }
201
202
    /**
203
     * @return string
204
     */
205
    public function getUrl(): ?string
206
    {
207
        return $this->url;
208
    }
209
210
    /**
211
     * @param string $url
212
     */
213
    public function setUrl(string $url)
214
    {
215
        $this->url = $url;
216
    }
217
218
    /**
219
     * @return string
220
     */
221
    public function getUrlAdmin(): ?string
222
    {
223
        return $this->urlAdmin;
224
    }
225
226
    /**
227
     * @param string $urlAdmin
228
     */
229
    public function setUrlAdmin(string $urlAdmin)
230
    {
231
        $this->urlAdmin = $urlAdmin;
232
    }
233
234
    /**
235
     * @return boolean
236
     */
237
    public function getActive(): ?bool
238
    {
239
        return $this->active;
240
    }
241
242
    /**
243
     * @param bool $active
244
     */
245
    public function setActive(bool $active)
246
    {
247
        $this->active = $active;
248
    }
249
250
    /**
251
     * @return int
252
     */
253
    public function getOrder(): ?int
254
    {
255
        return $this->order;
256
    }
257
258
    /**
259
     * @param int $order
260
     */
261
    public function setOrder(int $order)
262
    {
263
        $this->order = $order;
264
    }
265
266
    /**
267
     * @return bool
268
     */
269
    public function getDisplayed(): ?bool
270
    {
271
        return $this->displayed;
272
    }
273
274
    /**
275
     * @param bool $displayed
276
     */
277
    public function setDisplayed(bool $displayed)
278
    {
279
        $this->displayed = $displayed;
280
    }
281
282
    /**
283
     * @return bool
284
     */
285
    public function getDevMode(): bool
286
    {
287
        return $this->devMode;
288
    }
289
290
    /**
291
     * @param bool $devMode
292
     * @return Module
293
     */
294
    public function setDevMode(bool $devMode): Module
295
    {
296
        $this->devMode = $devMode;
297
298
        return $this;
299
    }
300
301
    public function getFormattedActive()
302
    {
303
        return $this->getActive() ? "Oui" : "Non";
304
    }
305
306
    public function getFormattedDisplayed()
307
    {
308
        return $this->getDisplayed() ? "Oui" : "Non";
309
    }
310
}
311