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


PHP Vtiger_Field_Model::getAllForModule方法代码示例

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


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

示例1: getFields

 public function getFields()
 {
     if (empty($this->fields)) {
         $moduleFields = Vtiger_Field_Model::getAllForModule($this->module);
         $this->fields = array();
         // if block does not contains any fields
         if (!is_array($moduleFields[$this->id])) {
             $moduleFields[$this->id] = array();
         }
         foreach ($moduleFields[$this->id] as $field) {
             $this->fields[$field->get('name')] = $field;
         }
     }
     return $this->fields;
 }
开发者ID:Bergdahls,项目名称:YetiForceCRM,代码行数:15,代码来源:Block.php

示例2: getFields

 public function getFields()
 {
     global $log;
     $log->debug("Entering ./models/Block.php::getFields");
     if (empty($this->fields)) {
         $moduleFields = Vtiger_Field_Model::getAllForModule($this->module);
         $this->fields = array();
         // if block does not contains any fields
         if (!is_array($moduleFields[$this->id])) {
             $moduleFields[$this->id] = array();
         }
         foreach ($moduleFields[$this->id] as $field) {
             $this->fields[$field->get('name')] = $field;
         }
     }
     return $this->fields;
 }
开发者ID:cin-system,项目名称:cinrepo,代码行数:17,代码来源:Block.php

示例3: getRecordDetail

 public function getRecordDetail($record)
 {
     $moduleName = $this->api->getModuleName();
     $user = new Users();
     $currentUser = $user->retrieveCurrentUserInfoFromFile(Users::getActiveAdminId());
     vglobal('current_user', $currentUser);
     $recordModel = Vtiger_Record_Model::getInstanceById($record, $moduleName);
     $rawData = $recordModel->getData();
     $moduleModel = $recordModel->getModule();
     $fields = [];
     $moduleBlockFields = Vtiger_Field_Model::getAllForModule($moduleModel);
     foreach ($moduleBlockFields as $moduleFields) {
         foreach ($moduleFields as $moduleField) {
             $block = $moduleField->get('block');
             $fields[$block->label][$moduleField->get('name')] = $rawData[$moduleField->get('name')];
             if (empty($block)) {
                 continue;
             }
         }
     }
     return ['rawData' => $rawData, 'data' => $fields];
 }
开发者ID:rubichcube,项目名称:YetiForceCRM,代码行数:22,代码来源:GetRecordDetail.php

示例4: getFields

 /**
  * Function that returns all the fields for the module
  * @return <Array of Vtiger_Field_Model> - list of field models
  */
 public function getFields($blockInstance = false)
 {
     if (empty($this->fields)) {
         $moduleBlockFields = Vtiger_Field_Model::getAllForModule($this);
         $this->fields = array();
         foreach ($moduleBlockFields as $moduleFields) {
             foreach ($moduleFields as $moduleField) {
                 $block = $moduleField->get('block');
                 if (empty($block)) {
                     continue;
                 }
                 $this->fields[$moduleField->get('name')] = $moduleField;
             }
         }
     }
     return $this->fields;
 }
开发者ID:cannking,项目名称:vtigercrm-debug,代码行数:21,代码来源:Module.php

示例5: importData

 public function importData()
 {
     $focus = CRMEntity::getInstance($this->module);
     $moduleModel = Vtiger_Module_Model::getInstance($this->module);
     // pre fetch the fields and premmisions of module
     Vtiger_Field_Model::getAllForModule($moduleModel);
     if ($this->user->is_admin == 'off') {
         Vtiger_Field_Model::preFetchModuleFieldPermission($moduleModel->getId());
     }
     if (method_exists($focus, 'createRecords')) {
         $focus->createRecords($this);
     } else {
         $this->createRecords();
     }
     $this->updateModuleSequenceNumber();
 }
开发者ID:cannking,项目名称:vtigercrm-debug,代码行数:16,代码来源:Data.php

示例6: setDefaultValue

 function setDefaultValue($module, $moduleObj)
 {
     $moduleInstance = Vtiger_Module_Model::getInstance($module);
     $fieldInstances = Vtiger_Field_Model::getAllForModule($moduleInstance);
     foreach ($fieldInstances as $blockInstance) {
         foreach ($blockInstance as $fieldInstance) {
             $fieldName = $fieldInstance->getName();
             $defaultValue = $fieldInstance->getDefaultFieldValue();
             if ($defaultValue) {
                 $moduleObj->column_fields[$fieldName] = decode_html($defaultValue);
             }
             if ($fieldInstance->isMandatory() && !$defaultValue) {
                 $moduleObj->column_fields[$fieldName] = Vtiger_Util_Helper::getDefaultMandatoryValue($fieldInstance->getFieldDataType());
             }
         }
     }
 }
开发者ID:cin-system,项目名称:cinrepo,代码行数:17,代码来源:MailScannerAction.php


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