本文整理汇总了PHP中Vtiger_Package::loadManifestFromFile方法的典型用法代码示例。如果您正苦于以下问题:PHP Vtiger_Package::loadManifestFromFile方法的具体用法?PHP Vtiger_Package::loadManifestFromFile怎么用?PHP Vtiger_Package::loadManifestFromFile使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Vtiger_Package
的用法示例。
在下文中一共展示了Vtiger_Package::loadManifestFromFile方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: applyChange
function applyChange()
{
if ($this->hasError()) {
$this->sendError();
}
if ($this->isApplied()) {
$this->sendMsg('Changeset ' . get_class($this) . ' already applied!');
} else {
$module = 'Mobile';
if ($this->isModuleInstalled($module)) {
//Update module
$package = new Vtiger_Package();
$moduleInstance = Vtiger_Module::getInstance($module);
$package->loadManifestFromFile('modules/' . $module . '/manifest.xml');
$rdo = $package->update_Module($moduleInstance);
$this->sendMsg('Module updated: ' . $module);
} else {
$this->installManifestModule($module);
}
$this->sendMsg('Changeset ' . get_class($this) . ' applied!');
$this->markApplied();
}
$this->finishExecution();
}
示例2: count
$type = $argv[2];
require_once 'vtlib/Vtiger/Module.php';
require_once 'vtlib/Vtiger/Package.php';
global $current_user, $adb;
$Vtiger_Utils_Log = false;
// Turn off debugging level
$current_user = Users::getActiveAdminUser();
$package = new Vtiger_Package();
$tabrs = $adb->pquery('select count(*) from vtiger_tab where name=?', array($module));
if ($tabrs and $adb->query_result($tabrs, 0, 0) == 1) {
// it exists already so we are updating
if (strtolower($type) == 'language') {
// just copy files and activate
vtlib_toggleModuleAccess($module, true);
} else {
$moduleInstance = Vtiger_Module::getInstance($module);
$package->loadManifestFromFile('modules/' . $module . '/manifest.xml');
$rdo = $package->update_Module($moduleInstance);
}
echo "Module updated: {$module} \n";
} else {
if (strtolower($type) == 'language') {
$rdo = $package->importManifest('include/language/' . $module . '.manifest.xml');
} else {
$rdo = $package->importManifest('modules/' . $module . '/manifest.xml');
}
echo "Module installed: {$module} \n";
}
} else {
echo "\n Incorrect amount of parameters \n";
}