本文整理汇总了PHP中QueryGenerator::getReferenceFieldNameList方法的典型用法代码示例。如果您正苦于以下问题:PHP QueryGenerator::getReferenceFieldNameList方法的具体用法?PHP QueryGenerator::getReferenceFieldNameList怎么用?PHP QueryGenerator::getReferenceFieldNameList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QueryGenerator
的用法示例。
在下文中一共展示了QueryGenerator::getReferenceFieldNameList方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getListViewHeader
public function getListViewHeader($focus, $module, $sort_qry = '', $sorder = '', $orderBy = '', $skipActions = false)
{
global $log, $singlepane_view, $theme, $current_user;
$arrow = '';
$qry = getURLstring($focus);
$theme_path = "themes/" . $theme . "/";
$image_path = $theme_path . "images/";
$header = array();
//Get the vtiger_tabid of the module
$tabid = getTabid($module);
$tabname = getParentTab();
require 'user_privileges/user_privileges_' . $current_user->id . '.php';
$fields = $this->queryGenerator->getFields();
$whereFields = $this->queryGenerator->getWhereFields();
$meta = $this->queryGenerator->getMeta($this->queryGenerator->getModule());
$moduleFields = $meta->getModuleFields();
$accessibleFieldList = array_keys($moduleFields);
if ($this->queryGenerator->getReferenceFieldInfoList()) {
$accessibleFieldList = array_merge($this->queryGenerator->getReferenceFieldNameList(), $accessibleFieldList);
}
$listViewFields = array_intersect($fields, $accessibleFieldList);
//Added on 14-12-2005 to avoid if and else check for every list
//vtiger_field for arrow image and change order
$change_sorder = array('ASC' => 'DESC', 'DESC' => 'ASC');
$arrow_gif = array('ASC' => 'arrow_down.gif', 'DESC' => 'arrow_up.gif');
foreach ($listViewFields as $fieldName) {
if (!empty($moduleFields[$fieldName])) {
$field = $moduleFields[$fieldName];
} else {
$field = $this->queryGenerator->getReferenceField($fieldName, false);
if (is_null($field)) {
continue;
}
}
if (in_array($field->getColumnName(), $focus->sortby_fields)) {
if ($orderBy == $field->getColumnName()) {
$temp_sorder = $change_sorder[$sorder];
$arrow = " <img src ='" . vtiger_imageurl($arrow_gif[$sorder], $theme) . "' border='0'>";
} else {
$temp_sorder = 'ASC';
}
$label = getTranslatedString($field->getFieldLabelKey(), $module);
//added to display vtiger_currency symbol in listview header
if ($label == 'Amount') {
$label .= ' (' . getTranslatedString('LBL_IN', $module) . ' ' . $user_info['currency_symbol'] . ')';
}
if ($field->getUIType() == '9') {
$label .= ' (%)';
}
if ($module == 'Users' && $fieldName == 'User Name') {
$name = "<a href='javascript:;' onClick='getListViewEntries_js(\"" . $module . "\",\"parenttab=" . $tabname . "&order_by=" . $field->getColumnName() . "&sorder=" . $temp_sorder . $sort_qry . "\");' class='listFormHeaderLinks'>" . getTranslatedString('LBL_LIST_USER_NAME_ROLE', $module) . "" . $arrow . "</a>";
} else {
if ($this->isHeaderSortingEnabled()) {
$name = "<a href='javascript:;' onClick='getListViewEntries_js(\"" . $module . "\",\"parenttab=" . $tabname . "&foldername=Default&order_by=" . $field->getColumnName() . "&start=" . (isset($_SESSION['lvs'][$module]['start']) ? $_SESSION['lvs'][$module]['start'] : '') . "&sorder=" . $temp_sorder . "" . $sort_qry . "\");' class='listFormHeaderLinks'>" . $label . "" . $arrow . "</a>";
} else {
$name = $label;
}
}
$arrow = '';
} else {
$name = getTranslatedString($field->getFieldLabelKey(), $module);
}
//added to display vtiger_currency symbol in related listview header
if ($name == 'Amount') {
$name .= ' (' . getTranslatedString('LBL_IN') . ' ' . $user_info['currency_symbol'] . ')';
}
$header[] = $name;
}
//Added for Action - edit and delete link header in listview
if (!$skipActions && (isPermitted($module, "EditView", "") == 'yes' || isPermitted($module, "Delete", "") == 'yes')) {
$header[] = getTranslatedString("LBL_ACTION", $module);
}
$header = cbEventHandler::do_filter('corebos.filter.listview.header', $header);
return $header;
}