本文整理汇总了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');
示例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;
}