16 "detail" =>
"detail/#ID#/",
17 "edit" =>
"edit/#ID#/",
21 private static $localDir =
null;
22 private static array $instance = [];
24 private function __construct()
26 if (defined(
'ADMIN_SECTION'))
28 $this->adminSectionMode =
true;
34 return $this->adminSectionMode && !empty($this->pageListAdmin[
$code])
35 ? $this->directoryAdmin . $this->pageListAdmin[
$code]
42 if (!array_key_exists(static::class, static::$instance))
44 static::$instance[static::class] =
new static();
47 return static::$instance[static::class];
60 if (mb_strpos(
$url,
'?') ===
false)
62 $url .=
'?from=' . $from;
66 $url .=
'&from=' . $from;
75 $url = $this->
getDir() . $this->pages[
"index"];
96 if (
null === self::$localDir)
99 $site = \Bitrix\Main\Context::getCurrent()->getSiteObject();
105 if (
$dir->isExists())
121 $url = str_replace(
"#ID#", $id,
$url);
125 protected function getReplaced(
string $url, $replace =
null, $subject =
null)
128 if (!is_null($replace) && !is_null($subject))
129 $url = str_replace($replace, $subject,
$url);
139 "list" =>
"installed/",
140 "detail" =>
"detail/#ID#/",
141 "category" =>
"category/#ID#/",
142 "category_placement" =>
"?placement=#CODE#",
143 "placement_view" =>
"view/#APP#/",
144 "placement" =>
"placement/#PLACEMENT_ID#/",
145 "booklet" =>
"booklet/#CODE#/"
174 $result =
'/settings/license_all.php?subscr=o';
178 $region = Option::get(
'main',
'~PARAM_CLIENT_LANG', LANGUAGE_ID);
182 $result =
'https://www.1c-bitrix.ru/buy/products/b24.php?subscr=y';
186 $result =
'https://www.1c-bitrix.by/buy/products/b24.php?subscr=y';
195 $placementId = intval($placementId);
198 if ($placementId > 0)
207 $url = $this->
getReplaced($this->pages[
"placement"], $replace, $subject);
211 $uri = new \Bitrix\Main\Web\Uri(
$url);
235 $url = $this->
getReplaced($this->pages[
"booklet"], $replace, $subject);
255 $url = $this->
getReplaced($this->pages[
"placement_view"], $replace, $subject);
259 $uri = new \Bitrix\Main\Web\Uri(
$url);
278 "edit" =>
"edit/#ID#/"
287 'placement' =>
'placement/#PLACEMENT_CODE#/',
288 'section' =>
'section/#MANIFEST_CODE#/',
289 'import' =>
'import/',
290 'import_app' =>
'import/#APP_CODE#/',
291 'import_rollback' =>
'import_rollback/#APP#/',
292 'import_zip' =>
'import_zip/#ZIP_ID#/',
293 'import_manifest' =>
'import_#MANIFEST_CODE#/',
294 'export' =>
'export_#MANIFEST_CODE#/',
295 'export_element' =>
'export_#MANIFEST_CODE#/#ITEM_CODE#/'
299 'import_zip' =>
'rest_import_zip.php?id=#ZIP_ID#',
319 $uri = new \Bitrix\Main\Web\Uri(
$url);
330 public function getSection($manifestCode =
null)
334 if (!is_null($manifestCode))
355 if (!is_null($manifestCode))
408 public function getExport($manifestCode =
null)
412 if (!is_null($manifestCode))
428 if (!is_null($manifestCode))
442 protected function getReplaced(
string $url, $replace =
null, $subject =
null)
444 if (!is_null($replace) && !is_null($subject))
446 $url = str_replace($replace, $subject,
$url);
465 return MarketplaceUrls::getInstance()->
getCategoryUrl($id, $from);
470 return MarketplaceUrls::getInstance()->getCategoryByPlacement(
$code, $from);
475 return MarketplaceUrls::getInstance()->getDetailUrl($id, $from);
479 return ApplicationUrls::getInstance()->getDetailUrl($id);
500 return MarketplaceUrls::getInstance()->getPlacementViewUrl($appCode,
$params);
505 return MarketplaceUrls::getInstance()->getIndexUrl($from);
510 return MarketplaceUrls::getInstance()->getBooklet(
$code, $from);
565 return MarketplaceUrls::getInstance()->getSubscriptionBuyUrl();
const DIRECTORY_SEPARATOR
static combine(... $args)
static isModuleInstalled($moduleName)
static getDocumentRoot($siteId=null)
static getBookletUrl($code=null, $from='')
static getConfigurationImportAppUrl($code=null)
static getConfigurationUrl()
static getConfigurationImportRollbackUrl($appCode)
static getConfigurationImportZipUrl($zipId, $from='')
static getConfigurationSectionUrl($manifestCode=null)
static getConfigurationPlacementUrl($code=null, $context=null)
static getMarketplaceUrl($from='')
static getApplicationPlacementViewUrl($appCode=null, $params=null)
static getConfigurationExportUrl($manifestCode=null)
static getConfigurationExportElementUrl($manifestCode=null, $itemCode=null)
static getApplicationUrl($id=null)
static getApplicationPlacementUrl($placementId=null, $params=null)
static getCategoryByPlacement($code, $from='')
static getApplicationDetailUrl($id=null, $from='')
static getCategoryUrl($id=null, $from='')
static getConfigurationImportManifestUrl($code)
static getSubscriptionBuyUrl()
static getConfigurationImportUrl()
getImportRollback($appCode)
getExport($manifestCode=null)
getSection($manifestCode=null)
getReplaced(string $url, $replace=null, $subject=null)
getImportZip($zipId, $from)
getExportElement($manifestCode=null, $itemCode=null)
getImportManifest($manifestCode)
getPlacement($code=null, $context=null)
getBooklet($code=null, $from='')
getCategoryUrl($id=null, $from='')
getPlacementViewUrl($appCode, $params)
getPlacementUrl($placementId, $params)
getCategoryByPlacement($code, $from='')
getReplacedId(string $url, $id=null)
getReplaced(string $url, $replace=null, $subject=null)
getDetailUrl($id=null, $from='')
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
if(!is_null($config))($config as $configItem)(! $configItem->isVisible()) $code
if(file_exists($_SERVER['DOCUMENT_ROOT'] . "/urlrewrite.php")) $uri
if( $daysToExpire >=0 &&$daysToExpire< 60 elseif)( $daysToExpire< 0)
if($inWords) echo htmlspecialcharsbx(Number2Word_Rus(roundEx($totalVatSum $params['CURRENCY']