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


PHP Vtiger_Functions::getModuleId方法代码示例

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


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

示例1: process

 public function process(Vtiger_Request $request)
 {
     $moduleName = $request->getModule();
     $qualifiedModuleName = $request->getModule(false);
     $source = $request->get('source');
     $sourceModule = $request->get('sourceModule');
     if ($sourceModule != '') {
         $source = Vtiger_Functions::getModuleId($sourceModule);
     }
     if ($source == '') {
         $source = 6;
     }
     $moduleModel = Settings_Widgets_Module_Model::getInstance($qualifiedModuleName);
     $RelatedModule = $moduleModel->getRelatedModule($source);
     $viewer = $this->getViewer($request);
     $viewer->assign('MODULE_MODEL', $moduleModel);
     $viewer->assign('SOURCE', $source);
     $viewer->assign('SOURCEMODULE', Vtiger_Functions::getModuleName($source));
     $viewer->assign('WIDGETS', $moduleModel->getWidgets($source));
     $viewer->assign('RELATEDMODULES', $RelatedModule);
     $viewer->assign('FILTERS', json_encode($moduleModel->getFiletrs($RelatedModule)));
     $viewer->assign('CHECKBOXS', json_encode($moduleModel->getCheckboxs($RelatedModule)));
     //$viewer->assign('EXCLUDEDTYPES', $moduleModel->excludedTypes($source) );
     $viewer->assign('QUALIFIED_MODULE', $qualifiedModuleName);
     $viewer->assign('MODULE', $moduleName);
     $viewer->view('Index.tpl', $qualifiedModuleName);
 }
开发者ID:JeRRimix,项目名称:YetiForceCRM,代码行数:27,代码来源:Index.php

示例2: process

 public function process(Vtiger_Request $request)
 {
     $adb = PearDatabase::getInstance();
     $metod = $request->get('metod');
     $params = $request->get('params');
     $params['folder'] = urldecode($params['folder']);
     $return = false;
     if (Vtiger_Functions::getModuleId('OSSMailView') && Vtiger_Functions::getModuleId('OSSMailScanner')) {
         $return = 0;
         $account = OSSMail_Record_Model::get_account_detail_by_name($params['username']);
         $result = $adb->pquery("SELECT ossmailviewid FROM vtiger_ossmailview WHERE id = ? AND mbox = ? AND rc_user = ?", array($params['uid'], $params['folder'], $account[0]['user_id']), true);
         if ($adb->num_rows($result) > 0) {
             $return = $adb->query_result($result, 0, 'ossmailviewid');
         } else {
             $scannerModel = Vtiger_Record_Model::getCleanInstance('OSSMailScanner');
             $params['actions'] = '0_created_Email';
             $mail_Scan_mail = $scannerModel->manualScanMail($params);
             if ($mail_Scan_mail['0_created_Email']) {
                 $return = $mail_Scan_mail['0_created_Email']['created_Email'];
             }
         }
     }
     $response = new Vtiger_Response();
     $response->setResult($return);
     $response->emit();
 }
开发者ID:JeRRimix,项目名称:YetiForceCRM,代码行数:26,代码来源:getCrmId.php

