当前位置: 首页>>代码示例>>PHP>>正文


PHP CustomView_Record_Model::getAllFilterByModule方法代码示例

本文整理汇总了PHP中CustomView_Record_Model::getAllFilterByModule方法的典型用法代码示例。如果您正苦于以下问题:PHP CustomView_Record_Model::getAllFilterByModule方法的具体用法?PHP CustomView_Record_Model::getAllFilterByModule怎么用?PHP CustomView_Record_Model::getAllFilterByModule使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CustomView_Record_Model的用法示例。


在下文中一共展示了CustomView_Record_Model::getAllFilterByModule方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getRecordsListFromRequest

 protected function getRecordsListFromRequest(Vtiger_Request $request)
 {
     $cvId = $request->get('viewname');
     $module = $request->get('module');
     if (!empty($cvId) && $cvId == "undefined") {
         $sourceModule = $request->get('sourceModule');
         $cvId = CustomView_Record_Model::getAllFilterByModule($sourceModule)->getId();
     }
     $selectedIds = $request->get('selected_ids');
     $excludedIds = $request->get('excluded_ids');
     if (!empty($selectedIds) && $selectedIds != 'all') {
         if (!empty($selectedIds) && count($selectedIds) > 0) {
             return $selectedIds;
         }
     }
     $customViewModel = CustomView_Record_Model::getInstanceById($cvId);
     if ($customViewModel) {
         $searchKey = $request->get('search_key');
         $searchValue = $request->get('search_value');
         $operator = $request->get('operator');
         if (!empty($operator)) {
             $customViewModel->set('operator', $operator);
             $customViewModel->set('search_key', $searchKey);
             $customViewModel->set('search_value', $searchValue);
         }
         $customViewModel->set('search_params', $request->get('search_params'));
         return $customViewModel->getRecordIds($excludedIds, $module);
     }
 }
开发者ID:cannking,项目名称:vtigercrm-debug,代码行数:29,代码来源:Mass.php

示例2: getInstance

 /**
  * Static Function to get the Instance of Vtiger ListView model for a given module and custom view
  * @param <String> $moduleName - Module Name
  * @param <Number> $viewId - Custom View Id
  * @return Vtiger_ListView_Model instance
  */
 public static function getInstance($moduleName, $sourceModule)
 {
     $db = PearDatabase::getInstance();
     $currentUser = vglobal('current_user');
     $modelClassName = Vtiger_Loader::getComponentClassName('Model', 'ListView', $moduleName);
     $instance = new $modelClassName();
     $sourceModuleModel = Vtiger_Module_Model::getInstance($sourceModule);
     $queryGenerator = new QueryGenerator($sourceModuleModel->get('name'), $currentUser);
     $cvidObj = CustomView_Record_Model::getAllFilterByModule($sourceModuleModel->get('name'));
     $cvid = $cvidObj->getId('cvid');
     $queryGenerator->initForCustomViewById($cvid);
     $controller = new ListViewController($db, $currentUser, $queryGenerator);
     return $instance->set('module', $sourceModuleModel)->set('query_generator', $queryGenerator)->set('listview_controller', $controller);
 }
开发者ID:Bergdahls,项目名称:YetiForceCRM,代码行数:20,代码来源:ListView.php

