本文整理汇总了PHP中CustomView::getAdvFilterByCvid方法的典型用法代码示例。如果您正苦于以下问题:PHP CustomView::getAdvFilterByCvid方法的具体用法?PHP CustomView::getAdvFilterByCvid怎么用?PHP CustomView::getAdvFilterByCvid使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CustomView
的用法示例。
在下文中一共展示了CustomView::getAdvFilterByCvid方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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();
}
}
示例2: getStdFilterHTML
$stdfilterlist["stdfilter"] = $stdfilterlist["stdfilter"] != "" ? $stdfilterlist["stdfilter"] : "custom";
$stdfilterhtml = $oCustomView->getStdFilterCriteria($stdfilterlist["stdfilter"]);
$stdfiltercolhtml = getStdFilterHTML($cv_module, $stdfilterlist["columnname"]);
$stdfilterjs = $oCustomView->getCriteriaJS();
if (isset($stdfilterlist["startdate"]) && isset($stdfilterlist["enddate"])) {
$smarty->assign("STARTDATE", DateTimeField::convertToUserFormat($stdfilterlist["startdate"]));
$smarty->assign("ENDDATE", DateTimeField::convertToUserFormat($stdfilterlist["enddate"]));
} else {
$smarty->assign("STARTDATE", $stdfilterlist["startdate"]);
$smarty->assign("ENDDATE", $stdfilterlist["enddate"]);
}
$smarty->assign("STDFILTERCOLUMNS", $stdfiltercolhtml);
$smarty->assign("STDCOLUMNSCOUNT", count($stdfiltercolhtml));
$smarty->assign("STDFILTERCRITERIA", $stdfilterhtml);
$smarty->assign("STDFILTER_JAVASCRIPT", $stdfilterjs);
$advfilterlist = $oCustomView->getAdvFilterByCvid($recordid);
$advfilterhtml = getAdvCriteriaHTML();
$modulecolumnshtml = getByModule_ColumnsHTML($cv_module, $modulecollist);
$smarty->assign("FOPTION", $advfilterhtml);
$smarty->assign("COLUMNS_BLOCK", $modulecolumnshtml);
$smarty->assign("CRITERIA_GROUPS", $advfilterlist);
$smarty->assign("MANDATORYCHECK", implode(",", array_unique($oCustomView->mandatoryvalues)));
$smarty->assign("SHOWVALUES", implode(",", $oCustomView->showvalues));
$smarty->assign("EXIST", "true");
$cactionhtml = "<input name='customaction' class='button' type='button' value='Create Custom Action' onclick=goto_CustomAction('" . $cv_module . "');>";
if ($cv_module == "Leads" || $cv_module == "Accounts" || $cv_module == "Contacts") {
$smarty->assign("CUSTOMACTIONBUTTON", $cactionhtml);
}
$data_type[] = $oCustomView->data_type;
$smarty->assign("DATATYPE", $data_type);
} else {
示例3: 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();
}
}