1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
iblock.php
См. документацию.
1
<?php
2
namespace
Bitrix\Landing\Connector;
3
4
use \Bitrix\Landing\Internals\HookDataTable;
5
6
class
Iblock
7
{
14
public
static
function
getElementUrl
(
$siteId
, $elementId): string
15
{
16
$url
=
''
;
17
18
\Bitrix\Landing\Rights::setGlobalOff
();
19
20
if
(is_string(
$siteId
))
21
{
22
$res
= \Bitrix\Landing\Site::getList([
23
'select'
=> [
'ID'
],
24
'filter'
=> [
'=TPL_CODE'
=>
$siteId
],
25
'order'
=> [
'ID'
=>
'desc'
]
26
]);
27
if
($row =
$res
->fetch())
28
{
29
$siteId
= $row[
'ID'
];
30
}
31
}
32
33
$syspages =
\Bitrix\Landing\Syspage::get
(
$siteId
);
34
if
(isset($syspages[
'catalog'
]))
35
{
36
$landing = \Bitrix\Landing\Landing::createInstance(
37
$syspages[
'catalog'
][
'LANDING_ID'
],
38
[
'skip_blocks'
=>
true
]
39
);
40
if
($landing->exist())
41
{
42
$url
=
\Bitrix\Landing\PublicAction\Utils::getIblockURL
(
43
$elementId,
44
'detail'
45
);
46
$url
= str_replace(
47
'#system_catalog'
,
48
$landing->getPublicUrl(),
49
$url
50
);
51
if
(mb_substr(
$url
, 0, 1) ==
'/'
)
52
{
53
$url
= \Bitrix\Landing\Site::getPublicUrl(
54
$landing->getSiteId()
55
) .
$url
;
56
}
57
}
58
}
59
60
\Bitrix\Landing\Rights::setGlobalOn
();
61
62
return
$url
;
63
}
64
70
public
static
function
onAfterIBlockSectionDelete
(
array
$section): void
71
{
72
if
($section[
'ID'
] ??
null
)
73
{
74
$res
= HookDataTable::getList([
75
'select'
=> [
76
'ID'
77
],
78
'filter'
=> [
79
'=HOOK'
=>
'SETTINGS'
,
80
'=CODE'
=>
'SECTION_ID'
,
81
'=VALUE'
=> $section[
'ID'
]
82
]
83
]);
84
while
($row =
$res
->fetch())
85
{
86
HookDataTable::delete($row[
'ID'
])->isSuccess();
87
}
88
}
89
}
90
}
Bitrix\Landing\Connector\Iblock
Определения
iblock.php:7
Bitrix\Landing\Connector\Iblock\getElementUrl
static getElementUrl($siteId, $elementId)
Определения
iblock.php:14
Bitrix\Landing\Connector\Iblock\onAfterIBlockSectionDelete
static onAfterIBlockSectionDelete(array $section)
Определения
iblock.php:70
Bitrix\Landing\PublicAction\Utils\getIblockURL
static getIblockURL($elementId, $urlType)
Определения
utils.php:328
Bitrix\Landing\Rights\setGlobalOn
static setGlobalOn()
Определения
rights.php:116
Bitrix\Landing\Rights\setGlobalOff
static setGlobalOff()
Определения
rights.php:107
Bitrix\Landing\Syspage\get
static get(int $id, bool $active=false, bool $force=false)
Определения
syspage.php:100
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
$res
$res
Определения
filter_act.php:7
$siteId
$siteId
Определения
ajax.php:8
$url
$url
Определения
iframe.php:7
bitrix
modules
landing
lib
connector
iblock.php
Создано системой
1.14.0