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


PHP CIntranetUtils::GetEmployeesCountForSorting方法代码示例

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


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

示例1: array

     $res = array('DEPARTMENTS' => array(), 'USERS' => array());
     foreach ($arUserIDs as $dpt_id => $arDptUsers) {
         $res['DEPARTMENTS'][] = $old_res['DEPARTMENTS'][$dpt_id];
         foreach ($arDptUsers as $user_id) {
             if ($old_res['USERS'][$user_id]) {
                 $old_res['USERS'][$user_id]['DEPARTMENT'] = $dpt_id;
                 $old_res['USERS'][$user_id]['HEAD'] = $old_res['DEPARTMENTS'][$dpt_id]['UF_HEAD'] == $user_id;
                 $res['USERS'][] = $old_res['USERS'][$user_id];
             }
         }
     }
     \Bitrix\Main\Type\Collection::sortByColumn($res['USERS'], array('HEAD' => SORT_DESC, 'NAME' => SORT_ASC));
     $tm_user = new CUserReportFull($USER->GetID());
     $res["OVERDUE"] = $tm_user->GetReportData(true);
     $res['NAV'] = '';
     $item_count = CIntranetUtils::GetEmployeesCountForSorting($section_id, 0, $bCanReadAll ? false : $arAccessUsers['READ']);
     $page_count = intval($item_count / $amount) + ($item_count % $amount > 0 ? 1 : 0);
     $navResult = new CDBResult();
     $navResult->NavNum = 'STRUCTURE';
     $navResult->NavPageSize = $amount;
     $navResult->NavRecordCount = $item_count;
     $navResult->NavPageCount = $page_count;
     $navResult->NavPageNomer = $page;
     ob_start();
     $APPLICATION->IncludeComponent('bitrix:system.pagenavigation', 'js', array('NAV_RESULT' => $navResult, 'HANDLER' => 'window.BXTMREPORT.Page'));
     $res['NAV'] = ob_get_contents();
     ob_end_clean();
     break;
 case 'admin_data_settings':
     $bReturnRes = true;
     $arNeededSettings = array('UF_TIMEMAN', 'UF_TM_MAX_START', 'UF_TM_MIN_FINISH', 'UF_TM_MIN_DURATION', 'UF_TM_REPORT_REQ', 'UF_TM_FREE', 'UF_TM_ALLOWED_DELTA');
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:timeman.php

示例2: _getNavData

 private function _getNavData()
 {
     $res = '';
     if (is_array($this->arAccessUsers['READ']) && count($this->arAccessUsers['READ']) > 0) {
         $item_count = CIntranetUtils::GetEmployeesCountForSorting($this->department, 0, $this->bCanReadAll ? false : $this->arAccessUsers['READ']);
         $page_count = intval($item_count / $this->amount) + ($item_count % $this->amount > 0 ? 1 : 0);
         $navResult = new CDBResult();
         $navResult->NavNum = 'STRUCTURE';
         $navResult->NavPageSize = $this->amount;
         $navResult->NavRecordCount = $item_count;
         $navResult->NavPageCount = $page_count;
         $navResult->NavPageNomer = $this->page;
         ob_start();
         $GLOBALS['APPLICATION']->IncludeComponent('bitrix:system.pagenavigation', 'js', array('NAV_RESULT' => $navResult, 'HANDLER' => $this->nav_handler));
         $res = ob_get_contents();
         ob_end_clean();
     }
     return $res;
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:19,代码来源:timeman_admin_report.php


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