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


PHP Vtiger_Module_Model::getId方法代码示例

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


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

示例1: getRelationQuery

 /**
  * Function to get relation query for particular module with function name
  * @param <record> $recordId
  * @param <String> $functionName
  * @param Vtiger_Module_Model $relatedModule
  * @return <String>
  */
 public function getRelationQuery($recordId, $functionName, $relatedModule)
 {
     $relatedModuleName = $relatedModule->getName();
     $focus = CRMEntity::getInstance($this->getName());
     $focus->id = $recordId;
     $result = $focus->{$functionName}($recordId, $this->getId(), $relatedModule->getId());
     $query = $result['query'] . ' ' . $this->getSpecificRelationQuery($relatedModuleName);
     $nonAdminQuery = $this->getNonAdminAccessControlQueryForRelation($relatedModuleName);
     //modify query if any module has summary fields, those fields we are displayed in related list of that module
     $relatedListFields = $relatedModule->getConfigureRelatedListFields();
     if ($relatedModuleName == 'Documents') {
         $relatedListFields['filelocationtype'] = 'filelocationtype';
         $relatedListFields['filestatus'] = 'filestatus';
     }
     if (count($relatedListFields) > 0) {
         $currentUser = Users_Record_Model::getCurrentUserModel();
         $queryGenerator = new QueryGenerator($relatedModuleName, $currentUser);
         $queryGenerator->setFields($relatedListFields);
         $selectColumnSql = $queryGenerator->getSelectClauseColumnSQL();
         $newQuery = spliti('FROM', $query);
         $selectColumnSql = 'SELECT DISTINCT vtiger_crmentity.crmid,' . $selectColumnSql;
         $query = $selectColumnSql . ' FROM ' . $newQuery[1];
     }
     if ($nonAdminQuery) {
         $query = appendFromClauseToQuery($query, $nonAdminQuery);
     }
     return $query;
 }
开发者ID:cannking,项目名称:vtigercrm-debug,代码行数:35,代码来源:Module.php

示例2: getRelationQuery

 /**
  * Function to get relation query for particular module with function name
  * @param <record> $recordId
  * @param <String> $functionName
  * @param Vtiger_Module_Model $relatedModule
  * @return <String>
  */
 public function getRelationQuery($recordId, $functionName, $relatedModule, $relationModel = false)
 {
     $relatedModuleName = $relatedModule->getName();
     $focus = CRMEntity::getInstance($this->getName());
     $focus->id = $recordId;
     $result = $focus->{$functionName}($recordId, $this->getId(), $relatedModule->getId());
     $query = $result['query'] . ' ' . $this->getSpecificRelationQuery($relatedModuleName);
     //modify query if any module has summary fields, those fields we are displayed in related list of that module
     $relatedListFields = array();
     if ($relationModel) {
         $relatedListFields = $relationModel->getRelationFields(true, true);
     }
     if (count($relatedListFields) == 0) {
         $relatedListFields = $relatedModule->getConfigureRelatedListFields();
         if ($relatedModuleName == 'Documents') {
             $relatedListFields['filelocationtype'] = 'filelocationtype';
             $relatedListFields['filestatus'] = 'filestatus';
         }
     }
     if (count($relatedListFields) > 0) {
         $currentUser = Users_Record_Model::getCurrentUserModel();
         $queryGenerator = new QueryGenerator($relatedModuleName, $currentUser);
         $queryGenerator->setFields($relatedListFields);
         $selectColumnSql = $queryGenerator->getSelectClauseColumnSQL();
         $newQuery = spliti('FROM', $query);
         $selectColumnSql = 'SELECT DISTINCT vtiger_crmentity.crmid,' . $selectColumnSql;
         $query = $selectColumnSql . ' FROM ' . $newQuery[1];
     }
     $instance = CRMEntity::getInstance($relatedModuleName);
     $securityParameter = $instance->getUserAccessConditionsQuerySR($relatedModuleName, false, $recordId);
     if ($securityParameter != '') {
         $query .= $securityParameter;
     }
     return $query;
 }
开发者ID:noclav,项目名称:UpdatePackages,代码行数:42,代码来源:Module.php


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