本文整理汇总了PHP中Vtiger_Date_UIType::getDisplayDateTimeValue方法的典型用法代码示例。如果您正苦于以下问题:PHP Vtiger_Date_UIType::getDisplayDateTimeValue方法的具体用法?PHP Vtiger_Date_UIType::getDisplayDateTimeValue怎么用?PHP Vtiger_Date_UIType::getDisplayDateTimeValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Vtiger_Date_UIType
的用法示例。
在下文中一共展示了Vtiger_Date_UIType::getDisplayDateTimeValue方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: generateData
function generateData() {
$db = PearDatabase::getInstance();
$chartSQL = $this->getQuery();
$result = $db->pquery($chartSQL, array());
$rows = $db->num_rows($result);
$values = array();
$queryColumnsByFieldModel = $this->getQueryColumnsByFieldModel();
$recordCountLabel = '';
if($this->isRecordCount()) {
$recordCountLabel = 'RECORD_COUNT';
}
$groupByColumnsByFieldModel = $this->getGroupbyColumnsByFieldModel();
$currentUserModel = Users_Record_Model::getCurrentUserModel();
$currencyRateAndSymbol = getCurrencySymbolandCRate($currentUserModel->currency_id);
$links = array();
for($i = 0; $i < $rows; $i++) {
$row = $db->query_result_rowdata($result, $i);
if($recordCountLabel) {
$values[$i][] = (int) $row[strtolower($recordCountLabel)];
}
if($queryColumnsByFieldModel) {
foreach($queryColumnsByFieldModel as $fieldModel) {
if($fieldModel->get('uitype') == '71' || $fieldModel->get('uitype') == '72') {
$value = (float) ($row[strtolower($fieldModel->get('reportlabel'))]);
$values[$i][] = CurrencyField::convertFromDollar($value, $currencyRateAndSymbol['rate']);
} else {
$values[$i][] = (int) $row[strtolower($fieldModel->get('reportlabel'))];
}
}
}
if($groupByColumnsByFieldModel) {
foreach($groupByColumnsByFieldModel as $gFieldModel) {
$fieldDataType = $gFieldModel->getFieldDataType();
if($fieldDataType == 'picklist') {
$label = vtranslate($row[strtolower($gFieldModel->get('reportlabel'))], $gFieldModel->getModuleName());
} else if($fieldDataType == 'multipicklist') {
$multiPicklistValue = $row[strtolower($gFieldModel->get('reportlabel'))];
$multiPicklistValues = explode(' |##| ', $multiPicklistValue);
foreach($multiPicklistValues as $multiPicklistValue) {
$labelList[] = vtranslate($multiPicklistValue, $gFieldModel->getModuleName());
}
$label = implode(',', $labelList);
} else if($fieldDataType == 'date') {
$label = Vtiger_Date_UIType::getDisplayDateValue($row[strtolower($gFieldModel->get('reportlabel'))]);
} else if($fieldDataType == 'datetime') {
$label = Vtiger_Date_UIType::getDisplayDateTimeValue($row[strtolower($gFieldModel->get('reportlabel'))]);
} else {
// SalesPlatform.ru begin
$primaryModule = $this->getPrimaryModule();
if($primaryModule == 'PBXManager') {
$label = getUserFullName($row[strtolower($gFieldModel->get('reportlabel'))]);
} else {
$label = $row[strtolower($gFieldModel->get('reportlabel'))];
}
//$label = $row[strtolower($gFieldModel->get('reportlabel'))];
// SalesPlatform.ru end
}
//SalesPlatform.ru begin
$labels[] = (mb_strlen($label, 'UTF-8') > 30) ? mb_substr($label, 0, 30).'..' : $label;
//$labels[] = (strlen($label) > 30) ? substr($label, 0, 30).'..' : $label;
//SalesPlatform.ru end
$links[] = $this->generateLink($gFieldModel->get('reportcolumninfo'), $row[strtolower($gFieldModel->get('reportlabel'))]);
}
}
}
$data = array( 'labels' => $labels,
'values' => $values,
'links' => $links,
'type' => (count($values[0]) == 1) ? 'singleBar' : 'multiBar',
'data_labels' => $this->getDataLabels(),
'graph_label' => $this->getGraphLabel()
);
return $data;
}