示例3: getListFiledOfRelatedModule

 function getListFiledOfRelatedModule($moduleName)
 {
     $db = PearDatabase::getInstance();
     $tabid = getTabid($moduleName);
     $sourceModule = $moduleName;
     $sql = "select vtiger_field.fieldid, fieldlabel, uitype, vtiger_fieldmodulerel.relmodule from vtiger_field \n\t\t\t\tleft JOIN vtiger_fieldmodulerel ON vtiger_fieldmodulerel.fieldid = vtiger_field.fieldid where tabid = ? AND (uitype = '10' OR uitype = '59' OR uitype = '53' OR uitype = '51')";
     $resultModuleList = $db->pquery($sql, array($tabid), true);
     $moduleList = array();
     for ($i = 0; $i < $db->num_rows($resultModuleList); $i++) {
         $uitype = $db->query_result($resultModuleList, $i, 'uitype');
         $fieldid = $db->query_result($resultModuleList, $i, 'fieldid');
         $fieldlabel = $db->query_result($resultModuleList, $i, 'fieldlabel');
         if ($uitype == 10) {
             $moduleList[] = array(Vtiger_Functions::getModuleId($db->query_result($resultModuleList, $i, 'relmodule')), $fieldlabel, $fieldid);
         } elseif ($uitype == 51) {
             $moduleList[] = array(Vtiger_Functions::getModuleId('Accounts'), $fieldlabel, $fieldid);
         } elseif ($uitype == 59) {
             $moduleList[] = array(Vtiger_Functions::getModuleId('Products'), $fieldlabel, $fieldid);
         } elseif ($uitype == 53) {
             $moduleList[] = array(Vtiger_Functions::getModuleId('Users'), $fieldlabel, $fieldid);
         }
     }
     $output = array();
     for ($i = 0; $i < count($moduleList); $i++) {
         $moduleInfoSql = "SELECT * FROM vtiger_tab WHERE tabid = ?";
         $moduleInfoResult = $db->pquery($moduleInfoSql, array($moduleList[$i][0]), true);
         $moduleName = $db->query_result($moduleInfoResult, 0, 'name');
         $moduleTrLabal = vtranslate($moduleList[$i][1], $sourceModule);
         $output[$moduleTrLabal] = array();
         $output[$moduleTrLabal] = $this->getListFiledOfModule($moduleName, $moduleList[$i][2]);
     }
     return $output;
 }
开发者ID:Bergdahls,项目名称:YetiForceCRM,代码行数:33,代码来源:Module.php

示例4: getListViewEntries

 /**
  * Function to get the list view entries
  * @param Vtiger_Paging_Model $pagingModel
  * @return <Array> - Associative array of record id mapped to Vtiger_Record_Model instance.
  */
 public function getListViewEntries($pagingModel)
 {
     $db = PearDatabase::getInstance();
     $module = $this->getModule();
     $moduleName = $module->getName();
     $parentModuleName = $module->getParentName();
     $qualifiedModuleName = $moduleName;
     if (!empty($parentModuleName)) {
         $qualifiedModuleName = $parentModuleName . ':' . $qualifiedModuleName;
     }
     $recordModelClass = Vtiger_Loader::getComponentClassName('Model', 'Record', $qualifiedModuleName);
     $listQuery = $this->getBasicListQuery();
     $startIndex = $pagingModel->getStartIndex();
     $pageLimit = $pagingModel->getPageLimit();
     $orderBy = $this->getForSql('orderby');
     if (!empty($orderBy) && $orderBy === 'smownerid') {
         $fieldModel = Vtiger_Field_Model::getInstance('assigned_user_id', $moduleModel);
         if ($fieldModel->getFieldDataType() == 'owner') {
             $orderBy = 'COALESCE(CONCAT(vtiger_users.first_name,vtiger_users.last_name),vtiger_groups.groupname)';
         }
     }
     if (!empty($orderBy)) {
         $listQuery .= ' ORDER BY ' . $orderBy . ' ' . $this->getForSql('sortorder');
     }
     $sourceModule = $this->get('sourceModule');
     if (!empty($sourceModule)) {
         $tabId = Vtiger_Functions::getModuleId($sourceModule);
         $listQuery .= " WHERE `module` = '{$tabId}' ";
     }
     if ($module->isPagingSupported()) {
         $nextListQuery = $listQuery . ' LIMIT ' . ($startIndex + $pageLimit) . ',1';
         $listQuery .= " LIMIT {$startIndex}, {$pageLimit}";
     }
     $listResult = $db->pquery($listQuery, array());
     $noOfRecords = $db->num_rows($listResult);
     $listViewRecordModels = array();
     for ($i = 0; $i < $noOfRecords; ++$i) {
         $row = $db->query_result_rowdata($listResult, $i);
         $record = new $recordModelClass();
         $record->setData($row);
         $recordModule = Vtiger_Functions::getModuleName($row['module']);
         $record->set('module', vtranslate($recordModule, $recordModule));
         if (method_exists($record, 'getModule') && method_exists($record, 'setModule')) {
             $moduleModel = Settings_Vtiger_Module_Model::getInstance($qualifiedModuleName);
             $record->setModule($moduleModel);
         }
         $listViewRecordModels[$record->getId()] = $record;
     }
     if ($module->isPagingSupported()) {
         $pagingModel->calculatePageRange($listViewRecordModels);
         $nextPageResult = $db->pquery($nextListQuery, array());
         $nextPageNumRows = $db->num_rows($nextPageResult);
         if ($nextPageNumRows <= 0) {
             $pagingModel->set('nextPageExists', false);
         }
     }
     return $listViewRecordModels;
 }