示例3: initializeListViewContents

 public function initializeListViewContents(Vtiger_Request $request, Vtiger_Viewer $viewer)
 {
     $currentUser = vglobal('current_user');
     $viewer = $this->getViewer($request);
     $module = $request->getModule();
     $moduleModel = Vtiger_Module_Model::getInstance($module);
     $massActionLink = array('linktype' => 'LISTVIEWBASIC', 'linklabel' => 'LBL_DELETE', 'linkurl' => 'Javascript:Vtiger_FindDuplicates_Js.massDeleteRecords("index.php?module=' . $module . '&action=MassDelete");', 'linkicon' => '');
     $massActionLinks[] = Vtiger_Link_Model::getInstanceFromValues($massActionLink);
     $viewer->assign('LISTVIEW_LINKS', $massActionLinks);
     $viewer->assign('MODULE_MODEL', $moduleModel);
     $pageNumber = $request->get('page');
     if (empty($pageNumber)) {
         $pageNumber = '1';
     }
     $pagingModel = new Vtiger_Paging_Model();
     $pagingModel->set('page', $pageNumber);
     $pageLimit = $pagingModel->getPageLimit();
     $duplicateSearchFields = $request->get('fields');
     $dataModelInstance = Vtiger_FindDuplicate_Model::getInstance($module);
     $dataModelInstance->set('fields', $duplicateSearchFields);
     $ignoreEmpty = $request->get('ignoreEmpty');
     $ignoreEmptyValue = false;
     if ($ignoreEmpty == 'on' || $ignoreEmpty == 'true' || $ignoreEmpty == '1') {
         $ignoreEmptyValue = true;
     }
     $dataModelInstance->set('ignoreEmpty', $ignoreEmptyValue);
     if (!$this->listViewEntries) {
         $this->listViewEntries = $dataModelInstance->getListViewEntries($pagingModel);
     }
     if (!$this->listViewHeaders) {
         $this->listViewHeaders = $dataModelInstance->getListViewHeaders();
     }
     if (!$this->rows) {
         $this->rows = $dataModelInstance->getRecordCount();
         $viewer->assign('TOTAL_COUNT', $this->rows);
     }
     $rowCount = 0;
     foreach ($this->listViewEntries as $group) {
         foreach ($group as $row) {
             $rowCount++;
         }
     }
     //for calculating the page range
     for ($i = 0; $i < $rowCount; $i++) {
         $dummyListEntries[] = $i;
     }
     $pagingModel->calculatePageRange($dummyListEntries);
     $viewer->assign('IGNORE_EMPTY', $ignoreEmpty);
     $viewer->assign('LISTVIEW_ENTIRES_COUNT', $rowCount);
     $viewer->assign('LISTVIEW_HEADERS', $this->listViewHeaders);
     $viewer->assign('LISTVIEW_ENTRIES', $this->listViewEntries);
     $viewer->assign('PAGING_MODEL', $pagingModel);
     $viewer->assign('PAGE_NUMBER', $pageNumber);
     $viewer->assign('MODULE', $module);
     $viewer->assign('DUPLICATE_SEARCH_FIELDS', $duplicateSearchFields);
     $customViewModel = CustomView_Record_Model::getAllFilterByModule($module);
     $viewer->assign('VIEW_NAME', $customViewModel->getId());
 }
开发者ID:nouphet,项目名称:vtigercrm-6.0.0-ja,代码行数:58,代码来源:FindDuplicates.php

示例4: VALUES

Migration_Index_View::ExecuteQuery("INSERT INTO vtiger_field VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)", array($tab_id, $field_id, $columnname, "sp_payments", 1, $uitype, $fieldname, $fieldlabel, 1, 0, 0, 100, $field_seq, $block_id, 1, "V~O", 1, NULL, "BAS", 1, NULL, 0));
Migration_Index_View::ExecuteQuery("INSERT INTO vtiger_profile2field SELECT profileid, {$tab_id}, {$field_id}, 0, 1 FROM vtiger_profile", array());
Migration_Index_View::ExecuteQuery("INSERT INTO vtiger_def_org_field VALUES({$tab_id}, {$field_id}, 0, 1)", array());
// End
// Begin Update summary fields for PBXManager
Migration_Index_View::ExecuteQuery("ALTER TABLE vtiger_systems ADD COLUMN use_mail_account varchar(5) DEFAULT NULL", array());
// End
// Begin Set custom view for standard All filter
$cvInstance = CustomView_Record_Model::getAllFilterByModule('Act');
$res = $adb->pquery('select * from vtiger_cvcolumnlist where cvid = ? and columnindex = ?', array($cvInstance->getId(), 0));
if ($adb->num_rows($res) == 0) {
    $sql = "insert into vtiger_cvcolumnlist (cvid, columnindex, columnname) values (?,?,?)";
    $params = array($cvInstance->getId(), 0, 'vtiger_sp_act:act_no:act_no:Act_Act_No:V');
    $adb->pquery($sql, $params);
}
$cvInstance = CustomView_Record_Model::getAllFilterByModule('Consignment');
$res = $adb->pquery('select * from vtiger_cvcolumnlist where cvid = ? and columnindex = ?', array($cvInstance->getId(), 0));
if ($adb->num_rows($res) == 0) {
    $sql = "insert into vtiger_cvcolumnlist (cvid, columnindex, columnname) values (?,?,?)";
    $params = array($cvInstance->getId(), 0, 'vtiger_sp_consignment:consignment_no:consignment_no:Consignment_Consignment_No:V');
    $adb->pquery($sql, $params);
}
// End
// Begin Update Invoice links
if (defined('VTIGER_UPGRADE')) {
    $updateQuery = 'UPDATE vtiger_links SET linkurl = ? WHERE linklabel = ? AND tabid = ' . getTabid('Invoice');
    Migration_Index_View::ExecuteQuery($updateQuery, array('index.php?module=Act&view=Edit&sourceModule=$MODULE$&sourceRecord=$RECORD$&invoice_id=$RECORD$&relationOperation=true', 'LBL_INVOICE_ADD_ACT'));
}
// End
// Begin Folder for Reports Templates
$sql = "INSERT INTO vtiger_reportfolder (FOLDERNAME,DESCRIPTION,STATE) VALUES(?,?,?)";
开发者ID:gitter-badger,项目名称:openshift-salesplatform,代码行数:31,代码来源:630-201507_to_640-201512.php


注:本文中的CustomView_Record_Model::getAllFilterByModule方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。