1 | <?php |
||
14 | class sitemaker implements EventSubscriberInterface |
||
15 | { |
||
16 | /** @var \phpbb\cache\driver\driver_interface */ |
||
17 | protected $cache; |
||
18 | |||
19 | /** @var \phpbb\config\config */ |
||
20 | protected $config; |
||
21 | |||
22 | /** @var \phpbb\template\template */ |
||
23 | protected $template; |
||
24 | |||
25 | /** @var \phpbb\language\language */ |
||
26 | protected $translator; |
||
27 | |||
28 | /** @var \phpbb\user */ |
||
29 | protected $user; |
||
30 | |||
31 | /* @var \blitze\sitemaker\services\util */ |
||
32 | protected $util; |
||
33 | |||
34 | /* @var \blitze\sitemaker\services\blocks\display */ |
||
35 | protected $blocks; |
||
36 | |||
37 | /** @var \blitze\sitemaker\services\menus\navigation */ |
||
38 | protected $navigation; |
||
39 | |||
40 | /** |
||
41 | * Constructor |
||
42 | * |
||
43 | * @param \phpbb\cache\driver\driver_interface $cache Cache driver interface |
||
44 | * @param \phpbb\config\config $config Config object |
||
45 | * @param \phpbb\template\template $template Template object |
||
46 | * @param \phpbb\language\language $translator Language object |
||
47 | * @param \phpbb\user $user User object |
||
48 | * @param \blitze\sitemaker\services\util $util Sitemaker utility object |
||
49 | * @param \blitze\sitemaker\services\blocks\display $blocks Blocks display object |
||
50 | * @param \blitze\sitemaker\services\menus\navigation $navigation Sitemaker navigation object |
||
51 | */ |
||
52 | 8 | public function __construct(\phpbb\cache\driver\driver_interface $cache, \phpbb\config\config $config, \phpbb\template\template $template, \phpbb\language\language $translator, \phpbb\user $user, \blitze\sitemaker\services\util $util, \blitze\sitemaker\services\blocks\display $blocks, \blitze\sitemaker\services\menus\navigation $navigation) |
|
63 | |||
64 | /** |
||
65 | * @return array |
||
66 | */ |
||
67 | 1 | public static function getSubscribedEvents() |
|
77 | |||
78 | /** |
||
79 | * Show sitemaker blocks on front page |
||
80 | * @return void |
||
81 | */ |
||
82 | 4 | public function show_sitemaker() |
|
94 | |||
95 | /** |
||
96 | * Send assets to template |
||
97 | * @return void |
||
98 | */ |
||
99 | 4 | public function set_assets() |
|
103 | |||
104 | /** |
||
105 | * Queries for forum data are cached unless a post is created/edited |
||
106 | * The defined constant is used as an indicator of this change so a new request is made instead |
||
107 | * @see \blitze\sitemaker\services\forum\data |
||
108 | * @return void |
||
109 | */ |
||
110 | 1 | public function clear_cached_queries() |
|
115 | |||
116 | /** |
||
117 | * @param \phpbb\event\data $event |
||
118 | * @return void |
||
119 | */ |
||
120 | 2 | public function hide_hidden_forums(\phpbb\event\data $event) |
|
129 | |||
130 | /** |
||
131 | * Show or hide birthday_list, online users list, and login box on forum index |
||
132 | * @return void |
||
133 | */ |
||
134 | 4 | protected function show_hide_index_blocks() |
|
152 | } |
||
153 |