本文整理匯總了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";
}