当前位置: 首页>>代码示例>>PHP>>正文


PHP CRMEntity::setModuleSeqNumber方法代码示例

本文整理汇总了PHP中CRMEntity::setModuleSeqNumber方法的典型用法代码示例。如果您正苦于以下问题:PHP CRMEntity::setModuleSeqNumber方法的具体用法?PHP CRMEntity::setModuleSeqNumber怎么用?PHP CRMEntity::setModuleSeqNumber使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CRMEntity的用法示例。


在下文中一共展示了CRMEntity::setModuleSeqNumber方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: CRMEntity

$field8->typeofdata = 'V~O';
$block1->addField($field8);
$field9 = new Vtiger_Field();
$field9->name = 'dn_sequence';
//Sequencial
$field9->label = 'Delivery Note Number';
$field9->table = 'vtiger_deliverynote';
//$module->basetable;
$field9->column = 'dn_sequence';
$field9->columntype = 'VARCHAR(100)';
$field9->uitype = 4;
$field9->typeofdata = 'V~O';
$block1->addField($field9);
// following for auto gen on save
$entity_tmp = new CRMEntity();
$entity_tmp->setModuleSeqNumber("configure", $module->name, "DN", 1);
// Create default custom filter (mandatory)
$filter1 = new Vtiger_Filter();
$filter1->name = 'All';
$filter1->isdefault = true;
$module->addFilter($filter1);
// Add fields to the filter created
$filter1->addField($field1)->addField($field2, 1)->addField($field5, 2);
// Create one more filter
$filter2 = new Vtiger_Filter();
$filter2->name = 'All2';
$module->addFilter($filter2);
// Add fields to the filter
$filter2->addField($field1);
$filter2->addField($field2, 1);
// Add rule to the filter field
开发者ID:semdinsp,项目名称:vtiger-delivery-notes,代码行数:31,代码来源:vtlib.Test.Create.Module1.php

示例2: CRMEntity

 /**
  * Invoked when special actions are performed on the module.
  * @param String Module name
  * @param String Event Type (module.postinstall, module.disabled, module.enabled, module.preuninstall)
  */
 function vtlib_handler($modulename, $event_type)
 {
     if ($event_type == 'module.postinstall') {
         global $adb;
         // Configure module seq number
         $entity_tmp = new CRMEntity();
         Accounting::checkConfig(0);
         $entity_tmp->setModuleSeqNumber("configure", "Accounting", "PAY", 1);
         // Configure workflow
         Accounting::configure_workflows();
         Accounting::updateConfigParam('customlinks', 'true');
         Accounting::updateCustomLinks(array("Leads", "Contacts", "Vendors", "Accounts", "Invoice", "PurchaseOrder", "SalesOrder", "Invoice"), 'true');
         Accounting::setRelatedModules('false');
         Accounting::setRelatedModules('true');
     } else {
         if ($event_type == 'module.disabled') {
             Accounting::setRelatedModules('false');
             // TODO Handle actions when this module is disabled.
         } else {
             if ($event_type == 'module.enabled') {
                 Accounting::setRelatedModules('true');
                 // TODO Handle actions when this module is enabled.
             } else {
                 if ($event_type == 'module.preuninstall') {
                     // TODO Handle actions when this module is about to be deleted.
                     Accounting::setRelatedModules('false');
                 } else {
                     if ($event_type == 'module.preupdate') {
                         // TODO Handle actions before this module is updated.
                     } else {
                         if ($event_type == 'module.postupdate') {
                             Accounting::updateDateFields();
                             Accounting::checkConfig(1);
                             Accounting::setRelatedModules('false');
                             Accounting::setRelatedModules('true');
                             Accounting::configure_workflows();
                             // TODO Handle actions after this module is updated.
                         }
                     }
                 }
             }
         }
     }
 }
开发者ID:jmangarret,项目名称:vtigercrm,代码行数:49,代码来源:Accounting.php

