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