當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CIntranetUtils::GetDeparmentsTree方法代碼示例

本文整理匯總了PHP中CIntranetUtils::GetDeparmentsTree方法的典型用法代碼示例。如果您正苦於以下問題:PHP CIntranetUtils::GetDeparmentsTree方法的具體用法?PHP CIntranetUtils::GetDeparmentsTree怎麽用?PHP CIntranetUtils::GetDeparmentsTree使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在CIntranetUtils的用法示例。


在下文中一共展示了CIntranetUtils::GetDeparmentsTree方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: GetUserAttr

 public static function GetUserAttr($iUserID)
 {
     static $arResult = array();
     if (!empty($arResult[$iUserID])) {
         return $arResult[$iUserID];
     }
     $iUserID = (int) $iUserID;
     $arResult[$iUserID] = array();
     $obRes = CAccess::GetUserCodes($iUserID);
     while ($arCode = $obRes->Fetch()) {
         if (strpos($arCode['ACCESS_CODE'], 'DR') !== 0) {
             $arResult[$iUserID][strtoupper($arCode['PROVIDER_ID'])][] = $arCode['ACCESS_CODE'];
         }
     }
     if (!empty($arResult[$iUserID]['INTRANET']) && IsModuleInstalled('intranet')) {
         foreach ($arResult[$iUserID]['INTRANET'] as $iDepartment) {
             if (substr($iDepartment, 0, 1) === 'D') {
                 $arTree = CIntranetUtils::GetDeparmentsTree(substr($iDepartment, 1), true);
                 foreach ($arTree as $iSubDepartment) {
                     $arResult[$iUserID]['SUBINTRANET'][] = 'D' . $iSubDepartment;
                 }
             }
         }
     }
     return $arResult[$iUserID];
 }
開發者ID:DarneoStudio,項目名稱:bitrix,代碼行數:26,代碼來源:crm_perms.php

示例2: is_array

				{
					inviteDialogStructureLink.innerHTML = oData.name;
					inviteDialogDepartmentIdField.value = oData.id;

					inviteDialogDepartmentPopup.close();
				}
			}

		</script><?php 
    }
    $iDepartmentID = is_array($_POST) && array_key_exists("arParams", $_POST) && is_array($_POST["arParams"]) && array_key_exists("UF_DEPARTMENT", $_POST["arParams"]) ? intval($_POST["arParams"]["UF_DEPARTMENT"]) : 0;
    $arStructure = CIntranetUtils::getSubStructure(0, $iDepartmentID > 0 ? false : 1);
    if (!array_key_exists($iDepartmentID, $arStructure["DATA"])) {
        $iDepartmentID = 0;
    }
    $iStructureCount = count(CIntranetUtils::GetDeparmentsTree());
    CModule::IncludeModule('socialnetwork');
    $cacheTtl = defined("BX_COMP_MANAGED_CACHE") ? 3153600 : 3600 * 4;
    $cacheId = 'invite_dialog_sonetgroups_' . $SITE_ID . '_' . ($bExtranetInstalled ? 'Y' : 'N') . '_' . $GLOBALS["USER"]->GetID();
    $cacheDir = '/intranet/invite_dialog/' . $SITE_ID . '/' . $GLOBALS["USER"]->GetID();
    $obCache = new CPHPCache();
    if ($obCache->InitCache($cacheTtl, $cacheId, $cacheDir)) {
        $arCacheVars = $obCache->GetVars();
        $arSonetGroups = $arCacheVars["SONET_GROUPS"];
        $arSonetGroupsExtranet = $arCacheVars["SONET_GROUPS_EXTRANET"];
    } else {
        $obCache->StartDataCache();
        $arSonetGroups = CSocNetLogDestination::GetSocnetGroup();
        $arSonetGroupsExtranet = array();
        if ($bExtranetInstalled && CModule::IncludeModule("extranet")) {
            $arSonetGroupsExtranet = CSocNetLogDestination::GetSocnetGroup(array("site_id" => CExtranet::GetExtranetSiteID()));
開發者ID:DarneoStudio,項目名稱:bitrix,代碼行數:31,代碼來源:invite_dialog.php


注:本文中的CIntranetUtils::GetDeparmentsTree方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。