當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。