1 | <?php |
||
33 | abstract class AbstractNews extends Content implements |
||
34 | CategorizableInterface, |
||
35 | MetatagInterface, |
||
36 | NewsInterface, |
||
37 | PublishableInterface, |
||
38 | RoutableInterface, |
||
39 | SearchableInterface |
||
40 | { |
||
41 | use CategorizableTrait; |
||
42 | use PublishableTrait; |
||
43 | use MetatagTrait; |
||
44 | use RoutableTrait; |
||
45 | use SearchableTrait; |
||
46 | |||
47 | /** |
||
48 | * @var TranslationString $title |
||
49 | */ |
||
50 | private $title; |
||
51 | |||
52 | /** |
||
53 | * @var TranslationString $title |
||
54 | */ |
||
55 | private $subtitle; |
||
56 | |||
57 | /** |
||
58 | * @var TranslationString $content |
||
59 | */ |
||
60 | private $content; |
||
61 | |||
62 | /** |
||
63 | * @var TranslationString $image |
||
64 | */ |
||
65 | private $image; |
||
66 | |||
67 | /** |
||
68 | * @var DateTime $newsDate |
||
69 | */ |
||
70 | private $newsDate; |
||
71 | |||
72 | /** |
||
73 | * @var TranslationString $infoUrl |
||
74 | */ |
||
75 | private $infoUrl; |
||
76 | |||
77 | /** |
||
78 | * Generate a slug on preSave |
||
79 | * @see RoutableTrait |
||
80 | * @return parent::preSave |
||
|
|||
81 | */ |
||
82 | public function preSave() |
||
88 | |||
89 | /** |
||
90 | * Generate a slug on preUpdate |
||
91 | * @see RoutableTrait |
||
92 | * @param array $properties Properties to update. |
||
93 | * @return parent::preUpdate |
||
94 | */ |
||
95 | public function preUpdate(array $properties = null) |
||
101 | |||
102 | |||
103 | /** |
||
104 | * @param mixed $title The news title (localized). |
||
105 | * @return TranslationString |
||
106 | */ |
||
107 | public function setTitle($title) |
||
112 | |||
113 | /** |
||
114 | * @return TranslationString |
||
115 | */ |
||
116 | public function title() |
||
120 | |||
121 | /** |
||
122 | * @param mixed $subtitle The news subtitle (localized). |
||
123 | * @return Event Chainable |
||
124 | */ |
||
125 | public function setSubtitle($subtitle) |
||
130 | |||
131 | /** |
||
132 | * @return TranslationString |
||
133 | */ |
||
134 | public function subtitle() |
||
138 | |||
139 | /** |
||
140 | * @param mixed $content The news content (localized). |
||
141 | * @return Event Chainable |
||
142 | */ |
||
143 | public function setContent($content) |
||
148 | |||
149 | /** |
||
150 | * @return TranslationString |
||
151 | */ |
||
152 | public function content() |
||
156 | |||
157 | /** |
||
158 | * @param mixed $image The section main image (localized). |
||
159 | * @return Section Chainable |
||
160 | */ |
||
161 | public function setImage($image) |
||
166 | |||
167 | /** |
||
168 | * @return TranslationString |
||
169 | */ |
||
170 | public function image() |
||
174 | |||
175 | /** |
||
176 | * @param mixed $template The section template (ident). |
||
177 | * @return SectionInterface Chainable |
||
178 | */ |
||
179 | public function setTemplateIdent($template) |
||
184 | |||
185 | /** |
||
186 | * @return mixed |
||
187 | */ |
||
188 | public function templateIdent() |
||
196 | |||
197 | /** |
||
198 | * @param array|string $templateOptions Extra template options, if any. |
||
199 | * @return SectionInterface Chainable |
||
200 | */ |
||
201 | public function setTemplateOptions($templateOptions) |
||
206 | |||
207 | /** |
||
208 | * @return array |
||
209 | */ |
||
210 | public function templateOptions() |
||
218 | |||
219 | /** |
||
220 | * @param mixed $newsDate The news date. |
||
221 | * @throws InvalidArgumentException If the timestamp is invalid. |
||
222 | * @return ObjectRevision Chainable |
||
223 | */ |
||
224 | public function setNewsDate($newsDate) |
||
241 | |||
242 | /** |
||
243 | * @return DateTime|null |
||
244 | */ |
||
245 | public function newsDate() |
||
249 | |||
250 | /** |
||
251 | * @param mixed $url The info URL (news source or where to find more information; localized). |
||
252 | * @return NewsInterface Chainable |
||
253 | */ |
||
254 | public function setInfoUrl($url) |
||
259 | |||
260 | /** |
||
261 | * @return TranslationString |
||
262 | */ |
||
263 | public function infoUrl() |
||
267 | |||
268 | /** |
||
269 | * MetatagTrait > canonical_url |
||
270 | * |
||
271 | * @return string |
||
272 | * @todo |
||
273 | */ |
||
274 | public function canonicalUrl() |
||
278 | |||
279 | /** |
||
280 | * RoutableInterface > handle_route() |
||
281 | * |
||
282 | * @param string $path The request path. |
||
283 | * @param RequestInterface $request PSR-7 (http) request. |
||
284 | * @param ResponseInterface $response PSR-7 (http) response. |
||
285 | * @throws InvalidArgumentException If the path is not a string. |
||
286 | * @return callable|null Route dispatcher |
||
287 | */ |
||
288 | public function routeHandler($path, RequestInterface $request, ResponseInterface $response) |
||
306 | |||
307 | /** |
||
308 | * @return TranslationString |
||
309 | */ |
||
310 | public function defaultMetaTitle() |
||
314 | |||
315 | /** |
||
316 | * @return TranslationString |
||
317 | */ |
||
318 | public function defaultMetaDescription() |
||
322 | |||
323 | /** |
||
324 | * @return TranslationString |
||
325 | */ |
||
326 | public function defaultMetaImage() |
||
330 | } |
||
331 |
This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.