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


PHP Vtiger_ListView_Model类代码示例

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


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

示例1: process

 function process(Vtiger_Request $request)
 {
     $branches = $request->get('branches');
     $filter = $request->get('filter');
     if (empty($branches)) {
         return;
     }
     $moduleName = $request->getModule();
     $viewer = $this->getViewer($request);
     $baseModuleName = 'Accounts';
     $multiReferenceFirld = Vtiger_MultiReferenceValue_UIType::getFieldsByModules($baseModuleName, $moduleName);
     if (count($multiReferenceFirld) === 0) {
         return;
     }
     $multiReferenceFirld = reset($multiReferenceFirld);
     $searchParams = [['columns' => [['columnname' => $multiReferenceFirld['tablename'] . ':' . $multiReferenceFirld['columnname'] . ':' . $multiReferenceFirld['fieldname'], 'value' => implode(',', $branches), 'column_condition' => '', 'comparator' => 'c']]]];
     $pagingModel = new Vtiger_Paging_Model();
     $pagingModel->set('limit', 'no_limit');
     $listViewModel = Vtiger_ListView_Model::getInstance($baseModuleName, $filter);
     $listViewModel->set('search_key', $multiReferenceFirld['fieldname']);
     $listViewModel->set('search_params', $searchParams);
     $listEntries = $listViewModel->getListViewEntries($pagingModel, true);
     if (count($listEntries) === 0) {
         return;
     }
     $listHeaders = $listViewModel->getListViewHeaders();
     $viewer->assign('ENTRIES', $listEntries);
     $viewer->assign('HEADERS', $listHeaders);
     $viewer->assign('MODULE', $baseModuleName);
     $viewer->view('TreeRecords.tpl', $moduleName);
 }
开发者ID:awflu,项目名称:YetiForceCRM,代码行数:31,代码来源:TreeRecords.php

示例2: process

 function process(Vtiger_Request $request)
 {
     $branches = $request->get('branches');
     $filter = $request->get('filter');
     if (empty($branches)) {
         return;
     }
     $viewer = $this->getViewer($request);
     $moduleName = $request->getModule();
     $moduleModel = Vtiger_Module_Model::getInstance($moduleName);
     $treeViewModel = Vtiger_TreeView_Model::getInstance($moduleModel);
     $pagingModel = new Vtiger_Paging_Model();
     $pagingModel->set('limit', 'no_limit');
     $listViewModel = Vtiger_ListView_Model::getInstance($moduleName, $filter);
     $listViewModel->set('search_params', $treeViewModel->getSearchParams($branches));
     $listEntries = $listViewModel->getListViewEntries($pagingModel, true);
     if (count($listEntries) === 0) {
         return;
     }
     $listHeaders = $listViewModel->getListViewHeaders();
     $viewer->assign('ENTRIES', $listEntries);
     $viewer->assign('HEADERS', $listHeaders);
     $viewer->assign('MODULE', $moduleName);
     $viewer->view('TreeRecords.tpl', $moduleName);
 }
开发者ID:nikdejan,项目名称:YetiForceCRM,代码行数:25,代码来源:TreeRecords.php