开发者ID:rcrrich,项目名称:UpdatePackages,代码行数:63,代码来源:ListView.php

示例5: vtlib_handler

 /**
  * Invoked when special actions are performed on the module.
  * @param String Module name
  * @param String Event Type
  */
 function vtlib_handler($moduleName, $eventType)
 {
     global $adb;
     if ($eventType == 'module.postinstall') {
         include_once 'vtlib/Vtiger/Module.php';
         $moduleInstance = CRMEntity::getInstance('RequirementCards');
         $moduleInstance->setModuleSeqNumber("configure", 'RequirementCards', 'RC', '1');
         $adb->pquery('UPDATE vtiger_tab SET customized=0 WHERE name=?', array('RequirementCards'));
         $moduleInstance = Vtiger_Module::getInstance('RequirementCards');
         $targetModule = Vtiger_Module::getInstance('Accounts');
         $targetModule->setRelatedList($moduleInstance, 'RequirementCards', array('ADD'), 'get_dependents_list');
         $modcommentsModuleInstance = Vtiger_Module::getInstance('ModComments');
         if ($modcommentsModuleInstance && file_exists('modules/ModComments/ModComments.php')) {
             include_once 'modules/ModComments/ModComments.php';
             if (class_exists('ModComments')) {
                 ModComments::addWidgetTo(array('RequirementCards'));
             }
         }
         $modcommentsModuleInstance = Vtiger_Module::getInstance('ModTracker');
         if ($modcommentsModuleInstance && file_exists('modules/ModTracker/ModTracker.php')) {
             include_once 'vtlib/Vtiger/Module.php';
             include_once 'modules/ModTracker/ModTracker.php';
             $tabid = Vtiger_Functions::getModuleId('RequirementCards');
             $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'));
             }
         }
     } else {
         if ($eventType == 'module.disabled') {
             // TODO Handle actions before this module is being uninstalled.
         } else {
             if ($eventType == 'module.preuninstall') {
                 // TODO Handle actions when this module is about to be deleted.
             } else {
                 if ($eventType == 'module.preupdate') {
                     // TODO Handle actions before this module is updated.
                 } else {
                     if ($eventType == 'module.postupdate') {
                         // TODO Handle actions after this module is updated.
                     }
                 }
             }
         }
     }
 }
开发者ID:rcrrich,项目名称:UpdatePackages,代码行数:59,代码来源:RequirementCards.php

示例6: getTreeField

 /**
  * Load tree field info
  * @return array
  */
 public function getTreeField()
 {
     if ($this->has('fieldTemp')) {
         return $this->get('fieldTemp');
     }
     $db = PearDatabase::getInstance();
     $result = $db->pquery('SELECT tablename,columnname,fieldname,fieldlabel,fieldparams FROM vtiger_field WHERE uitype = ? AND tabid = ?', [302, Vtiger_Functions::getModuleId($this->getModuleName())]);
     $fieldTemp = $db->getRow($result);
     $this->set('fieldTemp', $fieldTemp);
     return $fieldTemp;
 }