示例3: values

 /**
  * Invoked when special actions are performed on the module.
  * @param String Module name
  * @param String Event Type
  */
 function vtlib_handler($moduleName, $eventType)
 {
     require_once 'include/utils/utils.php';
     require_once 'include/events/include.inc';
     $adb = PearDatabase::getInstance();
     $registerLink = false;
     $addModTracker = false;
     $handlerClass = 'SECURE';
     if ($eventType == 'module.postinstall') {
         //Add OSSPasswords Module to Customer Portal
         require_once 'vtlib/Vtiger/Module.php';
         // add default oss_passwords configuration
         $adb->pquery("INSERT INTO vtiger_passwords_config values(?,?,?,?)", array('10', '15', 'a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,W,X,Y,Z,0,1,2,3,4,5,6,7,8,9', '0'));
         // adds record prefix
         $myCustomEntity = new CRMEntity();
         $myCustomPrefix = "PASS";
         // Your custom prefix string for the custom module
         $sequenceStart = 1;
         // The starting sequence number
         $myCustomEntity->setModuleSeqNumber("configure", $moduleName, $myCustomPrefix, $sequenceStart);
         $registerLink = true;
         $addModTracker = true;
         // handler for obscuring password data in "update history"
         $em = new VTEventsManager($adb);
         $em->registerHandler('vtiger.entity.aftersave.final', 'modules/OSSPasswords/handlers/secure.php', $handlerClass);
         // Module icon
         copy('modules/OSSPasswords/OSSPasswords.png', 'layouts/vlayout/skins/images/OSSPasswords.png');
         // block export of module
         $sql = "UPDATE vtiger_tab SET customized=0 WHERE name='{$moduleName}' LIMIT 1;";
         $adb->query($sql, true);
     } else {
         if ($eventType == 'module.disabled') {
             // TODO Handle actions when this module is disabled.
             $registerLink = false;
             $em = new VTEventsManager($adb);
             $em->setHandlerInActive($handlerClass);
         } else {
             if ($eventType == 'module.enabled') {
                 // TODO Handle actions when this module is enabled.
                 $registerLink = true;
                 $em = new VTEventsManager($adb);
                 $em->setHandlerActive($handlerClass);
             } else {
                 if ($eventType == 'module.preuninstall') {
                     // TODO Handle actions when this module is about to be deleted.
                     $this->log->debug('Before starting uninstall script...');
                     require_once 'modules/Settings/' . $moduleName . '/views/uninstall.php';
                     $this->log->debug('After uninstall script.');
                     header('Location: index.php?module=Vtiger&parent=Settings&view=Index');
                 } else {
                     if ($eventType == 'module.preupdate') {
                         // TODO Handle actions before this module is updated.
                     } else {
                         if ($eventType == 'module.postupdate') {
                         }
                     }
                 }
             }
         }
     }
     $displayLabel = 'OSSPassword Configuration';
     if ($registerLink) {
         $blockid = $adb->query_result($adb->pquery("SELECT blockid FROM vtiger_settings_blocks WHERE label='LBL_OTHER_SETTINGS'", array()), 0, 'blockid');
         $sequence = (int) $adb->query_result($adb->pquery("SELECT max(sequence) as sequence FROM vtiger_settings_field WHERE blockid=?", array($blockid)), 0, 'sequence') + 1;
         $fieldid = $adb->getUniqueId('vtiger_settings_field');
         $adb->pquery("INSERT INTO vtiger_settings_field (fieldid,blockid,sequence,name,iconpath,description,linkto)\n\t\t\t\tVALUES (?,?,?,?,?,?,?)", array($fieldid, $blockid, $sequence, $displayLabel, 'migrate.gif', 'LBL_OSSPASSWORD_CONFIGURATION_DESCRIPTION', 'index.php?module=OSSPasswords&view=ConfigurePass&parent=Settings'));
     } else {
         $adb->pquery("DELETE FROM vtiger_settings_field WHERE name=?", array($displayLabel));
     }
     // register modtracker history updates
     if ($addModTracker) {
         $tabId = getTabid($moduleName);
         include_once 'modules/ModTracker/ModTracker.php';
         $moduleModTrackerInstance = new ModTracker();
         if (!$moduleModTrackerInstance->isModulePresent($tabId)) {
             $res = $adb->pquery("INSERT INTO vtiger_modtracker_tabs VALUES(?,?)", array($tabId, 1));
             $moduleModTrackerInstance->updateCache($tabId, 1);
         } else {
             $updatevisibility = $adb->pquery("UPDATE vtiger_modtracker_tabs SET visible = 1 WHERE tabid = ?", array($tabId));
             $moduleModTrackerInstance->updateCache($tabId, 1);
         }
         if (!$moduleModTrackerInstance->isModTrackerLinkPresent($tabId)) {
             $moduleInstance = Vtiger_Module::getInstance($tabId);
             $moduleInstance->addLink('DETAILVIEWBASIC', 'View History', "javascript:ModTrackerCommon.showhistory('\$RECORD\$')", '', '', array('path' => 'modules/ModTracker/ModTracker.php', 'class' => 'ModTracker', 'method' => 'isViewPermitted'));
         }
     }
 }
开发者ID:rcrrich,项目名称:YetiForceCRM,代码行数:92,代码来源:OSSPasswords.php


注:本文中的CRMEntity::setModuleSeqNumber方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。