示例3: getPagination

 public function getPagination(Vtiger_Request $request)
 {
     $viewer = $this->getViewer($request);
     $pageNumber = $request->get('page');
     $searchResult = $request->get('searchResult');
     $moduleName = $request->getModule();
     $listViewModel = Vtiger_ListView_Model::getInstance($moduleName, $cvId);
     if (empty($pageNumber)) {
         $pageNumber = '1';
     }
     $pagingModel = new Vtiger_Paging_Model();
     $pagingModel->set('page', $pageNumber);
     $pagingModel->set('viewid', $request->get('viewname'));
     $searchKey = $request->get('search_key');
     $searchValue = $request->get('search_value');
     $operator = $request->get('operator');
     if (!empty($operator)) {
         $listViewModel->set('operator', $operator);
         $viewer->assign('OPERATOR', $operator);
         $viewer->assign('ALPHABET_VALUE', $searchValue);
     }
     if (!empty($searchKey) && !empty($searchValue)) {
         $listViewModel->set('search_key', $searchKey);
         $listViewModel->set('search_value', $searchValue);
     }
     $searchParmams = $request->get('search_params');
     if (empty($searchParmams) || !is_array($searchParmams)) {
         $searchParmams = [];
     }
     $transformedSearchParams = $this->transferListSearchParamsToFilterCondition($searchParmams, $listViewModel->getModule());
     $listViewModel->set('search_params', $transformedSearchParams);
     if (!$this->listViewEntries) {
         $this->listViewEntries = $listViewModel->getListViewEntries($pagingModel, $searchResult);
     }
     if (!$this->listViewCount) {
         $this->listViewCount = $listViewModel->getListViewCount();
     }
     $noOfEntries = count($this->listViewEntries);
     $totalCount = $this->listViewCount;
     $pageLimit = $pagingModel->getPageLimit();
     $pageCount = ceil((int) $totalCount / (int) $pageLimit);
     if ($pageCount == 0) {
         $pageCount = 1;
     }
     $viewer->assign('PAGE_COUNT', $pageCount);
     $startPaginFrom = $pageNumber - 2;
     if ($pageNumber == $totalCount && 1 != $pageNumber) {
         $startPaginFrom = $pageNumber - 4;
     }
     if ($startPaginFrom <= 0 || 1 == $pageNumber) {
         $startPaginFrom = 1;
     }
     $viewer->assign('LISTVIEW_ENTRIES_COUNT', $noOfEntries);
     $viewer->assign('PAGE_NUMBER', $pageNumber);
     $viewer->assign('LISTVIEW_COUNT', $totalCount);
     $viewer->assign('START_PAGIN_FROM', $startPaginFrom);
     $viewer->assign('PAGING_MODEL', $pagingModel);
     echo $viewer->view('Pagination.tpl', $moduleName, true);
 }
开发者ID:noclav,项目名称:UpdatePackages,代码行数:59,代码来源:Pagination.php

示例4: getRecords

 private function getRecords()
 {
     $pagingModel = new Vtiger_Paging_Model();
     $pagingModel->set('limit', 'no_limit');
     $listViewModel = Vtiger_ListView_Model::getInstance($this->getModuleName());
     $listEntries = $listViewModel->getListViewEntries($pagingModel, true);
     $tree = [];
     foreach ($listEntries as $item) {
         $this->lastTreeId++;
         $parent = $item->get('pscategory');
         $parent = (int) str_replace('T', '', $parent);
         $tree[] = ['id' => $this->lastTreeId, 'record_id' => $item->getId(), 'parent' => $parent == 0 ? '#' : $parent, 'text' => $item->getName(), 'isrecord' => true, 'state' => [], 'icon' => 'glyphicon glyphicon-file'];
     }
     return $tree;
 }
开发者ID:awflu,项目名称:YetiForceCRM,代码行数:15,代码来源:TreeView.php

示例5: process

 function process(Vtiger_Request $request)
 {
     $branches = $request->get('branches');
     $filter = $request->get('filter');
     $category = $request->get('category');
     if (empty($branches) && empty($category)) {
         return;
     }
     $moduleName = $request->getModule();
     $viewer = $this->getViewer($request);
     $baseModuleName = 'Accounts';
     $multiReferenceFirld = Vtiger_MultiReferenceValue_UIType::getFieldsByModules($baseModuleName, $moduleName);
     $multiReferenceFirld = reset($multiReferenceFirld);
     if (count($multiReferenceFirld) === 0) {
         return;
     }
     $pagingModel = new Vtiger_Paging_Model();
     $pagingModel->set('limit', 'no_limit');
     $listViewModel = Vtiger_ListView_Model::getInstance($baseModuleName, $filter);
     $queryGenerator = $listViewModel->get('query_generator');
     $glue = '';
     if (!empty($branches)) {
         if (count($queryGenerator->getWhereFields()) > 0 && count($searchParams) > 0) {
             $glue = QueryGenerator::$AND;
         }
         $queryGenerator->addCondition($multiReferenceFirld['columnname'], implode(',', $branches), 'c');
     }
     if (!empty($category)) {
         $baseModuleId = Vtiger_Functions::getModuleId($baseModuleName);
         $moduleId = Vtiger_Functions::getModuleId($moduleName);
         $query = 'SELECT crmid FROM u_yf_crmentity_rel_tree WHERE module = ' . $baseModuleId . ' AND relmodule = ' . $moduleId . ' AND tree IN (\'' . implode("','", $category) . '\')';
         if (count($queryGenerator->getWhereFields()) > 0 && count($searchParams) > 0) {
             $glue = QueryGenerator::$AND;
         }
         $queryGenerator->addCondition($multiReferenceFirld['columnname'], $query, 'subQuery', 'OR', true);
     }
     $listViewModel->set('query_generator', $queryGenerator);
     $listEntries = $listViewModel->getListViewEntries($pagingModel, true);
     if (count($listEntries) === 0) {
         return;
     }
     $listHeaders = $listViewModel->getListViewHeaders();
     $viewer->assign('ENTRIES', $listEntries);
     $viewer->assign('HEADERS', $listHeaders);
     $viewer->assign('MODULE', $baseModuleName);
     $viewer->view('TreeRecords.tpl', $moduleName);
 }
