1 | <?php |
||
12 | class fields extends topic |
||
13 | { |
||
14 | /** @var \blitze\content\services\comments\comments_interface */ |
||
15 | protected $comments; |
||
16 | |||
17 | /** @var \blitze\content\services\form\fields_factory */ |
||
18 | protected $fields_factory; |
||
19 | |||
20 | /** @var array */ |
||
21 | protected $form_fields; |
||
22 | |||
23 | /** @var string */ |
||
24 | protected $content_type; |
||
25 | |||
26 | /** @var array */ |
||
27 | protected $content_fields; |
||
28 | |||
29 | /** @var array */ |
||
30 | protected $tags = array(); |
||
31 | |||
32 | /** @var string */ |
||
33 | protected $tpl_name = ''; |
||
34 | |||
35 | /** @var string */ |
||
36 | protected $display_mode = ''; |
||
37 | |||
38 | /** @var string */ |
||
39 | protected $view_mode = ''; |
||
40 | |||
41 | /** @var array */ |
||
42 | protected $label = array('label-hidden', 'label-inline', 'label-newline'); |
||
43 | |||
44 | /** |
||
45 | * Construct |
||
46 | * |
||
47 | * @param \phpbb\config\db $config Config object |
||
48 | * @param \phpbb\controller\helper $controller_helper Controller Helper object |
||
49 | * @param \phpbb\event\dispatcher_interface $phpbb_dispatcher Event dispatcher object |
||
50 | * @param \phpbb\language\language $language Language object |
||
51 | * @param \phpbb\template\template $template Template object |
||
52 | * @param \phpbb\user $user User object |
||
53 | * @param \blitze\content\services\form\fields_factory $fields_factory Form fields factory |
||
54 | * @param \blitze\content\services\comments\comments_interface $comments Comments object |
||
55 | * @param \blitze\content\services\helper $helper Content helper object |
||
56 | */ |
||
57 | public function __construct(\phpbb\config\db $config, \phpbb\controller\helper $controller_helper, \phpbb\event\dispatcher_interface $phpbb_dispatcher, \phpbb\language\language $language, \phpbb\template\template $template, \phpbb\user $user, \blitze\content\services\comments\comments_interface $comments, \blitze\content\services\form\fields_factory $fields_factory, \blitze\content\services\helper $helper) |
||
64 | |||
65 | /** |
||
66 | * Set type data needed to display topics |
||
67 | * |
||
68 | * @param \blitze\content\model\entity\type $entity |
||
69 | * @param array $topic_ids |
||
70 | * @param array $view_mode_fields |
||
71 | * @param string $custom_tpl |
||
72 | * @param string $view_mode |
||
73 | * @return void |
||
74 | */ |
||
75 | public function prepare_to_show(\blitze\content\model\entity\type $entity, array $topic_ids, array $view_mode_fields, $custom_tpl, $view_mode) |
||
102 | |||
103 | /** |
||
104 | * @param string $type |
||
105 | * @param array $topic_data |
||
106 | * @param array $post_data |
||
107 | * @param array $users_cache |
||
108 | * @param array $attachments |
||
109 | * @param array $update_count |
||
110 | * @param array $topic_tracking_info |
||
111 | * @param array $topic_data_overwrite |
||
112 | * @param string $mode |
||
113 | * @return array |
||
114 | */ |
||
115 | public function show($type, array $topic_data, array $post_data, array $users_cache, array &$attachments, array &$update_count, array $topic_tracking_info, array $topic_data_overwrite = array(), $mode = '') |
||
128 | |||
129 | /** |
||
130 | * @param array $tpl_data |
||
131 | * @return array |
||
132 | */ |
||
133 | public function build_content(array $tpl_data) |
||
150 | |||
151 | /** |
||
152 | * @param array $view_mode_fields |
||
153 | * @param array $fields_data |
||
154 | * @return void |
||
155 | */ |
||
156 | protected function set_content_fields(array $view_mode_fields, array $fields_data) |
||
167 | |||
168 | /** |
||
169 | * @param array $tpl_data |
||
170 | * @return array |
||
171 | */ |
||
172 | protected function get_fields_data_for_display(array &$tpl_data) |
||
201 | |||
202 | /** |
||
203 | * @param string $post_text |
||
204 | * @return array |
||
205 | */ |
||
206 | protected function get_fields_data_from_post($post_text) |
||
217 | |||
218 | /** |
||
219 | * @return void |
||
220 | */ |
||
221 | protected function reset() |
||
229 | } |
||
230 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: