1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
advtabengine.php
См. документацию.
1<?php
2namespace Bitrix\Seo;
3
4use Bitrix\Main\Application;
5use Bitrix\Main\Config\Option;
6use Bitrix\Main\Context;
7use Bitrix\Main\Loader;
8use Bitrix\Main\Localization\Loc;
9use Bitrix\Main\IO;
10use Bitrix\Seo\Engine;
11
12Loc::loadMessages(__FILE__);
13
21
23{
24 public static function eventHandler()
25 {
26 if(
27 Option::get('main', 'vendor', '') == '1c_bitrix'
28 && Loc::getDefaultLang(LANGUAGE_ID) == 'ru'
29 && IsModuleInstalled('socialservices')
30 )
31 {
32 return array(
33 "TABSET" => "seo_adv",
34 "Check" => array(__CLASS__, 'checkFields'),
35 "Action" => array(__CLASS__, 'saveData'),
36 "GetTabs" => array(__CLASS__, 'getTabs'),
37 "ShowTab" => array(__CLASS__, 'showTab'),
38 );
39 }
40 }
41
42 public static function getTabs($iblockElementInfo)
43 {
44 $showTab = false;
45
46 $request = Context::getCurrent()->getRequest();
47
48 if($iblockElementInfo["ID"] > 0 && (!isset($request['action']) || $request['action'] != 'copy'))
49 {
50 $showTab = true;
51 if(Loader::includeModule('catalog'))
52 {
53/*
54 $dbRes = CatalogIblockTable::getList(array(
55 'filter' => array(
56 '=IBLOCK_ID' => $iblockElementInfo["IBLOCK"]["ID"],
57 '!PRODUCT_IBLOCK_ID' => 0
58 ),
59 'select' => array('IBLOCK_ID'),
60 ));
61 if($dbRes->fetch())
62 {
63 $showTab = false;
64 }
65*/
66 if(\CCatalogSku::getInfoByOfferIBlock($iblockElementInfo["IBLOCK"]["ID"]) !== false)
67 {
68 $showTab = false;
69 }
70 }
71 }
72
73 return $showTab ? array(
74 array(
75 "DIV" => "seo_adv",
76 "SORT" => 4,
77 "TAB" => Loc::getMessage("SEO_ADV_TAB"),
78 "TITLE" => Loc::getMessage("SEO_ADV_TAB_TITLE"),
79 ),
80 ) : null;
81 }
82
83 public static function showTab($div,$iblockElementInfo)
84 {
85 $engineList = array();
86
87 if(Option::get('main', 'vendor', '') == '1c_bitrix')
88 {
89 $engineList[] = array(
90 "DIV" => "yandex_direct",
91 "TAB" => Loc::getMessage("SEO_ADV_YANDEX_DIRECT"),
92 "TITLE" => Loc::getMessage("SEO_ADV_YANDEX_DIRECT_TITLE"),
93 "HANDLER" => IO\Path::combine(
94 Application::getDocumentRoot(),
95 BX_ROOT,
96 "/modules/seo/admin/tab/seo_search_yandex_direct.php"
97 ),
98 );
99 }
100
101 if(count($engineList) > 0)
102 {
103 $engineTabControl = new \CAdminViewTabControl("engineTabControl", $engineList);
104?>
105<tr>
106 <td colspan="2">
107<?php
108 $engineTabControl->begin();
109 foreach($engineList as $engineTab)
110 {
111 $engineTabControl->beginNextTab();
112
113 $file = new IO\File($engineTab["HANDLER"]);
114 if($file->isExists())
115 {
116 require($file->getPath());
117 }
118 }
119
120 $engineTabControl->end();
121?>
122 </td>
123</tr>
124<?php
125 }
126 }
127
128 public static function checkFields()
129 {
130 return true;
131 }
132
133 public static function saveData()
134 {
135 return true;
136 }
137}
const BX_ROOT
Определения bx_root.php:3
if(!Loader::includeModule('catalog')) if(!AccessController::getCurrent() ->check(ActionDictionary::ACTION_PRICE_EDIT)) if(!check_bitrix_sessid()) $request
Определения catalog_reindex.php:36
static combine(... $args)
Определения path.php:254
static getTabs($iblockElementInfo)
Определения advtabengine.php:42
static showTab($div, $iblockElementInfo)
Определения advtabengine.php:83
static eventHandler()
Определения advtabengine.php:24
static checkFields()
Определения advtabengine.php:128
static saveData()
Определения advtabengine.php:133
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
IsModuleInstalled($module_id)
Определения tools.php:5301
Определения Image.php:9
Определения directory.php:3
</p ></td >< td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0cm 2.0pt 0cm 2.0pt;height:9.0pt'>< p class=Normal align=center style='margin:0cm;margin-bottom:.0001pt;text-align:center;line-height:normal'>< a name=ТекстовоеПоле54 ></a ><?=($taxRate > count( $arTaxList) > 0) ? $taxRate."%"
Определения waybill.php:936