예제 #1
0
 public static function getTabs($iblockElementInfo)
 {
     $showTab = false;
     $request = Context::getCurrent()->getRequest();
     if ($iblockElementInfo["ID"] > 0 && (!isset($request['action']) || $request['action'] != 'copy')) {
         $showTab = true;
         if (Loader::includeModule('catalog')) {
             /*
             				$dbRes = CatalogIblockTable::getList(array(
             					'filter' => array(
             						'=IBLOCK_ID' => $iblockElementInfo["IBLOCK"]["ID"],
             						'!PRODUCT_IBLOCK_ID' => 0
             					),
             					'select' => array('IBLOCK_ID'),
             				));
             				if($dbRes->fetch())
             				{
             					$showTab = false;
             				}
             */
             if (\CCatalogSku::getInfoByOfferIBlock($iblockElementInfo["IBLOCK"]["ID"]) !== false) {
                 $showTab = false;
             }
         }
     }
     return $showTab ? array(array("DIV" => "seo_adv", "SORT" => 4, "TAB" => Loc::getMessage("SEO_ADV_TAB"), "TITLE" => Loc::getMessage("SEO_ADV_TAB_TITLE"))) : null;
 }