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


PHP CIntranetUtils::getSubStructure方法代碼示例

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


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

示例1: array

}
$arManagers = array();
if (($arDepartments = CIntranetUtils::getUserDepartments($USER->GetID())) && is_array($arDepartments) && count($arDepartments) > 0) {
    $arManagers = array_keys(CIntranetUserSelectorHelper::getDepartmentManagersId($arDepartments, $USER->getID(), true));
}
$iBlockId = COption::GetOptionInt('intranet', 'iblock_structure');
$arSecFilter = array('IBLOCK_ID' => $iBlockId);
if ($bSubordinateOnly) {
    if (!$arSubDeps) {
        $arSubDeps = array(-1);
    }
    $arSecFilter["ID"] = $arSubDeps;
}
$arStructure = $arSections = array();
if ($arParams["DISPLAY_TAB_STRUCTURE"] == 'Y' && (!CModule::IncludeModule('extranet') || CExtranet::IsIntranetUser())) {
    $arStructure = CIntranetUtils::getSubStructure(0, 1);
    $arSections = $arStructure['DATA'];
    $arStructure = $arStructure['TREE'];
    if ($bSubordinateOnly) {
        $arStructure = array();
        foreach ($arSections as $k => $item) {
            $iblockSectionId = (int) $item['IBLOCK_SECTION_ID'];
            if (($isSub = !in_array($iblockSectionId, $arSubDeps)) && !in_array($item['ID'], $arSubDeps)) {
                unset($arSections[$k]);
                continue;
            }
            if ($isSub) {
                $iblockSectionId = 0;
            }
            if (!isset($arStructure[$iblockSectionId])) {
                $arStructure[$iblockSectionId] = array();
開發者ID:mrdeadmouse,項目名稱:u136006,代碼行數:31,代碼來源:component.php

示例2: is_array

					typeof oData.id != 'undefined'
					&& oData.id != null
					&& typeof oData.name != 'undefined'
				)
				{
					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();
開發者ID:DarneoStudio,項目名稱:bitrix,代碼行數:31,代碼來源:invite_dialog.php

示例3: GetSiteByDepartmentId

 public static function GetSiteByDepartmentId($arDepartmentId)
 {
     if (!is_array($arDepartmentId)) {
         $arDepartmentId = array($arDepartmentId);
     }
     $bFound = false;
     $arDefaultSite = false;
     $dbSitesList = CSite::GetList($b = "SORT", $o = "asc", array("ACTIVE" => "Y"));
     // cache used
     while ($arSite = $dbSitesList->GetNext()) {
         if (!$arDefaultSite && $arSite['DEF'] == 'Y') {
             $arDefaultSite = $arSite;
         }
         $siteRootDepartmentId = COption::GetOptionString("main", "wizard_departament", false, $arSite["LID"], true);
         if ($siteRootDepartmentId) {
             if (in_array($siteRootDepartmentId, $arDepartmentId)) {
                 $arResult = $arSite;
                 $bFound = true;
             } else {
                 $arSubStructure = CIntranetUtils::getSubStructure($siteRootDepartmentId);
                 $arSiteDepartmentId = array_keys($arSubStructure["DATA"]);
                 foreach ($arDepartmentId as $userDepartmentId) {
                     if (in_array($userDepartmentId, $arSiteDepartmentId)) {
                         $arResult = $arSite;
                         $bFound = true;
                         break;
                     }
                 }
             }
             if ($bFound) {
                 break;
             }
         }
     }
     if (!$bFound) {
         $arResult = $arDefaultSite;
     }
     return $arResult;
 }
開發者ID:Satariall,項目名稱:izurit,代碼行數:39,代碼來源:log_tools.php

示例4: elseif

     if (CModule::IncludeModule("extranet")) {
         if ($showExtranetUsers == SHOW_FROM_MY_GROUPS) {
             $arFilteredUserIDs = CExtranet::GetMyGroupsUsersSimple(CExtranet::GetExtranetSiteID());
         } elseif ($showExtranetUsers == SHOW_FROM_EXACT_GROUP) {
             if (CModule::IncludeModule("socialnetwork")) {
                 $dbUsers = CSocNetUserToGroup::GetList(array(), array("GROUP_ID" => array($exGroupID), "<=ROLE" => SONET_ROLES_USER, "USER_ACTIVE" => "Y"), false, false, array("ID", "USER_ID"));
                 if ($dbUsers) {
                     while ($arUser = $dbUsers->GetNext()) {
                         $arFilteredUserIDs[] = $arUser["USER_ID"];
                     }
                 }
             }
         }
     }
 } else {
     $arStructure = CIntranetUtils::getSubStructure($sectionId, 1);
     if (!empty($arStructure['TREE'])) {
         if ($bSubordinateOnly) {
             $arStructure['TREE'] = array();
             foreach ($arStructure['DATA'] as $k => $item) {
                 $iblockSectionId = (int) $item['IBLOCK_SECTION_ID'];
                 if (($isSub = !in_array($iblockSectionId, $arSubDeps)) && !in_array($item['ID'], $arSubDeps)) {
                     unset($arStructure['DATA'][$k]);
                     continue;
                 }
                 if ($isSub) {
                     $iblockSectionId = 0;
                 }
                 if (!isset($arStructure['TREE'][$iblockSectionId])) {
                     $arStructure['TREE'][$iblockSectionId] = array();
                 }
開發者ID:mrdeadmouse,項目名稱:u136006,代碼行數:31,代碼來源:ajax.php


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