Conditions | 4 |
Paths | 4 |
Total Lines | 18 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
27 | public function upgrade(ModuleDataSetupInterface $setup, ModuleContextInterface $context) |
||
28 | { |
||
29 | $setup->startSetup(); |
||
30 | |||
31 | //Any version lower than 7.2.0: public_key => pmt_public_key, secret_key => pmt_private_key |
||
32 | if (version_compare($context->getVersion(), '7.2.0') > 0) { |
||
33 | print_r($this->config, true); |
||
34 | } |
||
35 | |||
36 | if (version_compare($context->getVersion(), '7.2.0') < 0) { |
||
37 | $newConfigs = array( |
||
38 | /* INSERT NEW CONFIGS PARAMS HERE:config=>'<config>','value'=>'<value>'*/); |
||
39 | foreach ($newConfigs as $config => $value) { |
||
40 | $setup->getConnection()->insert(self::CONFIG_TABLE, array('config'=>$config, 'value'=>$value)); |
||
41 | } |
||
42 | } |
||
43 | |||
44 | $setup->endSetup(); |
||
45 | } |
||
46 | } |