1
|
|
|
<?php |
2
|
|
|
/** |
3
|
|
|
* |
4
|
|
|
* @package sitemaker |
5
|
|
|
* @copyright (c) 2017 Daniel A. (blitze) |
6
|
|
|
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 |
7
|
|
|
* |
8
|
|
|
*/ |
9
|
|
|
|
10
|
|
|
namespace blitze\content\services\notification; |
11
|
|
|
|
12
|
|
|
class topic_in_queue extends \phpbb\notification\type\topic_in_queue |
13
|
|
|
{ |
14
|
|
|
/* @var \blitze\content\services\types */ |
15
|
|
|
protected $types; |
16
|
|
|
|
17
|
|
|
/** |
18
|
|
|
* Notification Type Base Constructor |
19
|
|
|
* |
20
|
|
|
* @param \phpbb\db\driver\driver_interface $db |
21
|
|
|
* @param \phpbb\language\language $language |
22
|
|
|
* @param \phpbb\user $user |
23
|
|
|
* @param \phpbb\auth\auth $auth |
24
|
|
|
* @param string $phpbb_root_path |
25
|
|
|
* @param string $php_ext |
26
|
|
|
* @param string $user_notifications_table |
27
|
|
|
* @param \blitze\content\services\types $types |
28
|
|
|
*/ |
29
|
|
|
public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\language\language $language, \phpbb\user $user, \phpbb\auth\auth $auth, $phpbb_root_path, $php_ext, $user_notifications_table, \blitze\content\services\types $types) |
30
|
|
|
{ |
31
|
|
|
parent::__construct($db, $language, $user, $auth, $phpbb_root_path, $php_ext, $user_notifications_table); |
32
|
|
|
|
33
|
|
|
$this->types = $types; |
34
|
|
|
} |
35
|
|
|
|
36
|
|
|
/** |
37
|
|
|
* Get the url to this item |
38
|
|
|
* |
39
|
|
|
* @return string URL |
40
|
|
|
*/ |
41
|
|
|
public function get_url() |
42
|
|
|
{ |
43
|
|
|
if ($type = $this->types->get_forum_type($this->item_parent_id)) |
44
|
|
|
{ |
45
|
|
|
return append_sid($this->phpbb_root_path . 'mcp.' . $this->php_ext, "i=-blitze-content-mcp-content_module&mode=content&type=$type&t={$this->item_id}&do=view"); |
46
|
|
|
} |
47
|
|
|
|
48
|
|
|
return parent::get_url(); |
49
|
|
|
} |
50
|
|
|
} |
51
|
|
|
|