本文整理汇总了PHP中Mage_Core_Model_Resource_Setup::applyUpdates方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Core_Model_Resource_Setup::applyUpdates方法的具体用法?PHP Mage_Core_Model_Resource_Setup::applyUpdates怎么用?PHP Mage_Core_Model_Resource_Setup::applyUpdates使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mage_Core_Model_Resource_Setup
的用法示例。
在下文中一共展示了Mage_Core_Model_Resource_Setup::applyUpdates方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: applyUpdates
/**
* Store the applied update versions
*
* @return parent::applyUpdates()
*/
public function applyUpdates()
{
$dbVer = $this->_getResource()->getDbVersion($this->_resourceName);
$configVer = (string) $this->_moduleConfig->version;
$this->setDbVer($dbVer);
$this->setConfigVer($configVer);
return parent::applyUpdates();
}
示例2: applyUpdates
/**
* Do not install module if Magento is not installed yet.
* This prevents error during Mage_Cms data install.
*
* @see Mage_Core_Model_Resource_Setup::applyUpdates()
*/
public function applyUpdates()
{
if (!Mage::isInstalled()) {
$modules = Mage::getConfig()->getNode('modules')->children();
$myModule = substr(__CLASS__, 0, strpos(__CLASS__, '_Model'));
foreach ($modules as $moduleName => $moduleNode) {
if ($moduleName != $myModule) {
Mage::getConfig()->addAllowedModules($moduleName);
}
}
Mage::getConfig()->reinit();
return $this;
}
return parent::applyUpdates();
}
示例3: applyUpdates
public function applyUpdates()
{
if (!Mage::isInstalled()) {
$dir = "app/code/local/Wyomind/";
$ret = array();
if (is_dir($dir)) {
if (($dh = opendir($dir)) != false) {
while (($file = readdir($dh)) !== false) {
if (is_dir($dir . $file) && $file != "." && $file != "..") {
$enabled = Mage::getConfig()->getModuleConfig('Wyomind_' . ucfirst($namespace = strtolower($file)))->is('active', 'true');
if ($enabled) {
$ret[] = $file;
}
}
}
closedir($dh);
}
}
Mage::getConfig()->saveConfig("notificationmanager/notificationmanager/extensions", implode(',', $ret), "default", "0");
Mage::getConfig()->cleanCache();
}
return parent::applyUpdates();
}
示例4: applyUpdates
/**
* Apply Index module DB updates and sync indexes declaration
*
* @return void
*/
public function applyUpdates()
{
parent::applyUpdates();
$this->_syncIndexes();
}
示例5: applyUpdates
/**
* Prevent sql updates from running before Magento is installed.
*
* @return \EcomDev_Cms_Model_Resource_Setup
*/
public function applyUpdates()
{
return Mage::isInstalled() ? parent::applyUpdates() : $this;
}
示例6: applyUpdates
public function applyUpdates()
{
// double running protection
usleep(1000000);
// 1 sec
if ($this->isLocked()) {
return;
}
$this->lock();
try {
$this->beforeModuleDbModification();
parent::applyUpdates();
$this->afterModuleDbModification();
} catch (Exception $e) {
$this->unlock();
throw $e;
}
$this->unlock();
}