1 | <?php |
||
8 | class PostPresenter extends Presenter |
||
9 | { |
||
10 | use HasImagesPresentable; |
||
11 | |||
12 | /** |
||
13 | * Render short description from post's body. |
||
14 | * |
||
15 | * @param $range |
||
16 | * @return string |
||
17 | */ |
||
18 | public function renderShortDescription($range = 75) |
||
22 | |||
23 | /** |
||
24 | * Render post title. |
||
25 | * |
||
26 | * @return string |
||
27 | */ |
||
28 | public function renderTitle($upper = false) |
||
37 | |||
38 | /** |
||
39 | * Render published date from created_at. |
||
40 | * |
||
41 | * @param string |
||
42 | * @return string |
||
43 | */ |
||
44 | public function renderPublishedDate($format = 'd F Y') |
||
54 | |||
55 | /** |
||
56 | * Render post's views. |
||
57 | * |
||
58 | * @return string |
||
59 | */ |
||
60 | public function renderPostViews() |
||
64 | } |