1 | <?php |
||
16 | class linkhelper |
||
17 | { |
||
18 | /* @var helper */ |
||
19 | protected $helper; |
||
20 | |||
21 | /* @var user_loader */ |
||
22 | protected $user_loader; |
||
23 | |||
24 | /** |
||
25 | * @param \phpbb\controller\helper $helper |
||
26 | * @param \phpbb\user_loader $user_loader |
||
27 | */ |
||
28 | public function __construct(helper $helper, user_loader $user_loader) |
||
33 | |||
34 | /** |
||
35 | * Shortcut method to get the link to a specified idea. |
||
36 | * Optionally add mode and hash URL arguments. |
||
37 | * |
||
38 | * @param int $idea_id The ID of the idea |
||
39 | * @param string $mode The mode argument (vote, delete, etc.) |
||
40 | * @param bool $hash Add a link hash |
||
41 | * @return string The route |
||
42 | */ |
||
43 | public function get_idea_link($idea_id, $mode = '', $hash = false) |
||
51 | |||
52 | /** |
||
53 | * Returns a link to the users profile, complete with colour. |
||
54 | * |
||
55 | * Is there a function that already does this? This seems fairly database heavy. |
||
56 | * |
||
57 | * @param int $id The ID of the user |
||
58 | * @return string An HTML link to the users profile |
||
59 | */ |
||
60 | public function get_user_link($id) |
||
65 | } |
||
66 |