开发者ID:nikdejan,项目名称:YetiForceCRM,代码行数:15,代码来源:TreeCategoryModal.php

示例7: save

 public function save($comment)
 {
     $db = PearDatabase::getInstance();
     if (substr($this->get('relatedRecord'), 0, 1) == 'T') {
         $db->update('u_yf_crmentity_rel_tree', ['rel_comment' => $comment], 'crmid = ? AND tree = ? AND relmodule = ?', [$this->get('record'), $this->get('relatedRecord'), Vtiger_Functions::getModuleId($this->get('relatedModuleName'))]);
     } else {
         $relationTable = $this->getRelationTable();
         $table = key($relationTable);
         $db->update($table, ['rel_comment' => $comment], $relationTable[$table][0] . ' = ? AND ' . $relationTable[$table][1] . ' = ?', [$this->get('record'), $this->get('relatedRecord')]);
     }
 }
开发者ID:nikdejan,项目名称:YetiForceCRM,代码行数:11,代码来源:RelatedCommentModal.php

示例8: vtlib_handler

 /**
  * 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)
 {
     $adb = PearDatabase::getInstance();
     if ($event_type == 'module.postinstall') {
         $ModuleInstance = CRMEntity::getInstance($modulename);
         $ModuleInstance->setModuleSeqNumber("configure", $modulename, '', '1');
         $modcommentsModuleInstance = Vtiger_Module::getInstance('ModComments');
         if ($modcommentsModuleInstance && file_exists('modules/ModComments/ModComments.php')) {
             include_once 'modules/ModComments/ModComments.php';
             if (class_exists('ModComments')) {
                 ModComments::addWidgetTo(array('Payments'));
             }
         }
         $adb->pquery('UPDATE vtiger_tab SET customized=0 WHERE name=?', array($modulename));
         $tabid = Vtiger_Functions::getModuleId($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'));
         }
         $this->addWorkflow($modulename);
     } else {
         if ($event_type == 'module.disabled') {
             // TODO Handle actions when this module is disabled.
         } else {
             if ($event_type == 'module.enabled') {
                 // 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.
                 } else {
                     if ($event_type == 'module.preupdate') {
                         // TODO Handle actions before this module is updated.
                     } else {
                         if ($event_type == 'module.postupdate') {
                         }
                     }
                 }
             }
         }
     }
 }
开发者ID:Bergdahls,项目名称:YetiForceCRM,代码行数:55,代码来源:PaymentsOut.php

示例9: getTreeField

 /**
  * Load tree field info
  * @return array
  */
 public function getTreeField()
 {
     if ($this->has('fieldTemp')) {
         return $this->get('fieldTemp');
     }
     $db = PearDatabase::getInstance();
     $result = $db->pquery('SELECT tablename,columnname,fieldname,fieldparams FROM vtiger_field WHERE uitype = ? AND tabid = ?', [302, Vtiger_Functions::getModuleId($this->getModuleName())]);
     if ($db->getRowCount($result) == 0) {
         Vtiger_Functions::throwNewException(vtranslate('ERR_TREE_NOT_FOUND', $this->getModuleName()));
     }
     $fieldTemp = $db->getRow($result);
     $this->set('fieldTemp', $fieldTemp);
     return $fieldTemp;
 }
开发者ID:nikdejan,项目名称:YetiForceCRM,代码行数:18,代码来源:TreeView.php

