1 | <?php |
||
13 | class Article implements ModelInterface |
||
14 | { |
||
15 | const STATUS_DRAFT = 'draft'; |
||
16 | const STATUS_PUBLISHED = 'published'; |
||
17 | |||
18 | /** |
||
19 | * @var int |
||
20 | */ |
||
21 | private $id; |
||
22 | |||
23 | /** |
||
24 | * @var ArticleTranslation[] |
||
25 | */ |
||
26 | private $translations; |
||
27 | |||
28 | /** |
||
29 | * @var Category[] |
||
30 | */ |
||
31 | private $categories; |
||
32 | |||
33 | /** |
||
34 | * @var ArticleMedia[] |
||
35 | */ |
||
36 | private $medias; |
||
37 | |||
38 | /** |
||
39 | * @var int |
||
40 | */ |
||
41 | private $mediaLimit; |
||
42 | |||
43 | /** |
||
44 | * @var string|null |
||
45 | */ |
||
46 | private $status; |
||
47 | |||
48 | /** |
||
49 | * @var bool |
||
50 | */ |
||
51 | private $displayPrintButton; |
||
52 | |||
53 | /** |
||
54 | * @var bool |
||
55 | */ |
||
56 | private $displayPrintAddress; |
||
57 | |||
58 | /** |
||
59 | * @var bool |
||
60 | */ |
||
61 | private $withReturnButton; |
||
62 | |||
63 | /** |
||
64 | * @var bool |
||
65 | */ |
||
66 | private $showCreationDate; |
||
67 | |||
68 | /** |
||
69 | * @var bool |
||
70 | */ |
||
71 | private $showImageCaption; |
||
72 | |||
73 | /** |
||
74 | * @var bool |
||
75 | */ |
||
76 | private $autoPlaySlider; |
||
77 | |||
78 | /** |
||
79 | * @var SiteRoute[] |
||
80 | */ |
||
81 | private $routes; |
||
82 | |||
83 | /** |
||
84 | * @var bool |
||
85 | */ |
||
86 | private $shareOnFacebook; |
||
87 | |||
88 | /** |
||
89 | * @var int |
||
90 | */ |
||
91 | private $displayOrder; |
||
92 | |||
93 | /** |
||
94 | * @var int|null |
||
95 | */ |
||
96 | private $dataParentId; |
||
97 | |||
98 | /** |
||
99 | * @var \DateTime |
||
100 | */ |
||
101 | private $createdAt; |
||
102 | |||
103 | /** |
||
104 | * @var \DateTime |
||
105 | */ |
||
106 | private $updatedAt; |
||
107 | |||
108 | /** |
||
109 | * @var string |
||
110 | */ |
||
111 | private $inheritanceStatus; |
||
112 | |||
113 | /** |
||
114 | * @return string[] |
||
115 | */ |
||
116 | public static function getStatuses(): array |
||
123 | |||
124 | /** |
||
125 | * Article constructor. |
||
126 | * |
||
127 | * @param array $data |
||
128 | */ |
||
129 | public function __construct(array $data) |
||
167 | |||
168 | /** |
||
169 | * @return int |
||
170 | */ |
||
171 | public function getId(): int |
||
175 | |||
176 | /** |
||
177 | * @return ArticleTranslation[] |
||
178 | */ |
||
179 | public function getTranslations(): array |
||
183 | |||
184 | /** |
||
185 | * @return Category[] |
||
186 | */ |
||
187 | public function getCategories(): array |
||
191 | |||
192 | /** |
||
193 | * @return ArticleMedia[] |
||
194 | */ |
||
195 | public function getMedias(): array |
||
199 | |||
200 | /** |
||
201 | * @return int |
||
202 | */ |
||
203 | public function getMediaLimit(): int |
||
207 | |||
208 | /** |
||
209 | * @see Article::getStatuses() |
||
210 | * |
||
211 | * @return null|string |
||
212 | */ |
||
213 | public function getStatus() |
||
217 | |||
218 | /** |
||
219 | * @return bool |
||
220 | */ |
||
221 | public function isDisplayPrintButton(): bool |
||
225 | |||
226 | /** |
||
227 | * @return bool |
||
228 | */ |
||
229 | public function isDisplayPrintAddress(): bool |
||
233 | |||
234 | /** |
||
235 | * @return bool |
||
236 | */ |
||
237 | public function isWithReturnButton(): bool |
||
241 | |||
242 | /** |
||
243 | * @return bool |
||
244 | */ |
||
245 | public function isShowCreationDate(): bool |
||
249 | |||
250 | /** |
||
251 | * @return bool |
||
252 | */ |
||
253 | public function isShowImageCaption(): bool |
||
257 | |||
258 | /** |
||
259 | * @return bool |
||
260 | */ |
||
261 | public function isAutoPlaySlider(): bool |
||
265 | |||
266 | /** |
||
267 | * @return SiteRoute[] |
||
268 | */ |
||
269 | public function getRoutes(): array |
||
273 | |||
274 | /** |
||
275 | * @return bool |
||
276 | */ |
||
277 | public function isShareOnFacebook(): bool |
||
281 | |||
282 | /** |
||
283 | * @return int |
||
284 | */ |
||
285 | public function getDisplayOrder(): int |
||
289 | |||
290 | /** |
||
291 | * @return int|null |
||
292 | */ |
||
293 | public function getDataParentId() |
||
297 | |||
298 | /** |
||
299 | * @return \DateTime |
||
300 | */ |
||
301 | public function getCreatedAt(): \DateTime |
||
305 | |||
306 | /** |
||
307 | * @return \DateTime |
||
308 | */ |
||
309 | public function getUpdatedAt(): \DateTime |
||
313 | |||
314 | /** |
||
315 | * @see InheritanceStatuses::getValues() |
||
316 | * |
||
317 | * @return string |
||
318 | */ |
||
319 | public function getInheritanceStatus(): string |
||
323 | } |
||
324 |