10
10
11
11
namespace paybas \recenttopics \controller ;
12
12
13
+ use phpbb \config \config ;
14
+ use phpbb \controller \helper ;
13
15
use phpbb \language \language ;
16
+ use paybas \recenttopics \core \recenttopics ;
17
+ use Symfony \Component \HttpFoundation \Response ;
14
18
15
19
class page_controller implements page_interface
16
20
{
17
- /**
18
- * @var \phpbb\auth\auth
19
- */
20
- protected $ auth ;
21
21
/**
22
22
* @var \phpbb\config\config
23
23
*/
24
24
protected $ config ;
25
+
25
26
/**
26
27
* @var \phpbb\controller\helper
27
28
*/
28
29
protected $ helper ;
30
+
29
31
/**
30
- * @var \phpbb\template\template
31
- */
32
- protected $ template ;
33
- /**
34
- * @var \phpbb\db\driver\driver_interface
35
- */
36
- protected $ db ;
37
- /**
38
- * @var \phpbb\request\request
39
- */
40
- protected $ request ;
41
- /**
42
- * @var \phpbb\user
43
- */
44
- protected $ user ;
45
- /**
46
- * @var string
47
- */
48
- protected $ phpEx ;
49
- /**
50
- * @var \phpbb\pagination
51
- */
52
- protected $ pagination ;
53
- /**
54
- * @var \phpbb\extension\manager
55
- */
56
- protected $ phpbb_extension_manager ;
57
- /**
58
- * @var string
59
- */
60
- protected $ ext_path ;
61
- /**
62
- * @var string
63
- */
64
- protected $ ext_path_web ;
65
- /**
66
- * @var string
67
- */
68
- protected $ ext_path_images ;
69
- /**
70
- * @var string
32
+ * @var language
71
33
*/
72
- protected $ root_path ;
34
+ protected $ language ;
73
35
74
36
/* @var recenttopics */
75
37
protected $ rt_functions ;
@@ -79,72 +41,25 @@ class page_controller implements page_interface
79
41
*/
80
42
protected $ response ;
81
43
82
- /**
83
- * @var language
84
- */
85
- protected $ language ;
86
-
87
- /**
88
- * @var string
89
- */
90
- protected $ php_ext ;
91
-
92
- /**
93
- * @var string
94
- */
95
- protected $ path_helper ;
96
-
97
44
/**
98
45
* page constructor.
99
46
*
100
- * @param \phpbb\config\config $config
101
- * @param \phpbb\controller\helper $helper
102
- * @param \phpbb\auth\auth $auth
103
- * @param \phpbb\template\template $template
104
- * @param \phpbb\db\driver\driver_interface $db
105
- * @param \phpbb\request\request $request
106
- * @param \phpbb\user $user
107
- * @param \phpbb\pagination $pagination
108
- * @param $php_ext
109
- * @param \phpbb\path_helper $path_helper
110
- * @param \phpbb\extension\manager $phpbb_extension_manager
111
- * @param $root_path
112
- * @param \paybas\recenttopics\core\recenttopics $functions
113
- * @param \phpbb\language\language $language
47
+ * @param \phpbb\config\config $config
48
+ * @param \phpbb\controller\helper $helper
49
+ * @param \phpbb\language\language $language
50
+ * @param \paybas\recenttopics\core\recenttopics $functions
114
51
*/
115
52
public function __construct (
116
- \phpbb \config \config $ config ,
117
- \phpbb \controller \helper $ helper ,
118
- \phpbb \auth \auth $ auth ,
119
- \phpbb \template \template $ template ,
120
- \phpbb \db \driver \driver_interface $ db ,
121
- \phpbb \request \request $ request ,
122
- \phpbb \user $ user ,
123
- \phpbb \pagination $ pagination ,
124
- $ php_ext ,
125
- \phpbb \path_helper $ path_helper ,
126
- \phpbb \extension \manager $ phpbb_extension_manager ,
127
- $ root_path ,
128
- \paybas \recenttopics \core \recenttopics $ functions ,
129
- \phpbb \language \language $ language
53
+ config $ config ,
54
+ helper $ helper ,
55
+ language $ language ,
56
+ recenttopics $ functions
130
57
)
131
58
{
132
59
$ this ->config = $ config ;
133
60
$ this ->helper = $ helper ;
134
- $ this ->auth = $ auth ;
135
- $ this ->template = $ template ;
136
- $ this ->db = $ db ;
137
- $ this ->request = $ request ;
138
- $ this ->user = $ user ;
139
- $ this ->pagination = $ pagination ;
140
- $ this ->php_ext = $ php_ext ;
141
- $ this ->path_helper = $ path_helper ;
142
- $ this ->phpbb_extension_manager = $ phpbb_extension_manager ;
143
- $ this ->ext_path = $ this ->phpbb_extension_manager ->get_extension_path ('paybas/recenttopics ' , true );
144
- $ this ->ext_path_web = $ this ->path_helper ->get_web_root_path ();
145
- $ this ->root_path = $ root_path ;
146
- $ this ->rt_functions = $ functions ;
147
61
$ this ->language = $ language ;
62
+ $ this ->rt_functions = $ functions ;
148
63
}
149
64
150
65
/**
@@ -156,8 +71,7 @@ public function __construct(
156
71
public function display ()
157
72
{
158
73
$ page = "recent_topics_page.html " ;
159
- $ this ->language ->add_lang ('info_acp_recenttopics ' , 'paybas/recenttopics ' );
160
- $ this ->language ->add_lang ('recenttopics ' , 'paybas/recenttopics ' );
74
+ $ this ->language ->add_lang (['info_acp_recenttopics ' , 'recenttopics ' ], 'paybas/recenttopics ' );
161
75
162
76
if (isset ($ this ->config ['rt_index ' ]) && $ this ->config ['rt_index ' ])
163
77
{
0 commit comments