當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CustomView::getStdFilterByCvid方法代碼示例

本文整理匯總了PHP中CustomView::getStdFilterByCvid方法的典型用法代碼示例。如果您正苦於以下問題:PHP CustomView::getStdFilterByCvid方法的具體用法?PHP CustomView::getStdFilterByCvid怎麽用?PHP CustomView::getStdFilterByCvid使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在CustomView的用法示例。


在下文中一共展示了CustomView::getStdFilterByCvid方法的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();
     }
 }
開發者ID:artisan4710,項目名稱:YetiForceCRM,代碼行數:55,代碼來源:QueryGenerator.php

示例2: getStdFilterHTML

 $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);
 $log->info('CustomView :: Successfully got Standard Filter for the Viewid' . $recordid);
 $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);
開發者ID:hbsman,項目名稱:vtigercrm-5.3.0-ja,代碼行數:31,代碼來源:EditView.php

示例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();
     }
 }
開發者ID:kikojover,項目名稱:corebos,代碼行數:96,代碼來源:QueryGenerator.php


注:本文中的CustomView::getStdFilterByCvid方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。