1 | <?php |
||
19 | abstract class Node implements MetaTagPlaceholderInterface, TranslatableInterface |
||
20 | { |
||
21 | /** |
||
22 | * @var int |
||
23 | * |
||
24 | * @ORM\Column(name="node_id", type="integer") |
||
25 | * @ORM\Id |
||
26 | * @ORM\GeneratedValue(strategy="AUTO") |
||
27 | */ |
||
28 | protected $id; |
||
29 | |||
30 | /** |
||
31 | * @var string |
||
32 | * |
||
33 | * @ORM\Column(name="locale", type="string", length=10, nullable=true) |
||
34 | */ |
||
35 | protected $locale; |
||
36 | |||
37 | /** |
||
38 | * @var \Alpixel\Bundle\CMSBundle\Entity\Node |
||
39 | * |
||
40 | * @ORM\ManyToOne(targetEntity="Alpixel\Bundle\CMSBundle\Entity\Node") |
||
41 | * @ORM\JoinColumn(name="translation_source_id",referencedColumnName="node_id", nullable=true, onDelete="SET NULL") |
||
42 | */ |
||
43 | protected $translationSource; |
||
44 | |||
45 | /** |
||
46 | * @var string |
||
47 | * |
||
48 | * @ORM\Column(name="title", type="string", length=255, nullable=false) |
||
49 | */ |
||
50 | protected $title; |
||
51 | |||
52 | /** |
||
53 | * @var string |
||
54 | * |
||
55 | * @ORM\Column(name="content", type="text", nullable=true) |
||
56 | */ |
||
57 | protected $content; |
||
58 | |||
59 | /** |
||
60 | * @var \DateTime |
||
61 | * |
||
62 | * @Gedmo\Timestampable(on="create") |
||
63 | * @ORM\Column(name="date_created", type="datetime", nullable=false) |
||
64 | */ |
||
65 | protected $dateCreated; |
||
66 | |||
67 | /** |
||
68 | * @var \DateTime |
||
69 | * @Gedmo\Timestampable(on="update") |
||
70 | * @ORM\Column(name="date_updated", type="datetime", nullable=false) |
||
71 | */ |
||
72 | protected $dateUpdated; |
||
73 | |||
74 | /** |
||
75 | * @var bool |
||
76 | * |
||
77 | * @ORM\Column(name="published", type="boolean", nullable=false, options={"default"= true}) |
||
78 | */ |
||
79 | protected $published; |
||
80 | |||
81 | /** |
||
82 | * @var int |
||
83 | * @Gedmo\SortablePosition |
||
84 | * @ORM\Column(name="position", type="integer", nullable=false) |
||
85 | */ |
||
86 | protected $position; |
||
87 | |||
88 | /** |
||
89 | * @Gedmo\Slug(fields={"title"}, updatable=false, separator="-") |
||
90 | * @ORM\Column(length=128, unique=true) |
||
91 | **/ |
||
92 | protected $slug; |
||
93 | |||
94 | public function __construct() |
||
95 | { |
||
96 | } |
||
97 | |||
98 | abstract public function getType(); |
||
99 | |||
100 | public function __clone() |
||
108 | |||
109 | public function getUriParameters() |
||
116 | |||
117 | public function getPlaceholders() |
||
124 | |||
125 | public function __toString() |
||
129 | |||
130 | /** |
||
131 | * Gets the value of id. |
||
132 | * |
||
133 | * @return int |
||
134 | */ |
||
135 | public function getId() |
||
139 | |||
140 | /** |
||
141 | * Sets the value of id. |
||
142 | * |
||
143 | * @param int $id the id |
||
144 | * |
||
145 | * @return self |
||
146 | */ |
||
147 | public function setId($id) |
||
153 | |||
154 | /** |
||
155 | * Gets the value of title. |
||
156 | * |
||
157 | * @return string |
||
158 | */ |
||
159 | public function getTitle() |
||
163 | |||
164 | /** |
||
165 | * Sets the value of title. |
||
166 | * |
||
167 | * @param string $title the title |
||
168 | * |
||
169 | * @return self |
||
170 | */ |
||
171 | public function setTitle($title) |
||
177 | |||
178 | /** |
||
179 | * Gets the value of content. |
||
180 | * |
||
181 | * @return string |
||
182 | */ |
||
183 | public function getContent() |
||
187 | |||
188 | /** |
||
189 | * Sets the value of content. |
||
190 | * |
||
191 | * @param string $content the content |
||
192 | * |
||
193 | * @return self |
||
194 | */ |
||
195 | public function setContent($content) |
||
201 | |||
202 | /** |
||
203 | * Gets the value of dateCreated. |
||
204 | * |
||
205 | * @return \DateTime |
||
206 | */ |
||
207 | public function getDateCreated() |
||
211 | |||
212 | /** |
||
213 | * Sets the value of dateCreated. |
||
214 | * |
||
215 | * @param \DateTime $dateCreated the date created |
||
216 | * |
||
217 | * @return self |
||
218 | */ |
||
219 | public function setDateCreated(\DateTime $dateCreated) |
||
225 | |||
226 | /** |
||
227 | * Gets the value of dateUpdated. |
||
228 | * |
||
229 | * @return \DateTime |
||
230 | */ |
||
231 | public function getDateUpdated() |
||
235 | |||
236 | /** |
||
237 | * Sets the value of dateUpdated. |
||
238 | * |
||
239 | * @param \DateTime $dateUpdated the date updated |
||
240 | * |
||
241 | * @return self |
||
242 | */ |
||
243 | public function setDateUpdated(\DateTime $dateUpdated) |
||
249 | |||
250 | /** |
||
251 | * Gets the value of published. |
||
252 | * |
||
253 | * @return bool |
||
254 | */ |
||
255 | public function getPublished() |
||
259 | |||
260 | /** |
||
261 | * Sets the value of published. |
||
262 | * |
||
263 | * @param bool $published the published |
||
264 | * |
||
265 | * @return self |
||
266 | */ |
||
267 | public function setPublished($published) |
||
273 | |||
274 | /** |
||
275 | * Gets the value of position. |
||
276 | * |
||
277 | * @return int |
||
278 | */ |
||
279 | public function getPosition() |
||
283 | |||
284 | /** |
||
285 | * Sets the value of position. |
||
286 | * |
||
287 | * @param int $position the position |
||
288 | * |
||
289 | * @return self |
||
290 | */ |
||
291 | public function setPosition($position) |
||
297 | |||
298 | /** |
||
299 | * Gets the value of slug. |
||
300 | * |
||
301 | * @return mixed |
||
302 | */ |
||
303 | public function getSlug() |
||
307 | |||
308 | /** |
||
309 | * Sets the value of slug. |
||
310 | * |
||
311 | * @param mixed $slug the slug |
||
312 | * |
||
313 | * @return self |
||
314 | */ |
||
315 | public function setSlug($slug) |
||
321 | |||
322 | /** |
||
323 | * Gets the value of locale. |
||
324 | * |
||
325 | * @return string |
||
326 | */ |
||
327 | public function getLocale() |
||
331 | |||
332 | /** |
||
333 | * Sets the value of locale. |
||
334 | * |
||
335 | * @param string $locale the locale |
||
336 | * |
||
337 | * @return self |
||
338 | */ |
||
339 | public function setLocale($locale) |
||
345 | |||
346 | /** |
||
347 | * Gets the value of translationSource. |
||
348 | * |
||
349 | * @return \Alpixel\Bundle\CMSBundle\Entity\Node |
||
350 | */ |
||
351 | public function getTranslationSource() |
||
355 | |||
356 | /** |
||
357 | * Sets the value of translationSource. |
||
358 | * |
||
359 | * @param \Alpixel\Bundle\CMSBundle\Entity\Node $translationSource the translation source |
||
360 | * |
||
361 | * @return self |
||
362 | */ |
||
363 | public function setTranslationSource(\Alpixel\Bundle\CMSBundle\Entity\Node $translationSource) |
||
369 | } |
||
370 |