1 | <?php |
||
29 | class Article implements ArticleInterface, MediaAwareArticleInterface |
||
30 | { |
||
31 | use TranslatableTrait, SoftDeletableTrait, TimestampableTrait; |
||
32 | |||
33 | /** |
||
34 | * @var mixed |
||
35 | */ |
||
36 | protected $id; |
||
37 | |||
38 | /** |
||
39 | * @var string |
||
40 | */ |
||
41 | protected $title; |
||
42 | |||
43 | /** |
||
44 | * @var string |
||
45 | */ |
||
46 | protected $body; |
||
47 | |||
48 | /** |
||
49 | * @var string |
||
50 | */ |
||
51 | protected $slug; |
||
52 | |||
53 | /** |
||
54 | * @var \DateTime |
||
55 | */ |
||
56 | protected $publishedAt; |
||
57 | |||
58 | /** |
||
59 | * @var string |
||
60 | */ |
||
61 | protected $status = ArticleInterface::STATUS_NEW; |
||
62 | |||
63 | /** |
||
64 | * @var RouteInterface |
||
65 | */ |
||
66 | protected $route; |
||
67 | |||
68 | /** |
||
69 | * @var string |
||
70 | */ |
||
71 | protected $templateName; |
||
72 | |||
73 | /** |
||
74 | * @var \DateTime |
||
75 | */ |
||
76 | protected $publishStartDate; |
||
77 | |||
78 | /** |
||
79 | * @var \DateTime |
||
80 | */ |
||
81 | protected $publishEndDate; |
||
82 | |||
83 | /** |
||
84 | * @var bool |
||
85 | */ |
||
86 | protected $isPublishable; |
||
87 | |||
88 | /** |
||
89 | * @var array |
||
90 | */ |
||
91 | protected $metadata = []; |
||
92 | |||
93 | /** |
||
94 | * @var Collection |
||
95 | */ |
||
96 | protected $media; |
||
97 | |||
98 | /** |
||
99 | * @var ArticleMediaInterface |
||
100 | */ |
||
101 | protected $featureMedia; |
||
102 | |||
103 | /** |
||
104 | * @var string |
||
105 | */ |
||
106 | protected $lead; |
||
107 | |||
108 | /** |
||
109 | * @var array |
||
110 | */ |
||
111 | protected $keywords = []; |
||
112 | |||
113 | /** |
||
114 | * @var string |
||
115 | */ |
||
116 | protected $code; |
||
117 | |||
118 | 32 | /** |
|
119 | * Article constructor. |
||
120 | 32 | */ |
|
121 | 32 | public function __construct() |
|
127 | |||
128 | /** |
||
129 | * {@inheritdoc} |
||
130 | */ |
||
131 | public function setPublishStartDate(\DateTime $startDate = null) |
||
135 | |||
136 | 8 | /** |
|
137 | * {@inheritdoc} |
||
138 | 8 | */ |
|
139 | public function getPublishStartDate() |
||
143 | |||
144 | /** |
||
145 | * {@inheritdoc} |
||
146 | */ |
||
147 | public function setPublishEndDate(\DateTime $endDate = null) |
||
151 | |||
152 | 8 | /** |
|
153 | * {@inheritdoc} |
||
154 | 8 | */ |
|
155 | public function getPublishEndDate() |
||
159 | |||
160 | 5 | /** |
|
161 | * {@inheritdoc} |
||
162 | 5 | */ |
|
163 | public function isPublishable() |
||
167 | |||
168 | 31 | /** |
|
169 | * {@inheritdoc} |
||
170 | 31 | */ |
|
171 | 31 | public function setPublishable($boolean) |
|
175 | |||
176 | 10 | /** |
|
177 | * {@inheritdoc} |
||
178 | 10 | */ |
|
179 | public function isPublished() |
||
183 | |||
184 | 9 | /** |
|
185 | * {@inheritdoc} |
||
186 | 9 | */ |
|
187 | public function setRoute(RouteInterface $route = null) |
||
191 | |||
192 | 9 | /** |
|
193 | * {@inheritdoc} |
||
194 | 9 | */ |
|
195 | public function getRoute() |
||
199 | |||
200 | 31 | /** |
|
201 | * {@inheritdoc} |
||
202 | 31 | */ |
|
203 | 31 | public function getId() |
|
207 | |||
208 | 4 | /** |
|
209 | * {@inheritdoc} |
||
210 | 4 | */ |
|
211 | 4 | public function getBody() |
|
215 | |||
216 | 26 | /** |
|
217 | * {@inheritdoc} |
||
218 | 26 | */ |
|
219 | 26 | public function setBody($body) |
|
223 | |||
224 | 22 | /** |
|
225 | * {@inheritdoc} |
||
226 | 22 | */ |
|
227 | public function getMedia() |
||
231 | |||
232 | 12 | /** |
|
233 | * {@inheritdoc} |
||
234 | 12 | */ |
|
235 | public function setMedia(Collection $media) |
||
239 | |||
240 | 9 | /** |
|
241 | * {@inheritdoc} |
||
242 | 9 | */ |
|
243 | public function getTitle() |
||
247 | |||
248 | 31 | /** |
|
249 | * {@inheritdoc} |
||
250 | 31 | */ |
|
251 | 31 | public function setTitle($title) |
|
257 | |||
258 | /** |
||
259 | * {@inheritdoc} |
||
260 | */ |
||
261 | public function getSlug() |
||
265 | |||
266 | 31 | /** |
|
267 | 31 | * {@inheritdoc} |
|
268 | */ |
||
269 | public function setSlug($slug) |
||
273 | |||
274 | 9 | /** |
|
275 | * {@inheritdoc} |
||
276 | */ |
||
277 | public function getPublishedAt() |
||
281 | |||
282 | 31 | /** |
|
283 | * {@inheritdoc} |
||
284 | 31 | */ |
|
285 | 31 | public function setPublishedAt(\DateTime $publishedAt) |
|
289 | |||
290 | 26 | /** |
|
291 | * {@inheritdoc} |
||
292 | 26 | */ |
|
293 | public function getStatus() |
||
297 | |||
298 | 31 | /** |
|
299 | * {@inheritdoc} |
||
300 | 31 | */ |
|
301 | 31 | public function setStatus($status) |
|
305 | |||
306 | 11 | /** |
|
307 | * {@inheritdoc} |
||
308 | 11 | */ |
|
309 | public function getTemplateName() |
||
313 | |||
314 | 18 | /** |
|
315 | * {@inheritdoc} |
||
316 | 18 | */ |
|
317 | 18 | public function setTemplateName($templateName) |
|
321 | |||
322 | 10 | /** |
|
323 | * {@inheritdoc} |
||
324 | 10 | */ |
|
325 | public function getMetadata() |
||
329 | |||
330 | 23 | /** |
|
331 | * {@inheritdoc} |
||
332 | 23 | */ |
|
333 | 23 | public function getMetadataByKey(string $key) |
|
341 | |||
342 | /** |
||
343 | * {@inheritdoc} |
||
344 | */ |
||
345 | public function setMetadata(array $metadata) |
||
349 | 12 | ||
350 | /** |
||
351 | * {@inheritdoc} |
||
352 | */ |
||
353 | public function getSubjectType() |
||
357 | |||
358 | /** |
||
359 | * {@inheritdoc} |
||
360 | */ |
||
361 | public function getLead() |
||
365 | |||
366 | 8 | /** |
|
367 | 8 | * {@inheritdoc} |
|
368 | */ |
||
369 | public function setLead($lead) |
||
373 | |||
374 | 11 | /** |
|
375 | * {@inheritdoc} |
||
376 | 11 | */ |
|
377 | 11 | public function getKeywords(): array |
|
381 | |||
382 | 7 | /** |
|
383 | * {@inheritdoc} |
||
384 | 7 | */ |
|
385 | public function setKeywords(array $keywords) |
||
389 | |||
390 | 9 | /** |
|
391 | * {@inheritdoc} |
||
392 | 9 | */ |
|
393 | public function getFeatureMedia() |
||
397 | |||
398 | 11 | /** |
|
399 | * {@inheritdoc} |
||
400 | 11 | */ |
|
401 | 11 | public function setFeatureMedia(ArticleMediaInterface $featureMedia = null) |
|
405 | |||
406 | 9 | /** |
|
407 | * {@inheritdoc} |
||
408 | 9 | */ |
|
409 | public function getCode(): string |
||
413 | |||
414 | 11 | /** |
|
415 | * {@inheritdoc} |
||
416 | 11 | */ |
|
417 | 11 | public function setCode(string $code) |
|
421 | } |
||
422 |