Completed
Push — master ( 2f6701...a7b61e )
by Khoa
05:19
created

bbook_modules::depends_on()   A

Complexity

Conditions 1
Paths 1

Duplication

Lines 0
Ratio 0 %

Size

Total Lines 4
Code Lines 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 4
rs 10
c 1
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
/**
3
* This file is part of the VinaBB.vn package.
4
*
5
* @copyright (c) VinaBB <vinabb.vn>
6
* @license GNU General Public License, version 2 (GPL-2.0)
7
*/
8
9
namespace vinabb\web\migrations\v10x;
10
11
use phpbb\db\migration\migration;
12
13
/**
14
* Add ACP modules for BBook
15
*/
16
class bbook_modules extends migration
17
{
18
	/**
19
	* List of required migrations
20
	*
21
	* @return array
22
	*/
23
	static public function depends_on()
24
	{
25
		return ['\vinabb\web\migrations\v10x\bbook_categories'];
26
	}
27
28
	/**
29
	* Update data
30
	*
31
	* @return array
32
	*/
33
	public function update_data()
34
	{
35
		return [
36
			['module.add', ['acp', 'ACP_CAT_BBOOK', [
37
				'module_basename'	=> '\vinabb\web\acp\bbook_books_module',
38
				'modes'				=> ['main']
39
			]]],
40
			['module.add', ['acp', 'ACP_CAT_BBOOK', [
41
				'module_basename'	=> '\vinabb\web\acp\bbook_chapters_module',
42
				'modes'				=> ['main']
43
			]]],
44
			['module.add', ['acp', 'ACP_CAT_BBOOK', [
45
				'module_basename'	=> '\vinabb\web\acp\bbook_words_module',
46
				'modes'				=> ['main']
47
			]]]
48
		];
49
	}
50
}
51