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


PHP Vtiger_Functions::getModuleFieldInfoWithId方法代码示例

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


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

示例1: reloadValue

 /**
  * Update the value for relation
  * @param string $sourceModule Source module name
  * @param int $sourceRecord Source record
  */
 public function reloadValue($sourceModule, $sourceRecord)
 {
     $currentUser = vglobal('current_user');
     $user = new Users();
     vglobal('current_user', $user->retrieveCurrentUserInfoFromFile(Users::getActiveAdminId()));
     vglobal('currentModule', $sourceModule);
     $db = PearDatabase::getInstance();
     $params = $this->get('field')->getFieldParams();
     $sourceRecordModel = Vtiger_Record_Model::getInstanceById($sourceRecord, $sourceModule);
     $targetModel = Vtiger_RelationListView_Model::getInstance($sourceRecordModel, $params['module']);
     $fieldInfo = Vtiger_Functions::getModuleFieldInfoWithId($params['field']);
     $query = $targetModel->getRelationQuery();
     $explodedQuery = explode('FROM', $query, 2);
     $relationQuery = 'SELECT DISTINCT ' . $fieldInfo['columnname'] . ' FROM' . $explodedQuery[1] . ' AND ' . $fieldInfo['columnname'] . " <> ''";
     vglobal('current_user', $currentUser);
     $result = $db->query($relationQuery);
     $currentValue = self::COMMA;
     while ($value = $db->getSingleValue($result)) {
         $currentValue .= $value . self::COMMA;
     }
     $db->update($this->get('field')->get('table'), [$this->get('field')->get('column') => $currentValue], $sourceRecordModel->getEntity()->tab_name_index[$this->get('field')->get('table')] . ' = ?', [$sourceRecord]);
 }
开发者ID:awflu,项目名称:YetiForceCRM,代码行数:27,代码来源:MultiReferenceValue.php

示例2: getInstanceFromFieldId

 public static function getInstanceFromFieldId($fieldId, $moduleTabId = false)
 {
     $fieldModel = Vtiger_Cache::get('FieldModel', $fieldId);
     if ($fieldModel) {
         return $fieldModel;
     }
     $field = Vtiger_Functions::getModuleFieldInfoWithId($fieldId);
     $fieldModel = new self();
     $fieldModel->initialize($field);
     Vtiger_Cache::set('FieldModel', $fieldId, $fieldModel);
     return $fieldModel;
 }
开发者ID:reeid,项目名称:YetiForceCRM,代码行数:12,代码来源:Field.php


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