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


PHP CIntranetUtils::GetSubordinateDepartmentsList方法代码示例

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


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

示例1: isSupervisor

 /**
  * Check if user is head of any company departmant
  * @param integer $userID User ID
  * @return boolean
  */
 public static function isSupervisor($userID)
 {
     if (!Loader::includeModule('intranet')) {
         return false;
     }
     $dbResult = \CIntranetUtils::GetSubordinateDepartmentsList($userID);
     return is_array($dbResult->Fetch());
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:13,代码来源:intranetmanager.php

示例2: GetSubordinateDepartmentsOld

 function GetSubordinateDepartmentsOld($USER_ID = null, $bRecursive = false)
 {
     global $USER;
     $arDpts = array();
     if (!$USER_ID) {
         $USER_ID = $USER->GetID();
     }
     if ($USER_ID) {
         $dbRes = CIntranetUtils::GetSubordinateDepartmentsList($USER_ID);
         while ($arRes = $dbRes->Fetch()) {
             $arDpts[] = $arRes['ID'];
         }
         if ($bRecursive && count($arDpts) > 0) {
             $arDpts = CIntranetUtils::GetIBlockSectionChildren($arDpts);
         }
     }
     return $arDpts;
 }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:18,代码来源:utils.php

示例3: CPHPCache

 }
 $arResult["IS_ONLINE"] = $arResult["User"]["IS_ONLINE"] == "Y";
 if (CModule::IncludeModule('intranet')) {
     $arResult['IS_HONOURED'] = CIntranetUtils::IsUserHonoured($arResult["User"]["ID"]);
     $arResult['IS_ABSENT'] = CIntranetUtils::IsUserAbsent($arResult["User"]["ID"], $arParams['CALENDAR_USER_IBLOCK_ID']);
     //departments and managers
     $obCache = new CPHPCache();
     $path = "/user_card_" . intval($arResult["User"]["ID"] / 100);
     if ($arParams["CACHE_TIME"] == 0 || $obCache->StartDataCache($arParams["CACHE_TIME"], $arResult["User"]["ID"], $path)) {
         if ($arParams["CACHE_TIME"] > 0 && defined("BX_COMP_MANAGED_CACHE")) {
             $GLOBALS["CACHE_MANAGER"]->StartTagCache($path);
             $GLOBALS["CACHE_MANAGER"]->RegisterTag("USER_CARD_" . intval($arResult["User"]["ID"] / 100));
         }
         //departments
         $arResult['DEPARTMENTS'] = array();
         $dbRes = CIntranetUtils::GetSubordinateDepartmentsList($arResult["User"]["ID"]);
         while ($arRes = $dbRes->GetNext()) {
             $arRes['URL'] = str_replace('#ID#', $arRes['ID'], $arParams['PATH_TO_CONPANY_DEPARTMENT']);
             $arResult['DEPARTMENTS'][$arRes['ID']] = $arRes;
             $arResult['DEPARTMENTS'][$arRes['ID']]['EMPLOYEE_COUNT'] = 0;
             $rsUsers = CIntranetUtils::GetDepartmentEmployees(array($arRes['ID']), $bRecursive = true);
             while ($arUser = $rsUsers->Fetch()) {
                 if ($arUser['ID'] != $arResult["User"]["ID"]) {
                     //self
                     $arResult['DEPARTMENTS'][$arRes['ID']]['EMPLOYEE_COUNT']++;
                 }
             }
         }
         //managers
         $arResult['MANAGERS'] = CIntranetUtils::GetDepartmentManager($arResult["User"]["UF_DEPARTMENT"], $arResult["User"]["ID"], true);
         if ($arParams["CACHE_TIME"] > 0) {
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:component.php

示例4: CPHPCache

 $arUser["IS_ONLINE"] = $arUser["IS_ONLINE"] == "Y";
 if ($componentPage == "user") {
     if (CModule::IncludeModule('intranet')) {
         $arResult['IS_HONOURED'] = CIntranetUtils::IsUserHonoured($arUser["ID"]);
         //$arResult['IS_ABSENT'] = CIntranetUtils::IsUserAbsent($arUser["ID"], $arParams['CALENDAR_USER_IBLOCK_ID']);
         //departments and managers
         $obCache = new CPHPCache();
         $path = "/user_card_" . intval($arUser["ID"] / 100);
         if ($arParams["CACHE_TIME"] == 0 || $obCache->StartDataCache($arParams["CACHE_TIME"], $arUser["ID"], $path)) {
             if ($arParams["CACHE_TIME"] > 0 && defined("BX_COMP_MANAGED_CACHE")) {
                 $GLOBALS["CACHE_MANAGER"]->StartTagCache($path);
                 $GLOBALS["CACHE_MANAGER"]->RegisterTag("USER_CARD_" . intval($arUser["ID"] / 100));
             }
             //departments
             $arResult['DEPARTMENTS'] = array();
             $dbRes = CIntranetUtils::GetSubordinateDepartmentsList($arUser["ID"]);
             while ($arRes = $dbRes->GetNext()) {
                 $arRes['URL'] = str_replace('#ID#', $arRes['ID'], $arParams['PATH_TO_COMPANY_DEPARTMENT']);
                 $arResult['DEPARTMENTS'][$arRes['ID']] = $arRes;
                 $arResult['DEPARTMENTS'][$arRes['ID']]['EMPLOYEE_COUNT'] = 0;
                 $rsUsers1 = CIntranetUtils::GetDepartmentEmployees(array($arRes['ID']), $bRecursive = true);
                 while ($arUser1 = $rsUsers1->Fetch()) {
                     if ($arUser1['ID'] != $arUser["ID"]) {
                         //self
                         $arResult['DEPARTMENTS'][$arRes['ID']]['EMPLOYEE_COUNT']++;
                     }
                 }
             }
             //managers
             $arRes = CIntranetUtils::GetDepartmentManager($arUser["UF_DEPARTMENT"], $arUser["ID"], true);
             foreach ($arRes as $val) {
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:component.php


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