示例10: process

 public function process(Vtiger_Request $request)
 {
     $moduleName = $request->getModule();
     $viewer = $this->getViewer($request);
     $OSSMail_Record_Model = Vtiger_Record_Model::getCleanInstance('OSSMail');
     if (Vtiger_Functions::getModuleId('OSSMailScanner')) {
         $OSSMailScanner_Record_Model = Vtiger_Record_Model::getCleanInstance('OSSMailScanner');
         $WidgetCfg = $OSSMailScanner_Record_Model->getConfig(false);
     }
     $viewer->assign('RecordModel', $OSSMail_Record_Model);
     $viewer->assign('WIDGET_CFG', $WidgetCfg);
     $viewer->assign('MODULENAME', $moduleName);
     echo $viewer->view('config.tpl', $moduleName, true);
 }
开发者ID:rcrrich,项目名称:UpdatePackages,代码行数:14,代码来源:index.php

示例11: process

 public function process(Vtiger_Request $request)
 {
     $moduleName = $request->getModule();
     $OSSMail_active = Vtiger_Functions::getModuleId('OSSMail');
     if ($OSSMail_active) {
         $mailRecordModel = Vtiger_Record_Model::getCleanInstance('OSSMail');
         $accountsList = $mailRecordModel->getAccountsList();
         $mailboxes = $mailRecordModel->get_default_mailboxes();
     }
     $mailScannerRecordModel = Vtiger_Record_Model::getCleanInstance('OSSMailScanner');
     $identityList = [];
     if ($accountsList) {
         foreach ($accountsList as $key => $account) {
             $identityList[$account['user_id']] = $mailScannerRecordModel->getIdentities($account['user_id']);
             $mbox = $mailRecordModel->imapConnect($account['username'], $account['password'], $account['mail_host'], 'INBOX', false);
             $accountsList[$key]['status'] = $mbox ? 'LBL_ACTIVE_MAIL' : 'LBL_INACTIVE_MAIL';
         }
     }
     $EmailActionsList = $mailScannerRecordModel->getEmailActionsList();
     $EmailActionsListName = $mailScannerRecordModel->getEmailActionsListName($EmailActionsList);
     $ConfigFolderList = $mailScannerRecordModel->getConfigFolderList();
     $EmailSearch = $mailScannerRecordModel->getEmailSearch();
     $EmailSearchList = $mailScannerRecordModel->getEmailSearchList();
     $widgetCfg = $mailScannerRecordModel->getConfig(false);
     $supportedModules = Settings_Vtiger_CustomRecordNumberingModule_Model::getSupportedModules();
     foreach ($supportedModules as $supportedModule) {
         if (in_array($supportedModule->name, $this->prefixesForModules)) {
             $moduleModel = Settings_Vtiger_CustomRecordNumberingModule_Model::getInstance($supportedModule->name);
             $moduleData = $moduleModel->getModuleCustomNumberingData();
             $RecordNumbering[$supportedModule->name] = $moduleData;
         }
     }
     $check_cron = $mailScannerRecordModel->get_cron();
     $viewer = $this->getViewer($request);
     $viewer->assign('RECORD_MODEL', $mailScannerRecordModel);
     $viewer->assign('ACCOUNTLIST', $accountsList);
     $viewer->assign('EMAILACTIONSLIST', $EmailActionsList);
     $viewer->assign('EMAILACTIONSLISTNAME', $EmailActionsListName);
     $viewer->assign('FOLDERMAILBOXES', $mailboxes);
     $viewer->assign('CONFIGFOLDERLIST', $ConfigFolderList);
     $viewer->assign('WIDGET_CFG', $widgetCfg);
     $viewer->assign('EMAILSEARCH', $EmailSearch);
     $viewer->assign('EMAILSEARCHLIST', $EmailSearchList);
     $viewer->assign('RECORDNUMBERING', $RecordNumbering);
     $viewer->assign('ERRORNOMODULE', !$OSSMail_active);
     $viewer->assign('MODULENAME', $moduleName);
     $viewer->assign('IDENTITYLIST', $identityList);
     $viewer->assign('CHECKCRON', $check_cron);
     echo $viewer->view('Index.tpl', $request->getModule(false), true);
 }
