本文整理匯總了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;
}