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
|
|
|
* Page |
10
|
|
|
* |
11
|
|
|
* @ORM\Table(name="page", uniqueConstraints={@ORM\UniqueConstraint(name="guid_UNIQUE_page", columns={"guid"})}, indexes={@ORM\Index(name="fk_page_page1_idx", columns={"parent"})}) |
12
|
|
|
* @ORM\Entity |
13
|
|
|
* @ORM\EntityListeners({"PiouPiou\RibsAdminBundle\EventListener\GuidAwareListener", "PiouPiou\RibsAdminBundle\EventListener\CreateUpdateAwareListener"}) |
14
|
|
|
*/ |
15
|
|
|
class Page |
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="title_tag", type="string", length=70, nullable=true) |
33
|
|
|
*/ |
34
|
|
|
private $titleTag; |
35
|
|
|
|
36
|
|
|
/** |
37
|
|
|
* @var string |
38
|
|
|
* |
39
|
|
|
* @ORM\Column(name="description_tag", type="string", length=160, nullable=true) |
40
|
|
|
*/ |
41
|
|
|
private $descriptionTag; |
42
|
|
|
|
43
|
|
|
/** |
44
|
|
|
* @var string |
45
|
|
|
* |
46
|
|
|
* @ORM\Column(name="title", type="string", length=255, nullable=false) |
47
|
|
|
*/ |
48
|
|
|
private $title; |
49
|
|
|
|
50
|
|
|
/** |
51
|
|
|
* @var string |
52
|
|
|
* |
53
|
|
|
* @ORM\Column(name="template", type="string", length=255, nullable=false) |
54
|
|
|
*/ |
55
|
|
|
private $template; |
56
|
|
|
|
57
|
|
|
/** |
58
|
|
|
* @var string |
59
|
|
|
* |
60
|
|
|
* @ORM\Column(name="url", type="string", length=255, nullable=false) |
61
|
|
|
*/ |
62
|
|
|
private $url; |
63
|
|
|
|
64
|
|
|
/** |
65
|
|
|
* @var string |
66
|
|
|
* |
67
|
|
|
* @ORM\Column(name="content", type="text", nullable=true) |
68
|
|
|
*/ |
69
|
|
|
private $content; |
70
|
|
|
|
71
|
|
|
/** |
72
|
|
|
* @var integer |
73
|
|
|
* |
74
|
|
|
* @ORM\Column(name="active", type="integer", nullable=false) |
75
|
|
|
*/ |
76
|
|
|
private $active; |
77
|
|
|
|
78
|
|
|
/** |
79
|
|
|
* @var integer |
80
|
|
|
* |
81
|
|
|
* @ORM\Column(name="order", type="integer", nullable=false) |
82
|
|
|
*/ |
83
|
|
|
private $order; |
84
|
|
|
|
85
|
|
|
/** |
86
|
|
|
* @var integer |
87
|
|
|
* |
88
|
|
|
* @ORM\Column(name="displayed", type="integer", nullable=false) |
89
|
|
|
*/ |
90
|
|
|
private $displayed; |
91
|
|
|
|
92
|
|
|
/** |
93
|
|
|
* @var \Page |
94
|
|
|
* |
95
|
|
|
* @ORM\ManyToOne(targetEntity="Page") |
96
|
|
|
* @ORM\JoinColumns({ |
97
|
|
|
* @ORM\JoinColumn(name="parent", referencedColumnName="id") |
98
|
|
|
* }) |
99
|
|
|
*/ |
100
|
|
|
private $parent; |
101
|
|
|
|
102
|
|
|
/** |
103
|
|
|
* @return int |
104
|
|
|
*/ |
105
|
|
|
public function getId() |
106
|
|
|
{ |
107
|
|
|
return $this->id; |
108
|
|
|
} |
109
|
|
|
|
110
|
|
|
/** |
111
|
|
|
* @param int $id |
112
|
|
|
*/ |
113
|
|
|
public function setId($id) |
114
|
|
|
{ |
115
|
|
|
$this->id = $id; |
116
|
|
|
} |
117
|
|
|
|
118
|
|
|
/** |
119
|
|
|
* @return string |
120
|
|
|
*/ |
121
|
|
|
public function getTitleTag() |
122
|
|
|
{ |
123
|
|
|
return $this->titleTag; |
124
|
|
|
} |
125
|
|
|
|
126
|
|
|
/** |
127
|
|
|
* @param string $titleTag |
128
|
|
|
*/ |
129
|
|
|
public function setTitleTag($titleTag) |
130
|
|
|
{ |
131
|
|
|
$this->titleTag = $titleTag; |
132
|
|
|
} |
133
|
|
|
|
134
|
|
|
/** |
135
|
|
|
* @return string |
136
|
|
|
*/ |
137
|
|
|
public function getDescriptionTag() |
138
|
|
|
{ |
139
|
|
|
return $this->descriptionTag; |
140
|
|
|
} |
141
|
|
|
|
142
|
|
|
/** |
143
|
|
|
* @param string $descriptionTag |
144
|
|
|
*/ |
145
|
|
|
public function setDescriptionTag($descriptionTag) |
146
|
|
|
{ |
147
|
|
|
$this->descriptionTag = $descriptionTag; |
148
|
|
|
} |
149
|
|
|
|
150
|
|
|
/** |
151
|
|
|
* @return string |
152
|
|
|
*/ |
153
|
|
|
public function getTitle() |
154
|
|
|
{ |
155
|
|
|
return $this->title; |
156
|
|
|
} |
157
|
|
|
|
158
|
|
|
/** |
159
|
|
|
* @param string $title |
160
|
|
|
*/ |
161
|
|
|
public function setTitle($title) |
162
|
|
|
{ |
163
|
|
|
$this->title = $title; |
164
|
|
|
} |
165
|
|
|
|
166
|
|
|
/** |
167
|
|
|
* @return string |
168
|
|
|
*/ |
169
|
|
|
public function getTemplate() |
170
|
|
|
{ |
171
|
|
|
return $this->template; |
172
|
|
|
} |
173
|
|
|
|
174
|
|
|
/** |
175
|
|
|
* @param string $template |
176
|
|
|
*/ |
177
|
|
|
public function setTemplate($template) |
178
|
|
|
{ |
179
|
|
|
$this->template = $template; |
180
|
|
|
} |
181
|
|
|
|
182
|
|
|
/** |
183
|
|
|
* @return string |
184
|
|
|
*/ |
185
|
|
|
public function getUrl() |
186
|
|
|
{ |
187
|
|
|
return $this->url; |
188
|
|
|
} |
189
|
|
|
|
190
|
|
|
/** |
191
|
|
|
* @param string $url |
192
|
|
|
*/ |
193
|
|
|
public function setUrl($url) |
194
|
|
|
{ |
195
|
|
|
$this->url = $url; |
196
|
|
|
} |
197
|
|
|
|
198
|
|
|
/** |
199
|
|
|
* @return string |
200
|
|
|
*/ |
201
|
|
|
public function getContent() |
202
|
|
|
{ |
203
|
|
|
return $this->content; |
204
|
|
|
} |
205
|
|
|
|
206
|
|
|
/** |
207
|
|
|
* @param string $content |
208
|
|
|
*/ |
209
|
|
|
public function setContent($content) |
210
|
|
|
{ |
211
|
|
|
$this->content = $content; |
212
|
|
|
} |
213
|
|
|
|
214
|
|
|
/** |
215
|
|
|
* @return int |
216
|
|
|
*/ |
217
|
|
|
public function getActive() |
218
|
|
|
{ |
219
|
|
|
return $this->active; |
220
|
|
|
} |
221
|
|
|
|
222
|
|
|
/** |
223
|
|
|
* @param int $active |
224
|
|
|
*/ |
225
|
|
|
public function setActive($active) |
226
|
|
|
{ |
227
|
|
|
$this->active = $active; |
228
|
|
|
} |
229
|
|
|
|
230
|
|
|
/** |
231
|
|
|
* @return int |
232
|
|
|
*/ |
233
|
|
|
public function getOrder() |
234
|
|
|
{ |
235
|
|
|
return $this->order; |
236
|
|
|
} |
237
|
|
|
|
238
|
|
|
/** |
239
|
|
|
* @param int $order |
240
|
|
|
*/ |
241
|
|
|
public function setOrder($order) |
242
|
|
|
{ |
243
|
|
|
$this->order = $order; |
244
|
|
|
} |
245
|
|
|
|
246
|
|
|
/** |
247
|
|
|
* @return int |
248
|
|
|
*/ |
249
|
|
|
public function getDisplayed() |
250
|
|
|
{ |
251
|
|
|
return $this->displayed; |
252
|
|
|
} |
253
|
|
|
|
254
|
|
|
/** |
255
|
|
|
* @param int $displayed |
256
|
|
|
*/ |
257
|
|
|
public function setDisplayed($displayed) |
258
|
|
|
{ |
259
|
|
|
$this->displayed = $displayed; |
260
|
|
|
} |
261
|
|
|
|
262
|
|
|
/** |
263
|
|
|
* @return \Page |
264
|
|
|
*/ |
265
|
|
|
public function getParent() |
266
|
|
|
{ |
267
|
|
|
return $this->parent; |
268
|
|
|
} |
269
|
|
|
|
270
|
|
|
/** |
271
|
|
|
* @param \Page $parent |
272
|
|
|
*/ |
273
|
|
|
public function setParent($parent) |
274
|
|
|
{ |
275
|
|
|
$this->parent = $parent; |
276
|
|
|
} |
277
|
|
|
} |
278
|
|
|
|
279
|
|
|
|