1 | <?php namespace Modules\Blog\Widgets; |
||
7 | class LatestPostsWidget extends BaseWidget |
||
8 | { |
||
9 | /** |
||
10 | * @var PostRepository |
||
11 | */ |
||
12 | private $post; |
||
13 | |||
14 | public function __construct(PostRepository $post, Setting $setting) |
||
19 | |||
20 | /** |
||
21 | * Get the widget name |
||
22 | * @return string |
||
23 | */ |
||
24 | protected function name() |
||
28 | |||
29 | /** |
||
30 | * Get the widget options |
||
31 | * Possible options: |
||
32 | * x, y, width, height |
||
33 | * @return string |
||
34 | */ |
||
35 | protected function options() |
||
42 | |||
43 | /** |
||
44 | * Get the widget view |
||
45 | * @return string |
||
46 | */ |
||
47 | protected function view() |
||
51 | |||
52 | /** |
||
53 | * Get the widget data to send to the view |
||
54 | * @return string |
||
55 | */ |
||
56 | protected function data() |
||
62 | } |
||
63 |