Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 13
0.00% covered (danger)
0.00%
0 / 2
CRAP
0.00% covered (danger)
0.00%
0 / 1
controller
0.00% covered (danger)
0.00%
0 / 13
0.00% covered (danger)
0.00%
0 / 2
6
0.00% covered (danger)
0.00%
0 / 1
 __construct
0.00% covered (danger)
0.00%
0 / 6
0.00% covered (danger)
0.00%
0 / 1
2
 display
n/a
0 / 0
n/a
0 / 0
0
 handle
0.00% covered (danger)
0.00%
0 / 7
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2/**
3 *
4 * This file is part of the phpBB Forum Software package.
5 *
6 * @copyright (c) phpBB Limited <https://www.phpbb.com>
7 * @license GNU General Public License, version 2 (GPL-2.0)
8 *
9 * For full copyright and license information, please see
10 * the docs/CREDITS.txt file.
11 *
12 */
13
14namespace phpbb\help\controller;
15
16/**
17 * BBCode help page
18 */
19abstract class controller
20{
21    /** @var \phpbb\controller\helper */
22    protected $helper;
23
24    /** @var \phpbb\help\manager */
25    protected $manager;
26
27    /** @var \phpbb\template\template */
28    protected $template;
29
30    /** @var \phpbb\language\language */
31    protected $language;
32
33    /** @var string */
34    protected $root_path;
35
36    /** @var string */
37    protected $php_ext;
38
39    /**
40     * Constructor
41     *
42     * @param \phpbb\controller\helper    $helper
43     * @param \phpbb\help\manager        $manager
44     * @param \phpbb\template\template    $template
45     * @param \phpbb\language\language    $language
46     * @param string                    $root_path
47     * @param string                    $php_ext
48     */
49    public function __construct(\phpbb\controller\helper $helper, \phpbb\help\manager $manager, \phpbb\template\template $template, \phpbb\language\language $language, $root_path, $php_ext)
50    {
51        $this->helper = $helper;
52        $this->manager = $manager;
53        $this->template = $template;
54        $this->language = $language;
55        $this->root_path = $root_path;
56        $this->php_ext = $php_ext;
57    }
58
59    /**
60     * @return string
61     */
62    abstract protected function display();
63
64    public function handle()
65    {
66        $title = $this->display();
67
68        $this->template->assign_vars(array(
69            'L_FAQ_TITLE'    => $title,
70            'S_IN_FAQ'        => true,
71        ));
72
73        make_jumpbox(append_sid("{$this->root_path}viewforum.{$this->php_ext}"));
74        return $this->helper->render('faq_body.html', $title);
75    }
76}