开发者ID:Bergdahls,项目名称:YetiForceCRM,代码行数:50,代码来源:Index.php

示例12: getMultiReferenceValueFields

 /**
  * Loading the list of multireference fields
  * @param string $sourceModule Source module name
  * @param string $destinationModule Destination module name
  * @return array
  */
 public function getMultiReferenceValueFields($sourceModule, $destinationModule)
 {
     $return = Vtiger_Cache::get('mrvf-' . $sourceModule, $destinationModule);
     if (!$return) {
         $db = PearDatabase::getInstance();
         $query = 'SELECT * FROM vtiger_field WHERE tabid = ? AND presence <> ? AND fieldparams LIKE \'{"module":"' . $destinationModule . '"%\';';
         $result = $db->pquery($query, [Vtiger_Functions::getModuleId($sourceModule), 1]);
         $return = [];
         while ($field = $db->fetch_array($result)) {
             $return[] = $field;
         }
         Vtiger_Cache::set('mrvf-' . $sourceModule, $destinationModule, $return);
     }
     return $return;
 }
开发者ID:noclav,项目名称:UpdatePackages,代码行数:21,代码来源:MultiReferenceValue.php

示例13: process

 public function process(Vtiger_Request $request)
 {
     $metod = $request->get('metod');
     $params = $request->get('params');
     $result = false;
     if (Vtiger_Functions::getModuleId('OSSMailView')) {
         $params['folder'] = urldecode($params['folder']);
         $account = OSSMail_Record_Model::get_account_detail_by_name($params['username']);
         $params['user_id'] = $account['user_id'];
         $OSSMailModel = Vtiger_Record_Model::getCleanInstance('OSSMail');
         $result = $OSSMailModel->findCrmDetail($params, $metod);
     }
     $response = new Vtiger_Response();
     $response->setResult($result);
     $response->emit();
 }
开发者ID:Bergdahls,项目名称:YetiForceCRM,代码行数:16,代码来源:findCrmDetail.php

示例14: process

 function process(Vtiger_Request $request)
 {
     $branches = $request->get('branches');
     $filter = $request->get('filter');
     $category = $request->get('category');
     if (empty($branches) && empty($category)) {
         return;
     }
     $moduleName = $request->getModule();
     $viewer = $this->getViewer($request);
     $baseModuleName = 'Accounts';
     $multiReferenceFirld = Vtiger_MultiReferenceValue_UIType::getFieldsByModules($baseModuleName, $moduleName);
     $multiReferenceFirld = reset($multiReferenceFirld);
     if (count($multiReferenceFirld) === 0) {
         return;
     }
     $pagingModel = new Vtiger_Paging_Model();
     $pagingModel->set('limit', 'no_limit');
     $listViewModel = Vtiger_ListView_Model::getInstance($baseModuleName, $filter);
     $queryGenerator = $listViewModel->get('query_generator');
     $glue = '';
     if (!empty($branches)) {
         if (count($queryGenerator->getWhereFields()) > 0 && count($searchParams) > 0) {
             $glue = QueryGenerator::$AND;
         }
         $queryGenerator->addCondition($multiReferenceFirld['columnname'], implode(',', $branches), 'c');
     }
     if (!empty($category)) {
         $baseModuleId = Vtiger_Functions::getModuleId($baseModuleName);
         $moduleId = Vtiger_Functions::getModuleId($moduleName);
         $query = 'SELECT crmid FROM u_yf_crmentity_rel_tree WHERE module = ' . $baseModuleId . ' AND relmodule = ' . $moduleId . ' AND tree IN (\'' . implode("','", $category) . '\')';
         if (count($queryGenerator->getWhereFields()) > 0 && count($searchParams) > 0) {
             $glue = QueryGenerator::$AND;
         }
         $queryGenerator->addCondition($multiReferenceFirld['columnname'], $query, 'subQuery', 'OR', true);
     }
     $listViewModel->set('query_generator', $queryGenerator);
     $listEntries = $listViewModel->getListViewEntries($pagingModel, true);
     if (count($listEntries) === 0) {
         return;
     }
     $listHeaders = $listViewModel->getListViewHeaders();
     $viewer->assign('ENTRIES', $listEntries);
     $viewer->assign('HEADERS', $listHeaders);
     $viewer->assign('MODULE', $baseModuleName);
     $viewer->view('TreeRecords.tpl', $moduleName);
 }
