1 | <?php |
||
12 | abstract class base_view implements views_interface |
||
13 | { |
||
14 | /** @var \phpbb\event\dispatcher_interface */ |
||
15 | protected $phpbb_dispatcher; |
||
16 | |||
17 | /** @var\phpbb\language\language */ |
||
18 | protected $language; |
||
19 | |||
20 | /** @var \phpbb\pagination */ |
||
21 | protected $pagination; |
||
22 | |||
23 | /** @var \phpbb\template\template */ |
||
24 | protected $template; |
||
25 | |||
26 | /* @var \blitze\content\services\fields */ |
||
27 | protected $fields; |
||
28 | |||
29 | /** @var \blitze\sitemaker\services\forum\data */ |
||
30 | protected $forum; |
||
31 | |||
32 | /* @var \blitze\content\services\helper */ |
||
33 | protected $helper; |
||
34 | |||
35 | /* @var \blitze\content\services\quickmod */ |
||
36 | protected $quickmod; |
||
37 | |||
38 | /** |
||
39 | * Constructor |
||
40 | * |
||
41 | * @param \phpbb\event\dispatcher_interface $phpbb_dispatcher Event dispatcher object |
||
42 | * @param \phpbb\language\language $language Language Object |
||
43 | * @param \phpbb\pagination $pagination Pagination object |
||
44 | * @param \phpbb\template\template $template Template object |
||
45 | * @param \blitze\content\services\fields $fields Content fields object |
||
46 | * @param \blitze\sitemaker\services\forum\data $forum Forum Data object |
||
47 | * @param \blitze\content\services\helper $helper Content helper object |
||
48 | * @param \blitze\content\services\quickmod $quickmod Quick moderator tools |
||
49 | */ |
||
50 | public function __construct(\phpbb\event\dispatcher_interface $phpbb_dispatcher, \phpbb\language\language $language, \phpbb\pagination $pagination, \phpbb\template\template $template, \blitze\content\services\fields $fields, \blitze\sitemaker\services\forum\data $forum, \blitze\content\services\helper $helper, \blitze\content\services\quickmod $quickmod) |
||
61 | |||
62 | /** |
||
63 | * {@inheritdoc} |
||
64 | */ |
||
65 | public function get_detail_template() |
||
69 | |||
70 | /** |
||
71 | * @param array $filters |
||
72 | * @param int $forum_id |
||
73 | * @return void |
||
74 | */ |
||
75 | public function build_index_query(array $filters, $forum_id = 0) |
||
85 | |||
86 | /** |
||
87 | * {@inheritdoc} |
||
88 | * @param array $topic_data_overwrite |
||
89 | */ |
||
90 | public function render_index(\blitze\content\model\entity\type $entity, $page, array $filters, array $topic_data_overwrite = array()) |
||
115 | |||
116 | /** |
||
117 | * @param \blitze\content\model\entity\type $entity |
||
118 | * @param int $items_per_page |
||
119 | * @param int $start |
||
120 | * @param array $topic_data_overwrite |
||
121 | * @return void |
||
122 | */ |
||
123 | protected function display_topics(\blitze\content\model\entity\type $entity, $items_per_page = 1, $start = 0, array $topic_data_overwrite = array()) |
||
147 | |||
148 | /** |
||
149 | * {@inheritdoc} |
||
150 | * @param array $topic_data_overwrite |
||
151 | */ |
||
152 | public function render_detail(\blitze\content\model\entity\type $entity, $topic_id, array &$update_count, array $topic_data_overwrite = array()) |
||
166 | |||
167 | /** |
||
168 | * @param int $topic_id |
||
169 | * @param \blitze\content\model\entity\type $entity |
||
170 | * @param array $update_count |
||
171 | * @param array $topic_data_overwrite |
||
172 | * @return array |
||
173 | * @throws \Exception |
||
174 | */ |
||
175 | protected function display_topic($topic_id, \blitze\content\model\entity\type $entity, array &$update_count, array $topic_data_overwrite) |
||
213 | |||
214 | /** |
||
215 | * @param array $attachments |
||
216 | * @param int $post_id |
||
217 | * @return void |
||
218 | */ |
||
219 | protected function show_attachments(array $attachments, $post_id) |
||
231 | |||
232 | /** |
||
233 | * @param string $view_mode |
||
234 | * @param int $total_topics |
||
235 | * @param int $start |
||
236 | * @param int $items_per_page |
||
237 | * @param array $params |
||
238 | */ |
||
239 | protected function generate_pagination($view_mode, $total_topics, &$start, $items_per_page, array $params) |
||
255 | |||
256 | /** |
||
257 | * @param string $view_mode |
||
258 | * @param array $params |
||
259 | * @return string |
||
260 | */ |
||
261 | protected function get_route_type($view_mode, array $params) |
||
274 | |||
275 | /** |
||
276 | * {@inheritdoc} |
||
277 | */ |
||
278 | protected function get_filter_sql(array $filters, $forum_id) |
||
295 | |||
296 | /** |
||
297 | * @param int $forum_id |
||
298 | * @param int $poster_id |
||
299 | * @param string $content_langname |
||
300 | * @param array $user_cache |
||
301 | * @param bool $show_author_info |
||
302 | * @return void |
||
303 | */ |
||
304 | protected function show_author_info($forum_id, $poster_id, $content_langname, array $user_cache, $show_author_info) |
||
323 | |||
324 | /** |
||
325 | * @param array $topic_data |
||
326 | * @param string $content_type |
||
327 | * @param string $content_langname |
||
328 | * @param bool $show_author_contents |
||
329 | * @return void |
||
330 | */ |
||
331 | protected function show_author_contents($topic_data, $content_type, $content_langname, $show_author_contents) |
||
353 | |||
354 | /** |
||
355 | * @param int $forum_id |
||
356 | * @param int $topic_id |
||
357 | * @return void |
||
358 | */ |
||
359 | protected function set_mcp_url($forum_id, $topic_id = 0) |
||
363 | } |
||
364 |