开发者ID:nikdejan,项目名称:YetiForceCRM,代码行数:47,代码来源:TreeRecords.php

示例6: getListViewCount

 /**
  * Function to get listView count
  * @param Vtiger_Request $request
  */
 function getListViewCount(Vtiger_Request $request)
 {
     $moduleName = $request->getModule();
     $cvId = $request->get('viewname');
     if (empty($cvId)) {
         $cvId = '0';
     }
     $searchKey = $request->get('search_key');
     $searchValue = $request->get('search_value');
     $listViewModel = Vtiger_ListView_Model::getInstance($moduleName, $cvId);
     $searchParmams = $request->get('search_params');
     $listViewModel->set('search_params', $this->transferListSearchParamsToFilterCondition($searchParmams, $listViewModel->getModule()));
     $listViewModel->set('search_key', $searchKey);
     $listViewModel->set('search_value', $searchValue);
     $listViewModel->set('operator', $request->get('operator'));
     $count = $listViewModel->getListViewCount();
     return $count;
 }
开发者ID:wsLapshin,项目名称:charter_crm,代码行数:22,代码来源:List.php

示例7: getListViewCount

 /**
  * Function to get listView count
  * @param Vtiger_Request $request
  */
 function getListViewCount(Vtiger_Request $request)
 {
     $moduleName = $this->getModule($request);
     $sourceModule = $request->get('src_module');
     $sourceField = $request->get('src_field');
     $sourceRecord = $request->get('src_record');
     $orderBy = $request->get('orderby');
     $sortOrder = $request->get('sortorder');
     $currencyId = $request->get('currency_id');
     $searchKey = $request->get('search_key');
     $searchValue = $request->get('search_value');
     $relatedParentModule = $request->get('related_parent_module');
     $relatedParentId = $request->get('related_parent_id');
     if (!empty($relatedParentModule) && !empty($relatedParentId)) {
         $parentRecordModel = Vtiger_Record_Model::getInstanceById($relatedParentId, $relatedParentModule);
         $listViewModel = Vtiger_RelationListView_Model::getInstance($parentRecordModel, $moduleName, $label);
     } else {
         $listViewModel = Vtiger_ListView_Model::getInstanceForPopup($moduleName, $sourceModule);
     }
     if (!empty($sourceModule)) {
         $listViewModel->set('src_module', $sourceModule);
         $listViewModel->set('src_field', $sourceField);
         $listViewModel->set('src_record', $sourceRecord);
         $listViewModel->set('currency_id', $currencyId);
     }
     if (!empty($orderBy)) {
         $listViewModel->set('orderby', $orderBy);
         $listViewModel->set('sortorder', $sortOrder);
     }
     if (!empty($searchKey) && !empty($searchValue)) {
         $listViewModel->set('search_key', $searchKey);
         $listViewModel->set('search_value', $searchValue);
     }
     if (!empty($relatedParentModule) && !empty($relatedParentId)) {
         $count = $listViewModel->getRelatedEntriesCount();
     } else {
         $count = $listViewModel->getListViewCount();
     }
     return $count;
 }
