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