1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Ribs\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", columns={"guid"})}, indexes={@ORM\Index(name="fk_page_page1_idx", columns={"parent"})}) |
12
|
|
|
* @ORM\Entity |
13
|
|
|
* @ORM\EntityListeners({"Ribs\RibsAdminBundle\EventListener\GuidAwareListener"}) |
14
|
|
|
*/ |
15
|
|
|
class Page |
16
|
|
|
{ |
17
|
|
|
/** |
18
|
|
|
* @var integer |
19
|
|
|
* |
20
|
|
|
* @ORM\Column(name="id", type="integer", nullable=false, options={"unsigned"=true}) |
21
|
|
|
* @ORM\Id |
22
|
|
|
* @ORM\GeneratedValue(strategy="IDENTITY") |
23
|
|
|
*/ |
24
|
|
|
private $id; |
25
|
|
|
|
26
|
|
|
/** |
27
|
|
|
* @var string |
28
|
|
|
* |
29
|
|
|
* @ORM\Column(name="guid", type="string", length=255, nullable=false) |
30
|
|
|
*/ |
31
|
|
|
private $guid; |
32
|
|
|
|
33
|
|
|
/** |
34
|
|
|
* @var string |
35
|
|
|
* |
36
|
|
|
* @ORM\Column(name="title_tag", type="string", length=70, nullable=true) |
37
|
|
|
*/ |
38
|
|
|
private $titleTag; |
39
|
|
|
|
40
|
|
|
/** |
41
|
|
|
* @var string |
42
|
|
|
* |
43
|
|
|
* @ORM\Column(name="description_tag", type="string", length=160, nullable=true) |
44
|
|
|
*/ |
45
|
|
|
private $descriptionTag; |
46
|
|
|
|
47
|
|
|
/** |
48
|
|
|
* @var string |
49
|
|
|
* |
50
|
|
|
* @ORM\Column(name="title", type="string", length=255, nullable=false) |
51
|
|
|
*/ |
52
|
|
|
private $title; |
53
|
|
|
|
54
|
|
|
/** |
55
|
|
|
* @var string |
56
|
|
|
* |
57
|
|
|
* @ORM\Column(name="content", type="text", nullable=true) |
58
|
|
|
*/ |
59
|
|
|
private $content; |
60
|
|
|
|
61
|
|
|
/** |
62
|
|
|
* @var integer |
63
|
|
|
* |
64
|
|
|
* @ORM\Column(name="active", type="integer", nullable=false) |
65
|
|
|
*/ |
66
|
|
|
private $active; |
67
|
|
|
|
68
|
|
|
/** |
69
|
|
|
* @var integer |
70
|
|
|
* |
71
|
|
|
* @ORM\Column(name="order", type="integer", nullable=false) |
72
|
|
|
*/ |
73
|
|
|
private $order; |
74
|
|
|
|
75
|
|
|
/** |
76
|
|
|
* @var integer |
77
|
|
|
* |
78
|
|
|
* @ORM\Column(name="displayed", type="integer", nullable=false) |
79
|
|
|
*/ |
80
|
|
|
private $displayed; |
81
|
|
|
|
82
|
|
|
/** |
83
|
|
|
* @var \Page |
84
|
|
|
* |
85
|
|
|
* @ORM\ManyToOne(targetEntity="Page") |
86
|
|
|
* @ORM\JoinColumns({ |
87
|
|
|
* @ORM\JoinColumn(name="parent", referencedColumnName="id") |
88
|
|
|
* }) |
89
|
|
|
*/ |
90
|
|
|
private $parent; |
91
|
|
|
|
92
|
|
|
/** |
93
|
|
|
* @var \DateTime |
94
|
|
|
* |
95
|
|
|
* @Gedmo\Timestampable(on="create") |
96
|
|
|
* @ORM\Column(name="creation_date", type="date", nullable=true) |
97
|
|
|
*/ |
98
|
|
|
private $creationDate; |
99
|
|
|
|
100
|
|
|
/** |
101
|
|
|
* @var \DateTime |
102
|
|
|
* |
103
|
|
|
* @Gedmo\Timestampable(on="update") |
104
|
|
|
* @ORM\Column(name="update_date", type="date", nullable=true) |
105
|
|
|
*/ |
106
|
|
|
private $updateDate; |
107
|
|
|
|
108
|
|
|
/** |
109
|
|
|
* @return int |
110
|
|
|
*/ |
111
|
|
|
public function getId() |
112
|
|
|
{ |
113
|
|
|
return $this->id; |
114
|
|
|
} |
115
|
|
|
|
116
|
|
|
/** |
117
|
|
|
* @param int $id |
118
|
|
|
*/ |
119
|
|
|
public function setId($id) |
120
|
|
|
{ |
121
|
|
|
$this->id = $id; |
122
|
|
|
} |
123
|
|
|
|
124
|
|
|
/** |
125
|
|
|
* @return string |
126
|
|
|
*/ |
127
|
|
|
public function getGuid() |
128
|
|
|
{ |
129
|
|
|
return $this->guid; |
130
|
|
|
} |
131
|
|
|
|
132
|
|
|
/** |
133
|
|
|
* @param string $guid |
134
|
|
|
*/ |
135
|
|
|
public function setGuid($guid) |
136
|
|
|
{ |
137
|
|
|
$this->guid = $guid; |
138
|
|
|
} |
139
|
|
|
|
140
|
|
|
/** |
141
|
|
|
* @return string |
142
|
|
|
*/ |
143
|
|
|
public function getTitleTag() |
144
|
|
|
{ |
145
|
|
|
return $this->titleTag; |
146
|
|
|
} |
147
|
|
|
|
148
|
|
|
/** |
149
|
|
|
* @param string $titleTag |
150
|
|
|
*/ |
151
|
|
|
public function setTitleTag($titleTag) |
152
|
|
|
{ |
153
|
|
|
$this->titleTag = $titleTag; |
154
|
|
|
} |
155
|
|
|
|
156
|
|
|
/** |
157
|
|
|
* @return string |
158
|
|
|
*/ |
159
|
|
|
public function getDescriptionTag() |
160
|
|
|
{ |
161
|
|
|
return $this->descriptionTag; |
162
|
|
|
} |
163
|
|
|
|
164
|
|
|
/** |
165
|
|
|
* @param string $descriptionTag |
166
|
|
|
*/ |
167
|
|
|
public function setDescriptionTag($descriptionTag) |
168
|
|
|
{ |
169
|
|
|
$this->descriptionTag = $descriptionTag; |
170
|
|
|
} |
171
|
|
|
|
172
|
|
|
/** |
173
|
|
|
* @return string |
174
|
|
|
*/ |
175
|
|
|
public function getTitle() |
176
|
|
|
{ |
177
|
|
|
return $this->title; |
178
|
|
|
} |
179
|
|
|
|
180
|
|
|
/** |
181
|
|
|
* @param string $title |
182
|
|
|
*/ |
183
|
|
|
public function setTitle($title) |
184
|
|
|
{ |
185
|
|
|
$this->title = $title; |
186
|
|
|
} |
187
|
|
|
|
188
|
|
|
/** |
189
|
|
|
* @return string |
190
|
|
|
*/ |
191
|
|
|
public function getContent() |
192
|
|
|
{ |
193
|
|
|
return $this->content; |
194
|
|
|
} |
195
|
|
|
|
196
|
|
|
/** |
197
|
|
|
* @param string $content |
198
|
|
|
*/ |
199
|
|
|
public function setContent($content) |
200
|
|
|
{ |
201
|
|
|
$this->content = $content; |
202
|
|
|
} |
203
|
|
|
|
204
|
|
|
/** |
205
|
|
|
* @return int |
206
|
|
|
*/ |
207
|
|
|
public function getActive() |
208
|
|
|
{ |
209
|
|
|
return $this->active; |
210
|
|
|
} |
211
|
|
|
|
212
|
|
|
/** |
213
|
|
|
* @param int $active |
214
|
|
|
*/ |
215
|
|
|
public function setActive($active) |
216
|
|
|
{ |
217
|
|
|
$this->active = $active; |
218
|
|
|
} |
219
|
|
|
|
220
|
|
|
/** |
221
|
|
|
* @return int |
222
|
|
|
*/ |
223
|
|
|
public function getOrder() |
224
|
|
|
{ |
225
|
|
|
return $this->order; |
226
|
|
|
} |
227
|
|
|
|
228
|
|
|
/** |
229
|
|
|
* @param int $order |
230
|
|
|
*/ |
231
|
|
|
public function setOrder($order) |
232
|
|
|
{ |
233
|
|
|
$this->order = $order; |
234
|
|
|
} |
235
|
|
|
|
236
|
|
|
/** |
237
|
|
|
* @return int |
238
|
|
|
*/ |
239
|
|
|
public function getDisplayed() |
240
|
|
|
{ |
241
|
|
|
return $this->displayed; |
242
|
|
|
} |
243
|
|
|
|
244
|
|
|
/** |
245
|
|
|
* @param int $displayed |
246
|
|
|
*/ |
247
|
|
|
public function setDisplayed($displayed) |
248
|
|
|
{ |
249
|
|
|
$this->displayed = $displayed; |
250
|
|
|
} |
251
|
|
|
|
252
|
|
|
/** |
253
|
|
|
* @return \Page |
254
|
|
|
*/ |
255
|
|
|
public function getParent() |
256
|
|
|
{ |
257
|
|
|
return $this->parent; |
258
|
|
|
} |
259
|
|
|
|
260
|
|
|
/** |
261
|
|
|
* @param \Page $parent |
262
|
|
|
*/ |
263
|
|
|
public function setParent($parent) |
264
|
|
|
{ |
265
|
|
|
$this->parent = $parent; |
266
|
|
|
} |
267
|
|
|
|
268
|
|
|
/** |
269
|
|
|
* @return \DateTime |
270
|
|
|
*/ |
271
|
|
|
public function getCreationDate(): \DateTime |
272
|
|
|
{ |
273
|
|
|
return $this->creationDate; |
274
|
|
|
} |
275
|
|
|
|
276
|
|
|
/** |
277
|
|
|
* @param \DateTime $creationDate |
278
|
|
|
*/ |
279
|
|
|
public function setCreationDate(\DateTime $creationDate) |
280
|
|
|
{ |
281
|
|
|
$this->creationDate = $creationDate; |
282
|
|
|
} |
283
|
|
|
|
284
|
|
|
/** |
285
|
|
|
* @return \DateTime |
286
|
|
|
*/ |
287
|
|
|
public function getUpdateDate(): \DateTime |
288
|
|
|
{ |
289
|
|
|
return $this->updateDate; |
290
|
|
|
} |
291
|
|
|
|
292
|
|
|
/** |
293
|
|
|
* @param \DateTime $updateDate |
294
|
|
|
*/ |
295
|
|
|
public function setUpdateDate(\DateTime $updateDate) |
296
|
|
|
{ |
297
|
|
|
$this->updateDate = $updateDate; |
298
|
|
|
} |
299
|
|
|
} |
300
|
|
|
|
301
|
|
|
|