本文整理匯總了PHP中Vtiger_Package::export方法的典型用法代碼示例。如果您正苦於以下問題:PHP Vtiger_Package::export方法的具體用法?PHP Vtiger_Package::export怎麽用?PHP Vtiger_Package::export使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Vtiger_Package
的用法示例。
在下文中一共展示了Vtiger_Package::export方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1:
<?php
require_once 'vtlib/Vtiger/Package.php';
require_once 'vtlib/Vtiger/Module.php';
$package = new Vtiger_Package();
$package->export(Vtiger_Module::getInstance('Deliverynote'), 'test/vtlib', 'Deliverynote.zip', true);
示例2: url
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head><title><?php
echo $title;
?>
</title>
<style type="text/css">@import url("themes/softed/style.css");br { display: block; margin: 2px; }</style>
</head><body class=small style="font-size: 12px; margin: 2px; padding: 2px;">
<?php
}
set_time_limit(0);
ini_set('memory_limit', '1024M');
if (empty($_REQUEST['modulename'])) {
echo '<br><br><b>Necessary Parameter {modulename} not present</b><br>';
} else {
$modulename = vtlib_purify($_REQUEST['modulename']);
$module = Vtiger_Module::getInstance($modulename);
if ($module) {
$pkg = new Vtiger_Package();
$pkg->export($module, 'build', $modulename . '.zip', $dl);
if ($dl) {
die;
}
echo "<b>Package should be exported to the build directory of your install.</b><br>";
} else {
echo "<b>Failed to find " . $modulename . " module.</b><br>";
}
}
?>
</body>
</html>
示例3:
<?php
/*+********************************************************************************
* The contents of this file are subject to the vtiger CRM Public License Version 1.0
* ("License"); You may not use this file except in compliance with the License
* The Original Code is: vtiger CRM Open Source
* The Initial Developer of the Original Code is vtiger.
* Portions created by vtiger are Copyright (C) vtiger.
* All Rights Reserved.
********************************************************************************/
$module_export = $_REQUEST['module_export'];
require_once "vtlib/Vtiger/Package.php";
require_once "vtlib/Vtiger/Module.php";
$package = new Vtiger_Package();
$package->export(Vtiger_Module::getInstance($module_export), '', "{$module_export}.zip", true);
exit;
示例4: array
* ("License"); You may not use this file except in compliance with the License
* The Original Code is: vtiger CRM Open Source
* The Initial Developer of the Original Code is vtiger.
* Portions created by vtiger are Copyright (C) vtiger.
* All Rights Reserved.
********************************************************************************/
$module_export = vtlib_purify($_REQUEST['module_export']);
require_once "vtlib/Vtiger/Package.php";
require_once "vtlib/Vtiger/Module.php";
$package = new Vtiger_Package();
$module = Vtiger_Module::getInstance($module_export);
if ($module) {
if (isset($_REQUEST['manifestfs'])) {
Vtiger_Package::packageFromFilesystem($module_export, false, true);
} else {
$package->export($module, '', "{$module_export}.zip", true);
}
} else {
global $adb, $vtiger_current_version;
$lngrs = $adb->pquery('select * from vtiger_language where prefix=?', array($module_export));
if ($lngrs and $adb->num_rows($lngrs) == 1) {
// we have a language file
$lnginfo = $adb->fetch_array($lngrs);
$lngxml = 'include/language/' . $lnginfo['prefix'] . '.manifest.xml';
if (!file_exists($lngxml)) {
$mnf = fopen($lngxml, 'w');
fwrite($mnf, "<?xml version='1.0'?>\n");
fwrite($mnf, "<module>\n");
fwrite($mnf, "<type>language</type>\n");
fwrite($mnf, "<name>" . $lnginfo['name'] . "</name>\n");
fwrite($mnf, "<label>" . $lnginfo['label'] . "</label>\n");