Completed
Pull Request — master (#1)
by Jakub
02:06
created

install_acp_module::effectively_installed()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
/**
3
 *
4
 * Advertisement management. An extension for the phpBB Forum Software package.
5
 *
6
 * @copyright (c) 2017 phpBB Limited <https://www.phpbb.com>
7
 * @license GNU General Public License, version 2 (GPL-2.0)
8
 *
9
 */
10
11
namespace phpbb\admanagement\migrations;
12
13
class install_acp_module extends \phpbb\db\migration\migration
14
{
15
	public function effectively_installed()
16
	{
17
		return isset($this->config['acme_demo_goodbye']);
18
	}
19
20
	static public function depends_on()
1 ignored issue
show
Coding Style introduced by
As per PSR2, the static declaration should come after the visibility declaration.
Loading history...
21
	{
22
		return array('\phpbb\db\migration\data\v310\gold');
23
	}
24
25
	public function update_data()
26
	{
27
		return array(
28
			array('config.add', array('acme_demo_goodbye', 0)),
29
30
			array('module.add', array(
31
				'acp',
32
				'ACP_CAT_DOT_MODS',
33
				'ACP_DEMO_TITLE'
34
			)),
35
			array('module.add', array(
36
				'acp',
37
				'ACP_DEMO_TITLE',
38
				array(
39
					'module_basename'	=> '\phpbb\admanagement\acp\main_module',
40
					'modes'				=> array('settings'),
41
				),
42
			)),
43
		);
44
	}
45
}
46