- Модуль: sale
- Путь к файлу: ~/bitrix/modules/sale/lib/tradingplatform/catalogsectiontab.php
- Класс: BitrixSaleTradingPlatformCatalogSectionTab
- Вызов: CatalogSectionTab::OnInit
static function OnInit($args)
{
$result = array();
$res = BitrixSaleTradingPlatformTable::getList(array(
'select' => array("ID", "CODE", "CATALOG_SECTION_TAB_CLASS_NAME"),
'filter' => array('=ACTIVE' => 'Y'),
));
while($arRes = $res->fetch())
{
if($arRes["CATALOG_SECTION_TAB_CLASS_NAME"] <> '' && class_exists($arRes["CATALOG_SECTION_TAB_CLASS_NAME"]))
{
$tabHandler = new $arRes["CATALOG_SECTION_TAB_CLASS_NAME"];
if(!($tabHandler instanceof TabHandler))
throw new SystemException("TabHandler (".$arRes["CODE"].") has wrong instance. (".__CLASS__."::".__METHOD__.")");
self::$tabHandlers[$arRes["CODE"]] = $tabHandler;
}
}
if(!empty(self::$tabHandlers))
{
//todo: iblock filter
$result = array(
"TABSET" => "SALE_TRADING_PLATFORM",
"GetTabs" => array("\Bitrix\Sale\TradingPlatform\CatalogSectionTab", "GetTabs"),
"ShowTab" => array("\Bitrix\Sale\TradingPlatform\CatalogSectionTab", "ShowTab"),
"Action" => array("\Bitrix\Sale\TradingPlatform\CatalogSectionTab", "Action"),
"Check" => array("\Bitrix\Sale\TradingPlatform\CatalogSectionTab", "Check"),
);
}
return $result;
}