• Модуль: iblock
  • Путь к файлу: ~/bitrix/modules/iblock/classes/general/iblock.php
  • Класс: CAllIBlock
  • Вызов: CAllIBlock::ShowPanel
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") && $type <> '')
		{
			$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;
}