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


PHP Vtiger_Field::setTreeTemplate方法代码示例

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


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

示例1: strval

 /**
  * Import Field of the module
  * @access private
  */
 function import_Field($blocknode, $blockInstance, $moduleInstance, $fieldnode)
 {
     $fieldInstance = new Vtiger_Field();
     $fieldInstance->name = $fieldnode->fieldname;
     $fieldInstance->label = $fieldnode->fieldlabel;
     $fieldInstance->table = $fieldnode->tablename;
     $fieldInstance->column = $fieldnode->columnname;
     $fieldInstance->uitype = $fieldnode->uitype;
     $fieldInstance->generatedtype = $fieldnode->generatedtype;
     $fieldInstance->readonly = $fieldnode->readonly;
     $fieldInstance->presence = $fieldnode->presence;
     $fieldInstance->defaultvalue = $fieldnode->defaultvalue;
     $fieldInstance->maximumlength = $fieldnode->maximumlength;
     $fieldInstance->sequence = $fieldnode->sequence;
     $fieldInstance->quickcreate = $fieldnode->quickcreate;
     $fieldInstance->quicksequence = $fieldnode->quickcreatesequence;
     $fieldInstance->typeofdata = $fieldnode->typeofdata;
     $fieldInstance->displaytype = $fieldnode->displaytype;
     $fieldInstance->info_type = $fieldnode->info_type;
     if (!empty($fieldnode->fieldparams)) {
         $fieldInstance->fieldparams = $fieldnode->fieldparams;
     }
     if (!empty($fieldnode->helpinfo)) {
         $fieldInstance->helpinfo = $fieldnode->helpinfo;
     }
     if (isset($fieldnode->masseditable)) {
         $fieldInstance->masseditable = $fieldnode->masseditable;
     }
     if (isset($fieldnode->columntype) && !empty($fieldnode->columntype)) {
         $fieldInstance->columntype = strval($fieldnode->columntype);
     }
     if (!empty($fieldnode->tree_template)) {
         $templateid = $fieldInstance->setTreeTemplate($fieldnode->tree_template, $moduleInstance);
         $fieldInstance->fieldparams = $templateid;
     }
     $blockInstance->addField($fieldInstance);
     // Set the field as entity identifier if marked.
     if (!empty($fieldnode->entityidentifier)) {
         $moduleInstance->entityidfield = $fieldnode->entityidentifier->entityidfield;
         $moduleInstance->entityidcolumn = $fieldnode->entityidentifier->entityidcolumn;
         $moduleInstance->setEntityIdentifier($fieldInstance);
     }
     // Check picklist values associated with field if any.
     if (!empty($fieldnode->picklistvalues) && !empty($fieldnode->picklistvalues->picklistvalue)) {
         $picklistvalues = array();
         foreach ($fieldnode->picklistvalues->picklistvalue as $picklistvaluenode) {
             $picklistvalues[] = $picklistvaluenode;
         }
         $fieldInstance->setPicklistValues($picklistvalues);
     }
     // Check related modules associated with this field
     if (!empty($fieldnode->relatedmodules) && !empty($fieldnode->relatedmodules->relatedmodule)) {
         $relatedmodules = array();
         foreach ($fieldnode->relatedmodules->relatedmodule as $relatedmodulenode) {
             $relatedmodules[] = $relatedmodulenode;
         }
         $fieldInstance->setRelatedModules($relatedmodules);
     }
     // Set summary field if marked in xml
     if (!empty($fieldnode->summaryfield)) {
         $fieldInstance->setSummaryField($fieldnode->summaryfield);
     }
     $this->__AddModuleFieldToCache($moduleInstance, $fieldnode->fieldname, $fieldInstance);
     return $fieldInstance;
 }
开发者ID:rcrrich,项目名称:UpdatePackages,代码行数:69,代码来源:PackageImport.php


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