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


PHP Vtiger_Field_Model::getDisplayValue方法代码示例

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


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

示例1: getDisplayValue

 public function getDisplayValue($value)
 {
     if ($this->getName() === 'enabled') {
         $moduleName = 'Settings:Webforms';
         if ($value) {
             return vtranslate('LBL_ACTIVE', $moduleName);
         }
         return vtranslate('LBL_INACTIVE', $moduleName);
     }
     return parent::getDisplayValue($value);
 }
开发者ID:Bergdahls,项目名称:YetiForceCRM,代码行数:11,代码来源:Field.php

示例2: getDisplayValue

	/**
	 * Customize the display value for detail view.
	 */
	public function getDisplayValue($value, $record = false, $recordInstance = false)
	{
		if ($recordInstance) {
			if ($this->getName() == 'date_start') {
				$dateTimeValue = $value . ' ' . $recordInstance->get('time_start');
				$value = $this->getUITypeModel()->getDisplayValue($dateTimeValue);
				list($startDate, $startTime, $meridiem) = explode(' ', $value);
				return $startDate . ' ' . $startTime . ' ' . $meridiem;
			} else if ($this->getName() == 'due_date') {
				$dateTimeValue = $value . ' ' . $recordInstance->get('time_end');
				$value = $this->getUITypeModel()->getDisplayValue($dateTimeValue);
				list($startDate, $startTime, $meridiem) = explode(' ', $value);
				return $startDate . ' ' . $startTime . ' ' . $meridiem;
			}
		}
		return parent::getDisplayValue($value, $record, $recordInstance);
	}
开发者ID:rubichcube,项目名称:YetiForceCRM,代码行数:20,代码来源:Field.php

示例3: getDisplayValue

 /**
  * Function to retieve display value for a value
  * @param <String> $value - value which need to be converted to display value
  * @return <String> - converted display value
  */
 public function getDisplayValue($value, $record = false, $recordInstance = false)
 {
     $fieldName = $this->getName();
     if ($fieldName == 'filesize' && $recordInstance) {
         $downloadType = $recordInstance->get('filelocationtype');
         if ($downloadType == 'I') {
             $filesize = $value;
             if ($filesize < 1024) {
                 $value = $filesize . ' B';
             } elseif ($filesize > 1024 && $filesize < 1048576) {
                 $value = round($filesize / 1024, 2) . ' KB';
             } else {
                 if ($filesize > 1048576) {
                     $value = round($filesize / (1024 * 1024), 2) . ' MB';
                 }
             }
         } else {
             $value = ' --';
         }
         return $value;
     }
     return parent::getDisplayValue($value, $record, $recordInstance);
 }
开发者ID:cannking,项目名称:vtigercrm-debug,代码行数:28,代码来源:Field.php

示例4: getDisplayValue

 /**
  * Function to retieve display value for a value
  * @param <String> $value - value which need to be converted to display value
  * @return <String> - converted display value
  */
 public function getDisplayValue($value, $recordId = false)
 {
     if ($this->get('uitype') == 32) {
         return Vtiger_Language_Handler::getLanguageLabel($value);
     }
     $fieldName = $this->getFieldName();
     if (($fieldName == 'currency_decimal_separator' || $fieldName == 'currency_grouping_separator') && $value == '&nbsp;') {
         return vtranslate('LBL_Space', 'Users');
     }
     return parent::getDisplayValue($value, $recordId);
 }
开发者ID:cin-system,项目名称:cinrepo,代码行数:16,代码来源:Field.php

示例5: getDisplayValue

 /**
  * Customize the display value for detail view.
  */
 public function getDisplayValue($value, $record = false, $recordInstance = false)
 {
     if ($recordInstance) {
         if ($this->getName() == 'date_start') {
             $dateTimeValue = $value . ' ' . $recordInstance->get('time_start');
             $value = $this->getUITypeModel()->getDisplayValue($dateTimeValue);
             list($startDate, $startTime) = explode(' ', $value);
             $currentUser = Users_Record_Model::getCurrentUserModel();
             if ($currentUser->get('hour_format') == '12') {
                 $startTime = Vtiger_Time_UIType::getTimeValueInAMorPM($startTime);
             }
             return $startDate . ' ' . $startTime;
         } else {
             if ($this->getName() == 'due_date') {
                 $dateTimeValue = $value . ' ' . $recordInstance->get('time_end');
                 $value = $this->getUITypeModel()->getDisplayValue($dateTimeValue);
                 list($startDate, $startTime) = explode(' ', $value);
                 $currentUser = Users_Record_Model::getCurrentUserModel();
                 if ($currentUser->get('hour_format') == '12') {
                     $startTime = Vtiger_Time_UIType::getTimeValueInAMorPM($startTime);
                 }
                 return $startDate . ' ' . $startTime;
             }
         }
     }
     return parent::getDisplayValue($value, $record, $recordInstance);
 }
开发者ID:nouphet,项目名称:vtigercrm-6.0.0-ja,代码行数:30,代码来源:Field.php

示例6: getDisplayValue

 /**
  * Function to retieve display value for a value
  * @param <String> $value - value which need to be converted to display value
  * @return <String> - converted display value
  */
 public function getDisplayValue($value, $recordId = false)
 {
     if ($this->get('uitype') == 32) {
         return Vtiger_Language_Handler::getLanguageLabel($value);
     }
     return parent::getDisplayValue($value, $recordId);
 }
开发者ID:nouphet,项目名称:vtigercrm-6.0.0-ja,代码行数:12,代码来源:Field.php


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