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


PHP Vtiger_ListView_Model::getListViewEntries方法代码示例

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


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

示例1: 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

示例2: getListViewEntries

 /**
  * Function to get the list view entries
  * @param Vtiger_Paging_Model $pagingModel, $status (Active or Inactive User). Default false
  * @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);
     $userFieldsFix = $this->get('search_params');
     if (empty($userFieldsFix)) {
         $userFieldsFix[0]['columns'] = array();
     }
     $indexKey = '';
     $indexValue = '';
     $roleKey = '';
     $roleValue = '';
     $roleDataInfo = array();
     foreach ($userFieldsFix[0]['columns'] as $key => $column) {
         if (strpos($column['columnname'], 'is_admin') !== false) {
             $indexKey = $key;
             $indexValue = $column['value'] == '0' ? 'off' : 'on';
         } else {
             if (strpos($column['columnname'], 'roleid') !== false) {
                 $roleKey = $key;
                 $db = PearDatabase::getInstance();
                 $sql = "SELECT `roleid`, `rolename` FROM `vtiger_role`;";
                 $result = $db->query($sql, true);
                 $roleNum = $db->num_rows($result);
                 if ($roleNum > 0) {
                     for ($i = 0; $i < $roleNum; $i++) {
                         $roleid = $db->query_result($result, $i, 'roleid');
                         $rolename = $db->query_result($result, $i, 'rolename');
                         $translated = vtranslate($rolename);
                         if ($translated == $column['value']) {
                             $roleValue = $roleid;
                         }
                     }
                 }
             }
         }
     }
     if ($indexValue !== '') {
         $userFieldsFix[0]['columns'][$indexKey]['value'] = $indexValue;
     }
     if ($roleValue !== '') {
         $userFieldsFix[0]['columns'][$roleKey]['value'] = $roleValue;
     }
     $this->set('search_params', $userFieldsFix);
     return parent::getListViewEntries($pagingModel);
 }
开发者ID:rcrrich,项目名称:UpdatePackages,代码行数:54,代码来源:ListView.php


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