-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f5cbb6d
commit aa88a17
Showing
7 changed files
with
106 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
<?php | ||
/** | ||
* MageSpecialist | ||
* | ||
* NOTICE OF LICENSE | ||
* | ||
* This source file is subject to the Open Software License (OSL 3.0) | ||
* that is bundled with this package in the file LICENSE.txt. | ||
* It is also available through the world-wide-web at this URL: | ||
* http://opensource.org/licenses/osl-3.0.php | ||
* If you did not receive a copy of the license and are unable to | ||
* obtain it through the world-wide-web, please send an email | ||
* to [email protected] so we can send you a copy immediately. | ||
* | ||
* @category MSP | ||
* @package MSP_AdminRestriction | ||
* @copyright Copyright (c) 2017 Skeeller srl (http://www.magespecialist.it) | ||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | ||
*/ | ||
|
||
namespace MSP\AdminRestriction\Setup; | ||
|
||
use Magento\Framework\Setup\ModuleContextInterface; | ||
use Magento\Framework\Setup\ModuleDataSetupInterface; | ||
use Magento\Framework\Setup\UpgradeDataInterface; | ||
use MSP\SecuritySuiteCommon\Model\ConfigMigration; | ||
|
||
class UpgradeData implements UpgradeDataInterface | ||
{ | ||
/** | ||
* @var ConfigMigration | ||
*/ | ||
private $configMigration; | ||
|
||
public function __construct( | ||
ConfigMigration $configMigration | ||
) | ||
{ | ||
$this->configMigration = $configMigration; | ||
} | ||
|
||
protected function upgradeTo010200(ModuleDataSetupInterface $setup) | ||
{ | ||
$this->configMigration->doConfigMigration( | ||
$setup, | ||
'msp_securitysuite/adminrestriction', | ||
'msp_securitysuite_adminrestriction/general' | ||
); | ||
} | ||
|
||
/** | ||
* Upgrades data for a module | ||
* | ||
* @param ModuleDataSetupInterface $setup | ||
* @param ModuleContextInterface $context | ||
* @return void | ||
*/ | ||
public function upgrade(ModuleDataSetupInterface $setup, ModuleContextInterface $context) | ||
{ | ||
$setup->startSetup(); | ||
|
||
if (version_compare($context->getVersion(), '1.2.0') < 0) { | ||
$this->upgradeTo010200($setup); | ||
} | ||
|
||
$setup->endSetup(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters