search::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 4
nc 1
nop 3
dl 0
loc 6
ccs 5
cts 5
cp 1
crap 1
rs 9.4285
c 0
b 0
f 0
1
<?php
2
/**
3
*
4
* @package Board3 Portal v2.1
5
* @copyright (c) 2013 Board3 Group ( www.board3.de )
6
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
7
*
8
*/
9
10
namespace board3\portal\modules;
11
12
/**
13
* @package Search
14
*/
15
class search extends module_base
16
{
17
	/**
18
	* Allowed columns: Just sum up your options (Exp: left + right = 10)
19
	* top		1
20
	* left		2
21
	* center	4
22
	* right		8
23
	* bottom	16
24
	*/
25
	public $columns = 10;
26
27
	/**
28
	* Default modulename
29
	*/
30
	public $name = 'PORTAL_SEARCH';
31
32
	/**
33
	* Default module-image:
34
	* file must be in "{T_THEME_PATH}/images/portal/"
35
	*/
36
	public $image_src = 'portal_search.png';
37
38
	/**
39
	* module-language file
40
	* file must be in "language/{$user->lang}/mods/portal/"
41
	*/
42
	public $language = 'portal_search_module';
43
44
	/**
45
	* custom acp template
46
	* file must be in "adm/style/portal/"
47
	*/
48
	public $custom_acp_tpl = '';
49
50
	/** @var \phpbb\template */
51
	protected $template;
52
53
	/** @var string phpBB root path */
54
	protected $phpbb_root_path;
55
56
	/** @var string PHP file extension */
57
	protected $php_ext;
58
59
	/**
60
	* Construct a search object
61
	*
62
	* @param \phpbb\template $template phpBB template
63
	* @param string $phpbb_root_path phpbb root path
64
	* @param string $php_ext php file extension
65
	*/
66 2
	public function __construct($template, $phpbb_root_path, $php_ext)
67
	{
68 2
		$this->template = $template;
69 2
		$this->phpbb_root_path = $phpbb_root_path;
70 2
		$this->php_ext = $php_ext;
71 2
	}
72
73
	/**
74
	* {@inheritdoc}
75
	*/
76 1
	public function get_template_side($module_id)
77
	{
78 1
		return 'search_side.html';
79
	}
80
81
	/**
82
	* {@inheritdoc}
83
	*/
84 1
	public function get_template_acp($module_id)
85
	{
86
		return array(
87 1
			'title'	=> 'PORTAL_SEARCH',
88 1
			'vars'	=> array(),
89 1
		);
90
	}
91
}
92