开发者ID:nikdejan,项目名称:YetiForceCRM,代码行数:47,代码来源:TreeRecords.php

示例15: process

 public function process(Vtiger_Request $request)
 {
     $moduleName = $request->getModule();
     $OSSMail_active = Vtiger_Functions::getModuleId('OSSMail');
     if ($OSSMail_active) {
         $OSSMail_Record_Model = Vtiger_Record_Model::getCleanInstance('OSSMail');
         $AccountsList = $OSSMail_Record_Model->getAccountsList();
         $mailboxes = $OSSMail_Record_Model->get_default_mailboxes();
     }
     $OSSMailScanner_Record_Model = Vtiger_Record_Model::getCleanInstance('OSSMailScanner');
     $identityList = array();
     for ($i = 0; $i < count($AccountsList); $i++) {
         $identityList[$AccountsList[$i]['user_id']] = $OSSMailScanner_Record_Model->getIdentities($AccountsList[$i]['user_id']);
     }
     $EmailActionsList = $OSSMailScanner_Record_Model->getEmailActionsList();
     $EmailActionsListName = $OSSMailScanner_Record_Model->getEmailActionsListName($EmailActionsList);
     $ConfigFolderList = $OSSMailScanner_Record_Model->getConfigFolderList();
     $EmailSearch = $OSSMailScanner_Record_Model->getEmailSearch();
     $EmailSearchList = $OSSMailScanner_Record_Model->getEmailSearchList();
     $WidgetCfg = $OSSMailScanner_Record_Model->getConfig(false);
     $supportedModules = Settings_Vtiger_CustomRecordNumberingModule_Model::getSupportedModules();
     foreach ($supportedModules as $supportedModule) {
         if (in_array($supportedModule->name, $this->prefixesForModules)) {
             $moduleModel = Settings_Vtiger_CustomRecordNumberingModule_Model::getInstance($supportedModule->name);
             $moduleData = $moduleModel->getModuleCustomNumberingData();
             $RecordNumbering[$supportedModule->name] = $moduleData;
         }
     }
     $check_cron = $OSSMailScanner_Record_Model->get_cron();
     $viewer = $this->getViewer($request);
     $viewer->assign('RecordModel', $OSSMailScanner_Record_Model);
     $viewer->assign('ACCOUNTLIST', $AccountsList);
     $viewer->assign('EMAILACTIONSLIST', $EmailActionsList);
     $viewer->assign('EMAILACTIONSLISTNAME', $EmailActionsListName);
     $viewer->assign('FOLDERMAILBOXES', $mailboxes);
     $viewer->assign('CONFIGFOLDERLIST', $ConfigFolderList);
     $viewer->assign('WIDGET_CFG', $WidgetCfg);
     $viewer->assign('EMAILSEARCH', $EmailSearch);
     $viewer->assign('EMAILSEARCHLIST', $EmailSearchList);
     $viewer->assign('RECORDNUMBERING', $RecordNumbering);
     $viewer->assign('ERRORNOMODULE', !$OSSMail_active);
     $viewer->assign('MODULENAME', $moduleName);
     $viewer->assign('IDENTITYLIST', $identityList);
     $viewer->assign('CHECKCRON', $check_cron);
     echo $viewer->view('index.tpl', $moduleName, true);
 }
开发者ID:JeRRimix,项目名称:YetiForceCRM,代码行数:46,代码来源:index.php


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