Last active
December 2, 2015 10:44
SUPEE-6788 variable + block setup script. 1.) Create a new module or extend a current one. 2.) Create a new install or setup script with the variables and blocks which are not whitelisted yet.
This file contains hidden or 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
<?php | |
/** | |
* Created by PhpStorm. | |
* User: a.voelkl | |
* Date: 30.10.2015 | |
* Time: 13:21 | |
*/ | |
/** @var $installer Mage_Core_Model_Resource_Setup */ | |
$installer = $this; | |
$installer->startSetup(); | |
//--------------------------------------------------- | |
// Add variables | |
//--------------------------------------------------- | |
$installer->getConnection()->insertMultiple( | |
$installer->getTable('admin/permission_variable'), | |
array( | |
array('variable_name' => 'your/variable/name', 'is_allowed' => 1), | |
array('variable_name' => 'another/modules/configvariable', 'is_allowed' => 1), | |
) | |
); | |
//--------------------------------------------------- | |
// Add blocks | |
//--------------------------------------------------- | |
$installer->getConnection()->insertMultiple( | |
$installer->getTable('admin/permission_block'), | |
array( | |
array('block_name' => 'mymodule/myblock', 'is_allowed' => 1), | |
array('block_name' => 'anothermodule/blockname', 'is_allowed' => 1), | |
) | |
); | |
$installer->endSetup(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment