topic_prefixes_module   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

Changes 3
Bugs 0 Features 0
Metric Value
eloc 12
c 3
b 0
f 0
dl 0
loc 24
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A main() 0 12 1
1
<?php
2
/**
3
 *
4
 * Topic Prefixes extension for the phpBB Forum Software package.
5
 *
6
 * @copyright (c) 2016 phpBB Limited <https://www.phpbb.com>
7
 * @license GNU General Public License, version 2 (GPL-2.0)
8
 *
9
 */
10
11
namespace phpbb\topicprefixes\acp;
12
13
/**
14
 * Class topic_prefixes_module
15
 */
16
class topic_prefixes_module
17
{
18
	/** @var string */
19
	public $u_action;
20
	public $tpl_name;
21
	public $page_title;
22
23
	/**
24
	 * Main ACP module
25
	 *
26
	 * @throws \Exception
27
	 */
28
	public function main()
29
	{
30
		global $phpbb_container;
31
32
		$lang = $phpbb_container->get('language');
33
		$lang->add_lang('acp/forums');
34
		$lang->add_lang('acp_topic_prefixes', 'phpbb/topicprefixes');
35
		$this->tpl_name   = 'acp_topic_prefixes';
36
		$this->page_title = 'TOPIC_PREFIXES';
37
38
		$admin_controller = $phpbb_container->get('phpbb.topicprefixes.admin_controller');
39
		$admin_controller->set_u_action($this->u_action)->main();
40
	}
41
}
42