本文整理匯總了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;
}