开发者ID:rcrrich,项目名称:UpdatePackages,代码行数:44,代码来源:Popup.php

示例8: initializeListViewContents

 public function initializeListViewContents(Vtiger_Request $request, Vtiger_Viewer $viewer)
 {
     $request->set('src_module', $request->getModule());
     //
     $moduleName = $this->getModule($request);
     $cvId = $request->get('cvid');
     $pageNumber = $request->get('page');
     $orderBy = $request->get('orderby');
     $sortOrder = $request->get('sortorder');
     $sourceModule = $request->get('src_module');
     $sourceField = $request->get('src_field');
     $sourceRecord = $request->get('src_record');
     $searchKey = $request->get('search_key');
     $searchValue = $request->get('search_value');
     $currencyId = $request->get('currency_id');
     $relatedParentModule = $request->get('related_parent_module');
     $relatedParentId = $request->get('related_parent_id');
     $potentialId = $request->get('potentialid');
     //To handle special operation when selecting record from Popup
     $getUrl = $request->get('get_url');
     //Check whether the request is in multi select mode
     $multiSelectMode = $request->get('multi_select');
     if (empty($multiSelectMode)) {
         $multiSelectMode = false;
     }
     if (empty($cvId)) {
         $cvId = '0';
     }
     if (empty($pageNumber)) {
         $pageNumber = '1';
     }
     $pagingModel = new Vtiger_Paging_Model();
     $pagingModel->set('page', $pageNumber);
     $moduleModel = Vtiger_Module_Model::getInstance($moduleName);
     $recordStructureInstance = Vtiger_RecordStructure_Model::getInstanceForModule($moduleModel);
     $isRecordExists = Vtiger_Util_Helper::checkRecordExistance($relatedParentId);
     if ($isRecordExists) {
         $relatedParentModule = '';
         $relatedParentId = '';
     } else {
         if ($isRecordExists === NULL) {
             $relatedParentModule = '';
             $relatedParentId = '';
         }
     }
     if (!empty($relatedParentModule) && !empty($relatedParentId)) {
         $parentRecordModel = Vtiger_Record_Model::getInstanceById($relatedParentId, $relatedParentModule);
         $listViewModel = Vtiger_RelationListView_Model::getInstance($parentRecordModel, $moduleName, $label);
     } else {
         $listViewModel = Vtiger_ListView_Model::getInstanceForPopup($moduleName, $sourceModule);
     }
     if (empty($orderBy) && empty($sortOrder)) {
         $moduleInstance = CRMEntity::getInstance($moduleName);
         $orderBy = $moduleInstance->default_order_by;
         $sortOrder = $moduleInstance->default_sort_order;
     }
     if (!empty($orderBy)) {
         $listViewModel->set('orderby', $orderBy);
         $listViewModel->set('sortorder', $sortOrder);
     }
     if (!empty($sourceModule)) {
         $listViewModel->set('src_module', $sourceModule);
         $listViewModel->set('src_field', $sourceField);
         $listViewModel->set('src_record', $sourceRecord);
     }
     if (!empty($searchKey) && !empty($searchValue)) {
         $listViewModel->set('search_key', $searchKey);
         $listViewModel->set('search_value', $searchValue);
     }
     if (!empty($potentialId) && vglobal('inventory_popup_limited_from_potentials')) {
         $listViewModel->set('potential_id', $potentialId);
         $viewer->assign('INVENTORY_LIMITED_FROM_POTENTIALS', true);
     }
     if (!empty($relatedParentModule) && !empty($relatedParentId)) {
         $this->listViewHeaders = $listViewModel->getHeaders();
         $models = $listViewModel->getEntries($pagingModel);
         $noOfEntries = count($models);
         foreach ($models as $recordId => $recordModel) {
             foreach ($this->listViewHeaders as $fieldName => $fieldModel) {
                 $recordModel->set($fieldName, $recordModel->getDisplayValue($fieldName));
             }
             $models[$recordId] = $recordModel;
         }
         $this->listViewEntries = $models;
         if (count($this->listViewEntries) > 0) {
             $parent_related_records = true;
         }
     } else {
         $this->listViewHeaders = $listViewModel->getListViewHeaders();
         $this->listViewEntries = $listViewModel->getListViewEntries($pagingModel);
     }
     // If there are no related records with parent module then, we should show all the records
     if (!$parent_related_records && !empty($relatedParentModule) && !empty($relatedParentId)) {
         $relatedParentModule = null;
         $relatedParentId = null;
         $listViewModel = Vtiger_ListView_Model::getInstanceForPopup($moduleName, $sourceModule);
         if (!empty($orderBy)) {
             $listViewModel->set('orderby', $orderBy);
             $listViewModel->set('sortorder', $sortOrder);
         }
//.........这里部分代码省略.........
开发者ID:rcrrich,项目名称:UpdatePackages,代码行数:101,代码来源:ServicesPopup.php

示例9: getRecordIds

 /**
  * Function which provides the records for the current view
  * @param <Boolean> $skipRecords - List of the RecordIds to be skipped
  * @return <Array> List of RecordsIds
  */
 public function getRecordIds($skipRecords = false, $module = false)
 {
     $db = PearDatabase::getInstance();
     $cvId = $this->getId();
     $moduleModel = $this->getModule();
     $moduleName = $moduleModel->get('name');
     $baseTableName = $moduleModel->get('basetable');
     $baseTableId = $moduleModel->get('basetableid');
     $listViewModel = Vtiger_ListView_Model::getInstance($moduleName, $cvId);
     $queryGenerator = $listViewModel->get('query_generator');
     $searchKey = $this->get('search_key');
     $searchValue = $this->get('search_value');
     $operator = $this->get('operator');
     if (!empty($searchValue)) {
         $queryGenerator->addUserSearchConditions(array('search_field' => $searchKey, 'search_text' => $searchValue, 'operator' => $operator));
     }
     $searchParams = $this->get('search_params');
     if (empty($searchParams)) {
         $searchParams = array();
     }
     $transformedSearchParams = Vtiger_Util_Helper::transferListSearchParamsToFilterCondition($searchParams, $moduleModel);
     $queryGenerator->parseAdvFilterList($transformedSearchParams);
     $listQuery = $queryGenerator->getQuery();
     if ($module == 'RecycleBin') {
         $listQuery = preg_replace("/vtiger_crmentity.deleted\\s*=\\s*0/i", 'vtiger_crmentity.deleted = 1', $listQuery);
     }
     if ($skipRecords && !empty($skipRecords) && is_array($skipRecords) && count($skipRecords) > 0) {
         $listQuery .= ' AND ' . $baseTableName . '.' . $baseTableId . ' NOT IN (' . implode(',', $skipRecords) . ')';
     }
     $result = $db->query($listQuery);
     $noOfRecords = $db->num_rows($result);
     $recordIds = array();
     for ($i = 0; $i < $noOfRecords; ++$i) {
         $recordIds[] = $db->query_result($result, $i, $baseTableId);
     }
     return $recordIds;
 }
开发者ID:JeRRimix,项目名称:YetiForceCRM,代码行数:42,代码来源:Record.php

示例10: initializeListViewContents

 public function initializeListViewContents(Vtiger_Request $request, Vtiger_Viewer $viewer)
 {
     //src_module value is added to just to stop showing inactive products
     $request->set('src_module', $request->getModule());
     $moduleName = $this->getModule($request);
     $cvId = $request->get('cvid');
     $pageNumber = $request->get('page');
     $orderBy = $request->get('orderby');
     $sortOrder = $request->get('sortorder');
     $sourceModule = $request->get('src_module');
     $sourceField = $request->get('src_field');
     $sourceRecord = $request->get('src_record');
     $searchKey = $request->get('search_key');
     $searchValue = $request->get('search_value');
     $currencyId = $request->get('currency_id');
     $potentialId = $request->get('potentialid');
     $searchParams = $request->get('search_params');
     //To handle special operation when selecting record from Popup
     $getUrl = $request->get('get_url');
     //Check whether the request is in multi select mode
     $multiSelectMode = $request->get('multi_select');
     if (empty($multiSelectMode)) {
         $multiSelectMode = false;
     }
     if (empty($cvId)) {
         $cvId = '0';
     }
     if (empty($pageNumber)) {
         $pageNumber = '1';
     }
     $pagingModel = new Vtiger_Paging_Model();
     $pagingModel->set('page', $pageNumber);
     $moduleModel = Vtiger_Module_Model::getInstance($moduleName);
     $listViewModel = Vtiger_ListView_Model::getInstanceForPopup($moduleName, $sourceModule);
     $recordStructureInstance = Vtiger_RecordStructure_Model::getInstanceForModule($moduleModel);
     if (empty($orderBy) && empty($sortOrder)) {
         $moduleInstance = CRMEntity::getInstance($moduleName);
         $orderBy = $moduleInstance->default_order_by;
         $sortOrder = $moduleInstance->default_sort_order;
     }
     if (!empty($orderBy)) {
         $listViewModel->set('orderby', $orderBy);
         $listViewModel->set('sortorder', $sortOrder);
     }
     if (!empty($sourceModule)) {
         $listViewModel->set('src_module', $sourceModule);
         $listViewModel->set('src_field', $sourceField);
         $listViewModel->set('src_record', $sourceRecord);
     }
     if (!empty($searchKey) && !empty($searchValue)) {
         $listViewModel->set('search_key', $searchKey);
         $listViewModel->set('search_value', $searchValue);
     }
     $searchParmams = $request->get('search_params');
     if (empty($searchParmams)) {
         $searchParmams = array();
     }
     $transformedSearchParams = Vtiger_Util_Helper::transferListSearchParamsToFilterCondition($searchParmams, $moduleModel);
     $listViewModel->set('search_params', $transformedSearchParams);
     //To make smarty to get the details easily accesible
     foreach ($searchParmams as $fieldListGroup) {
         foreach ($fieldListGroup as $fieldSearchInfo) {
             $fieldSearchInfo['searchValue'] = $fieldSearchInfo[2];
             $fieldSearchInfo['fieldName'] = $fieldName = $fieldSearchInfo[0];
             $searchParmams[$fieldName] = $fieldSearchInfo;
         }
     }
     if (Settings_SalesProcesses_Module_Model::checkRelatedToPotentialsLimit() && Settings_SalesProcesses_Module_Model::isLimitForModule($sourceModule)) {
         if ($potentialId == '') {
             $potentialId = -1;
         }
         $listViewModel->set('potential_id', $potentialId);
         $viewer->assign('INVENTORY_LIMITED_FROM_POTENTIALS', true);
     }
     $productModel = Vtiger_Module_Model::getInstance('Products');
     if (!$this->listViewHeaders) {
         $this->listViewHeaders = $listViewModel->getListViewHeaders();
     }
     if (!$this->listViewEntries && $productModel->isActive()) {
         $this->listViewEntries = $listViewModel->getListViewEntries($pagingModel);
     }
     if (!$productModel->isActive()) {
         $this->listViewEntries = array();
         $viewer->assign('LBL_MODULE_DISABLED', true);
     }
     foreach ($this->listViewEntries as $key => $listViewEntry) {
         $productId = $listViewEntry->getId();
         $subProducts = $listViewModel->getSubProducts($productId);
         if ($subProducts) {
             $listViewEntry->set('subProducts', $subProducts);
         }
     }
     $noOfEntries = count($this->listViewEntries);
     if (empty($sortOrder)) {
         $sortOrder = "ASC";
     }
     if ($sortOrder == "ASC") {
         $nextSortOrder = "DESC";
         $sortImage = "downArrowSmall.png";
     } else {
//.........这里部分代码省略.........
开发者ID:awflu,项目名称:YetiForceCRM,代码行数:101,代码来源:ProductsPopup.php

示例11: getListViewLinks

 /**
  * Function to get the list of listview links
  * @param <Array> $linkParams Parameters to be replaced in the link template
  * @return <Array> - an array of Vtiger_Link_Model instances
  */
 public function getListViewLinks($linkParams)
 {
     $links = parent::getListViewLinks($linkParams);
     $quickLinks = array(array('linktype' => 'LISTVIEWQUICK', 'linklabel' => 'Tasks List', 'linkurl' => $this->getModule()->getDefaultUrl(), 'linkicon' => ''));
     foreach ($quickLinks as $quickLink) {
         $links['LISTVIEWQUICK'][] = Vtiger_Link_Model::getInstanceFromValues($quickLink);
     }
     return $links;
 }
开发者ID:Bergdahls,项目名称:YetiForceCRM,代码行数:14,代码来源:ListView.php

示例12: getListViewEntries

 /**
  * Function to get the list view entries
  * @param Vtiger_Paging_Model $pagingModel
  * @return <Array> - Associative array of record id mapped to Vtiger_Record_Model instance.
  */
 public function getListViewEntries($pagingModel)
 {
     $queryGenerator = $this->get('query_generator');
     // Added as Users module do not have custom filters and id column is added by querygenerator.
     $fields = $queryGenerator->getFields();
     $fields[] = 'id';
     $queryGenerator->setFields($fields);
     return parent::getListViewEntries($pagingModel);
 }
开发者ID:nouphet,项目名称:vtigercrm-6.0.0-ja,代码行数:14,代码来源:ListView.php

示例13: getBasicLinks

 public function getBasicLinks()
 {
     $basicLinks = parent::getBasicLinks();
     $createPermission = Users_Privileges_Model::isPermitted('Potentials', 'EditView');
     if ($createPermission) {
         $basicLinks[] = array('linktype' => 'LISTVIEWBASIC', 'linklabel' => 'LBL_GENERATE_EXTENSION', 'linkurl' => 'javascript:Vtiger_List_Js.generatePotentials()', 'linkicon' => 'icon-star-empty', 'linkclass' => 'btn-success');
         return $basicLinks;
     }
 }
开发者ID:rcrrich,项目名称:YetiForceCRM,代码行数:9,代码来源:ListView.php

示例14: getSettingLinks

 public function getSettingLinks()
 {
     $settingsLinks = parent::getSettingLinks();
     $currentUserModel = Users_Record_Model::getCurrentUserModel();
     $moduleModel = $this->getModule();
     if ($currentUserModel->isAdminUser()) {
         $settingsLinks[] = array('linktype' => 'LISTVIEWSETTING', 'linklabel' => 'LBL_EDIT_MAILSCANNER', 'linkurl' => 'index.php?module=MailScanner&parent=Settings&view=List', 'linkicon' => '');
         return $settingsLinks;
     }
 }
开发者ID:nouphet,项目名称:vtigercrm-6.0.0-ja,代码行数:10,代码来源:ListView.php

示例15: getListViewMassActions

 /**
  * Function to get the list of Mass actions for the module
  * @param <Array> $linkParams
  * @return <Array> - Associative array of Link type to List of  Vtiger_Link_Model instances for Mass Actions
  */
 public function getListViewMassActions($linkParams)
 {
     $massActionLinks = parent::getListViewMassActions($linkParams);
     $currentUserModel = Users_Privileges_Model::getCurrentUserPrivilegesModel();
     $emailModuleModel = Vtiger_Module_Model::getInstance('Emails');
     if ($currentUserModel->hasModulePermission($emailModuleModel->getId())) {
         $massActionLink = array('linktype' => 'LISTVIEWMASSACTION', 'linklabel' => 'LBL_SEND_EMAIL', 'linkurl' => 'javascript:Vtiger_List_Js.triggerSendEmail("index.php?module=' . $this->getModule()->getName() . '&view=MassActionAjax&mode=showComposeEmailForm&step=step1","Emails");', 'linkicon' => '');
         $massActionLinks['LISTVIEWMASSACTION'][] = Vtiger_Link_Model::getInstanceFromValues($massActionLink);
     }
     return $massActionLinks;
 }
开发者ID:cannking,项目名称:vtigercrm-debug,代码行数:16,代码来源:ListView.php


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