· 7 years ago · Nov 04, 2018, 07:44 PM
1public function install()
2{
3 require_once 'sql/install.php';
4 Configuration::updateValue('MYMDOULE_TWO_LIVE_MODE', false);
5
6 return parent::install() &&
7 $this->registerHook('header') &&
8 $this->registerHook('backOfficeHeader') &&
9 $this->registerHook('displayFooter') &&
10
11 $this->registerHook('displayHeader');
12
13}
14
15$sql = array();
16
17$sql[] = 'CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'mymdoule_two` (
18 `id_mymdoule_two` int(11) NOT NULL AUTO_INCREMENT,
19 PRIMARY KEY (`id_mymdoule_two`)
20) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8;';
21foreach ($sql as $query) {
22 if (Db::getInstance()->execute($query) == false) {
23 return false;
24 }
25}