[ Index ] |
PHP Cross Reference of vtigercrm-6.1.0 |
[Summary view] [Print] [Text view]
1 <?php 2 /*+*********************************************************************************** 3 * The contents of this file are subject to the vtiger CRM Public License Version 1.0 4 * ("License"); You may not use this file except in compliance with the License 5 * The Original Code is: vtiger CRM Open Source 6 * The Initial Developer of the Original Code is vtiger. 7 * Portions created by vtiger are Copyright (C) vtiger. 8 * All Rights Reserved. 9 *************************************************************************************/ 10 11 /** 12 * Events Field Model Class 13 */ 14 class Events_Field_Model extends Calendar_Field_Model { 15 16 17 function get($propertyName) { 18 if(property_exists($this,$propertyName)) { 19 $fieldName = $this->getName(); 20 if($propertyName == 'label' && $fieldName == 'due_date') { 21 return 'End Date & Time'; 22 } 23 return $this->$propertyName; 24 } 25 return null; 26 } 27 28 /** 29 * Customize the display value for detail view. 30 */ 31 public function getDisplayValue($value, $record = false, $recordInstance = false) { 32 if ($recordInstance) { 33 if ($this->getName() == 'due_date') { 34 $displayValue = $value. ' ' . $recordInstance->get('time_end'); 35 $value = $this->getUITypeModel()->getDisplayValue($displayValue); 36 list($endDate, $endTime) = explode(' ', $value); 37 38 $currentUser = Users_Record_Model::getCurrentUserModel(); 39 if($currentUser->get('hour_format') == '12') 40 $endTime = Vtiger_Time_UIType::getTimeValueInAMorPM($endTime); 41 42 return $endDate . ' ' . $endTime; 43 } 44 } 45 return parent::getDisplayValue($value, $record, $recordInstance); 46 } 47 48 49 /** 50 * Function to check whether field is ajax editable' 51 * @return <Boolean> 52 */ 53 public function isAjaxEditable() { 54 if(!$this->isEditable() || $this->get('uitype') == 30) { 55 return false; 56 } 57 return true; 58 } 59 60 public function getFieldDataType() { 61 if($this->getName() == 'contact_id' ) { 62 return 'multireference'; 63 } 64 return parent::getFieldDataType(); 65 66 } 67 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Fri Nov 28 20:08:37 2014 | Cross-referenced by PHPXref 0.7.1 |