本文整理汇总了PHP中CIBlock::AddPanelButtons方法的典型用法代码示例。如果您正苦于以下问题:PHP CIBlock::AddPanelButtons方法的具体用法?PHP CIBlock::AddPanelButtons怎么用?PHP CIBlock::AddPanelButtons使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CIBlock
的用法示例。
在下文中一共展示了CIBlock::AddPanelButtons方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ShowPanel
public static function ShowPanel($IBLOCK_ID=0, $ELEMENT_ID=0, $SECTION_ID="", $type="news", $bGetIcons=false, $componentName="", $arLabels=array())
{
/** @global CMain $APPLICATION */
global $APPLICATION;
/** @global CUser $USER */
global $USER;
if (($USER->IsAuthorized() || $APPLICATION->ShowPanel===true) && $APPLICATION->ShowPanel!==false)
{
if (CModule::IncludeModule("iblock") && strlen($type) > 0)
{
$arButtons = CIBlock::GetPanelButtons($IBLOCK_ID, $ELEMENT_ID, $SECTION_ID, array(
"LABELS" => $arLabels,
));
$mode = $APPLICATION->GetPublicShowMode();
if($bGetIcons)
{
return CIBlock::GetComponentMenu($mode, $arButtons);
}
else
{
CIBlock::AddPanelButtons($mode, $componentName, $arButtons);
}
}
}
return null;
}
示例2: htmlspecialcharsbx
//detail url
$arResult['SECTIONS'][$arRes['ID']]['SECTION_PAGE_URL'] = htmlspecialcharsbx(str_replace(
array("#SERVER_NAME#", "#SITE_DIR#", "#IBLOCK_ID#", "#SECTION_ID#", "#ELEMENT_ID#"),
array(SITE_SERVER_NAME, SITE_DIR, $arParams["IBLOCK_ID"], $arRes["ID"], ""),
(strlen($arParams["SECTION_URL"])>0?$arParams["SECTION_URL"]:$arRes["SECTION_PAGE_URL"])
));
}
//no sections to display
if(count($arResult['SECTIONS'])<=0)
{
$this->AbortResultCache();
@define("ERROR_404", "Y");
return false;
}
$this->SetResultCacheKeys(array(
));
//include template
$this->IncludeComponentTemplate();
}
//add buttons common
if($USER->IsAuthorized())
{
$arButtons = CIBlock::GetPanelButtons($arParams['IBLOCK_ID'], 0, $arParams['SECTION_ID']);
if($APPLICATION->GetShowIncludeAreas())
$this->AddIncludeAreaIcons(CIBlock::GetComponentMenu("configure", $arButtons));
CIBlock::AddPanelButtons($APPLICATION->GetPublicShowMode(), $this->GetName(), array("intranet"=>$arButtons["intranet"]));
}
?>