本文整理汇总了PHP中Vtiger_Field_Model::getFieldDataType方法的典型用法代码示例。如果您正苦于以下问题:PHP Vtiger_Field_Model::getFieldDataType方法的具体用法?PHP Vtiger_Field_Model::getFieldDataType怎么用?PHP Vtiger_Field_Model::getFieldDataType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Vtiger_Field_Model
的用法示例。
在下文中一共展示了Vtiger_Field_Model::getFieldDataType方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getFieldDataType
/**
* Function to get the Webservice Field data type
* @return <String> Data type of the field
*/
public function getFieldDataType()
{
if ($this->get('uitype') == 99) {
return 'password';
} else {
if (in_array($this->get('uitype'), array(32, 115))) {
return 'picklist';
} else {
if ($this->get('uitype') == 101) {
return 'userReference';
} else {
if ($this->get('uitype') == 98) {
return 'userRole';
} elseif ($this->get('uitype') == 105) {
return 'image';
} else {
if ($this->get('uitype') == 31) {
return 'theme';
}
}
}
}
}
return parent::getFieldDataType();
}
示例2: getInstanceFromField
/**
* Static function to get the UIType object from Vtiger Field Model
* @param Vtiger_Field_Model $fieldModel
* @return Vtiger_Base_UIType or UIType specific object instance
*/
public static function getInstanceFromField($fieldModel)
{
$fieldDataType = $fieldModel->getFieldDataType();
$uiTypeClassSuffix = ucfirst($fieldDataType);
$moduleName = $fieldModel->getModuleName();
$moduleSpecificUiTypeClassName = $moduleName . '_' . $uiTypeClassSuffix . '_UIType';
$uiTypeClassName = 'Vtiger_' . $uiTypeClassSuffix . '_UIType';
$fallBackClassName = 'Vtiger_Base_UIType';
$moduleSpecificFileName = 'modules.' . $moduleName . '.uitypes.' . $uiTypeClassSuffix;
$uiTypeClassFileName = 'modules.Vtiger.uitypes.' . $uiTypeClassSuffix;
$moduleSpecificFilePath = Vtiger_Loader::resolveNameToPath($moduleSpecificFileName);
$completeFilePath = Vtiger_Loader::resolveNameToPath($uiTypeClassFileName);
if (file_exists($moduleSpecificFilePath)) {
$instance = new $moduleSpecificUiTypeClassName();
} else if (file_exists($completeFilePath)) {
$instance = new $uiTypeClassName();
} else {
$instance = new $fallBackClassName();
}
$instance->set('field', $fieldModel);
return $instance;
}
示例3: getFieldDataType
/**
* Function to get field data type
* @return <String> data type
*/
public function getFieldDataType()
{
if (!$this->fieldDataType && $this->getFieldType() == 'INVENTORY') {
$this->fieldDataType = 'inventory';
} elseif (!$this->fieldDataType) {
$this->fieldDataType = parent::getFieldDataType();
}
if ($this->fieldDataType == 'salutation') {
$this->fieldDataType = 'string';
}
return $this->fieldDataType;
}
示例4: getFieldDataType
/**
* Function to get the Webservice Field data type
* @return <String> Data type of the field
*/
public function getFieldDataType()
{
if ($this->getName() == 'date_start' || $this->getName() == 'due_date') {
return 'datetime';
} else {
if ($this->get('uitype') == '30') {
return 'reminder';
} else {
if ($this->getName() == 'recurringtype') {
return 'recurrence';
}
}
}
return parent::getFieldDataType();
}