本文整理汇总了PHP中CustomView::getColumnsListByCvid方法的典型用法代码示例。如果您正苦于以下问题:PHP CustomView::getColumnsListByCvid方法的具体用法?PHP CustomView::getColumnsListByCvid怎么用?PHP CustomView::getColumnsListByCvid使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CustomView
的用法示例。
在下文中一共展示了CustomView::getColumnsListByCvid方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: vtws_getfilterfields
function vtws_getfilterfields($module, $user)
{
global $log, $adb, $default_language;
$log->debug("Entering function vtws_getfilterfields");
include_once "modules/{$module}/{$module}.php";
$focus = new $module();
$linkfields = array($focus->list_link_field);
if ($module == 'Contacts' or $module == 'Leads') {
$linkfields = array('firstname', 'lastname');
}
$customView = new CustomView($module);
$viewid = $customView->getViewId($module);
$viewinfo = $customView->getColumnsListByCvid($viewid);
$fields = array();
foreach ($viewinfo as $fld) {
$finfo = explode(':', $fld);
$fields[] = $finfo[1] == 'smownerid' ? 'assigned_user_id' : $finfo[2];
}
return array('fields' => $fields, 'linkfields' => $linkfields);
}
示例2: getAdvCriteriaHTML
$advfilterhtml = getAdvCriteriaHTML();
$modulecolumnshtml = getByModule_ColumnsHTML($cv_module, $modulecollist);
$smarty->assign("FOPTION", $advfilterhtml);
$smarty->assign("COLUMNS_BLOCK", $modulecolumnshtml);
$smarty->assign("MANDATORYCHECK", implode(",", array_unique($oCustomView->mandatoryvalues)));
$smarty->assign("SHOWVALUES", implode(",", $oCustomView->showvalues));
$data_type[] = $oCustomView->data_type;
$smarty->assign("DATATYPE", $data_type);
} else {
$oCustomView = new CustomView($cv_module);
$now_action = vtlib_purify($_REQUEST['action']);
if ($oCustomView->isPermittedCustomView($recordid, $now_action, $oCustomView->customviewmodule) == 'yes') {
$customviewdtls = $oCustomView->getCustomViewByCvid($recordid);
$log->info('CustomView :: Successfully got ViewDetails for the Viewid' . $recordid);
$modulecollist = $oCustomView->getModuleColumnsList($cv_module);
$selectedcolumnslist = $oCustomView->getColumnsListByCvid($recordid);
$log->info('CustomView :: Successfully got ColumnsList for the Viewid' . $recordid);
$smarty->assign("VIEWNAME", $customviewdtls["viewname"]);
if ($customviewdtls["setdefault"] == 1) {
$smarty->assign("CHECKED", "checked");
}
if ($customviewdtls["setmetrics"] == 1) {
$smarty->assign("MCHECKED", "checked");
}
$status = $customviewdtls["status"];
$smarty->assign("STATUS", $status);
for ($i = 1; $i < 10; $i++) {
$choosecolslist = getByModule_ColumnsList($cv_module, $modulecollist, $selectedcolumnslist[$i - 1]);
$smarty->assign("CHOOSECOLUMN" . $i, $choosecolslist);
}
$stdfilterlist = $oCustomView->getStdFilterByCvid($recordid);
示例3: initForCustomViewById
public function initForCustomViewById($viewId)
{
$customView = new CustomView($this->module);
$this->customViewColumnList = $customView->getColumnsListByCvid($viewId);
if ($this->customViewColumnList) {
foreach ($this->customViewColumnList as $customViewColumnInfo) {
$details = explode(':', $customViewColumnInfo);
if (empty($details[2]) && $details[1] == 'crmid' && $details[0] == 'vtiger_crmentity') {
$name = 'id';
$this->customViewFields[] = $name;
} else {
$this->fields[] = $details[2];
$this->customViewFields[] = $details[2];
}
}
}
if ($this->module == 'Calendar' && !in_array('activitytype', $this->fields)) {
$this->fields[] = 'activitytype';
}
if ($this->module == 'Documents') {
if (in_array('filename', $this->fields)) {
if (!in_array('filelocationtype', $this->fields)) {
$this->fields[] = 'filelocationtype';
}
if (!in_array('filestatus', $this->fields)) {
$this->fields[] = 'filestatus';
}
}
}
$this->fields[] = 'id';
$this->stdFilterList = $customView->getStdFilterByCvid($viewId);
$this->advFilterList = $customView->getAdvFilterByCvid($viewId);
if (is_array($this->stdFilterList)) {
$value = array();
if (!empty($this->stdFilterList['columnname'])) {
$this->startGroup('');
$name = explode(':', $this->stdFilterList['columnname']);
$name = $name[2];
$value[] = $this->fixDateTimeValue($name, $this->stdFilterList['startdate']);
$value[] = $this->fixDateTimeValue($name, $this->stdFilterList['enddate'], false);
$this->addCondition($name, $value, 'BETWEEN');
}
}
if ($this->conditionInstanceCount <= 0 && is_array($this->advFilterList) && count($this->advFilterList) > 0) {
$this->startGroup('');
} elseif ($this->conditionInstanceCount > 0 && is_array($this->advFilterList) && count($this->advFilterList) > 0) {
$this->addConditionGlue(self::$AND);
}
if (is_array($this->advFilterList) && count($this->advFilterList) > 0) {
$this->parseAdvFilterList($this->advFilterList);
}
if ($this->conditionInstanceCount > 0) {
$this->endGroup();
}
}
示例4: initForCustomViewById
public function initForCustomViewById($viewId)
{
$customView = new CustomView($this->module);
$this->customViewColumnList = $customView->getColumnsListByCvid($viewId);
$viewfields = array();
foreach ($this->customViewColumnList as $customViewColumnInfo) {
$details = explode(':', $customViewColumnInfo);
if (empty($details[2]) && $details[1] == 'crmid' && $details[0] == 'vtiger_crmentity') {
$name = 'id';
$this->customViewFields[] = $name;
} else {
$minfo = explode('_', $details[3]);
if ($minfo[0] == $this->module or $minfo[0] == 'Notes' and $this->module == 'Documents') {
$viewfields[] = $details[2];
} else {
$viewfields[] = $minfo[0] . '.' . $details[2];
}
$this->customViewFields[] = $details[2];
}
}
if ($this->module == 'Calendar' && !in_array('activitytype', $viewfields)) {
$viewfields[] = 'activitytype';
}
if ($this->module == 'Documents') {
if (in_array('filename', $viewfields)) {
if (!in_array('filelocationtype', $viewfields)) {
$viewfields[] = 'filelocationtype';
}
if (!in_array('filestatus', $viewfields)) {
$viewfields[] = 'filestatus';
}
}
}
$viewfields[] = 'id';
$this->setFields($viewfields);
$this->stdFilterList = $customView->getStdFilterByCvid($viewId);
$this->advFilterList = $customView->getAdvFilterByCvid($viewId);
if (is_array($this->stdFilterList)) {
$value = array();
if (!empty($this->stdFilterList['columnname'])) {
$this->startGroup('');
$name = explode(':', $this->stdFilterList['columnname']);
$name = $name[2];
$value[] = $this->fixDateTimeValue($name, $this->stdFilterList['startdate']);
$value[] = $this->fixDateTimeValue($name, $this->stdFilterList['enddate'], false);
$this->addCondition($name, $value, 'BETWEEN');
}
}
if ($this->conditionInstanceCount <= 0 && is_array($this->advFilterList) && count($this->advFilterList) > 0) {
$this->startGroup('');
} elseif ($this->conditionInstanceCount > 0 && is_array($this->advFilterList) && count($this->advFilterList) > 0) {
$this->addConditionGlue(self::$AND);
}
if (is_array($this->advFilterList) && count($this->advFilterList) > 0) {
foreach ($this->advFilterList as $groupindex => $groupcolumns) {
$filtercolumns = $groupcolumns['columns'];
if (count($filtercolumns) > 0) {
$this->startGroup('');
foreach ($filtercolumns as $index => $filter) {
$name = explode(':', $filter['columnname']);
$mlbl = explode('_', $name[3]);
$mname = $mlbl[0];
if (empty($name[2]) && $name[1] == 'crmid' && $name[0] == 'vtiger_crmentity') {
$name = $this->getSQLColumn('id');
} else {
$name = $name[2];
}
if ($mname == $this->getModule()) {
$this->addCondition($name, $filter['value'], $filter['comparator']);
} else {
$reffld = '';
foreach ($this->referenceFieldInfoList as $rfld => $refmods) {
if (in_array($mname, $refmods)) {
$reffld = $rfld;
break;
}
}
$this->addReferenceModuleFieldCondition($mname, $rfld, $name, $filter['value'], $filter['comparator']);
}
$columncondition = $filter['column_condition'];
if (!empty($columncondition)) {
$this->addConditionGlue($columncondition);
}
}
$this->endGroup();
$groupConditionGlue = $groupcolumns['condition'];
if (!empty($groupConditionGlue)) {
$this->addConditionGlue($groupConditionGlue);
}
}
}
}
if ($this->conditionInstanceCount > 0) {
$this->endGroup();
}
}