1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
component.php
См. документацию.
1
<?php
2
namespace
Bitrix\Landing\Subtype;
3
4
use \Bitrix\Landing\Manager;
5
use \Bitrix\Main\Localization\Loc;
6
7
Loc::loadMessages(__FILE__);
8
9
class
Component
10
{
18
public
static
function
prepareManifest
(
array
$manifest, \
Bitrix
\
Landing
\
Block
$block =
null
,
array
$params
=
array
())
19
{
20
$settings
=
\Bitrix\Landing\Hook\Page\Settings::getDataForSite
(
21
$block->getSiteId()
22
);
23
24
// set predefined
25
\Bitrix\Landing\Node\Component::setPredefineForDynamicProps
(
array
(
26
'IBLOCK_ID'
=>
$settings
[
'IBLOCK_ID'
],
27
'USE_ENHANCED_ECOMMERCE'
=>
'Y'
,
28
'SHOW_DISCOUNT_PERCENT'
=>
'Y'
,
29
'LABEL_PROP'
=>
array
(
30
'NEWPRODUCT'
,
31
'SALELEADER'
,
32
'SPECIALOFFER'
33
),
34
'CONVERT_CURRENCY'
=>
'Y'
,
35
'LANDING_MODE'
=>
'Y'
36
));
37
38
if
(
39
isset(
$params
[
'required'
]) &&
40
$params
[
'required'
] ==
'catalog'
41
)
42
{
43
// check catalog
44
$settings
=
\Bitrix\Landing\Hook\Page\Settings::getDataForSite
(
45
$block->getSiteId()
46
);
47
if
(!
$settings
[
'IBLOCK_ID'
])
48
{
49
$manifest[
'requiredUserAction'
] =
array
(
50
'header'
=> Loc::getMessage(
'LANDING_BLOCK_EMPTY_CATLOG_TITLE'
),
51
'description'
=> Loc::getMessage(
'LANDING_BLOCK_EMPTY_CATLOG_DESC'
),
52
'text'
=> Loc::getMessage(
'LANDING_BLOCK_EMPTY_CATLOG_LINK'
),
53
'href'
=>
'#page_url_catalog_edit'
,
54
'className'
=>
'landing-required-link'
55
);
56
}
57
else
if
(
58
!\
Bitrix
\
Main
\
ModuleManager::isModuleInstalled
(
'bitrix24'
) &&
59
\
Bitrix
\
Main
\
Loader::includeModule
(
'iblock'
) &&
60
!\
Bitrix
\
Iblock
\
Model
\PropertyFeature::isEnabledFeatures()
61
)
62
{
63
$manifest[
'requiredUserAction'
] =
array
(
64
'header'
=> Loc::getMessage(
'LANDING_BLOCK_EMPTY_CATLOG_TITLE'
),
65
'description'
=> Loc::getMessage(
'LANDING_BLOCK_CATALOG_CONFIG_FEATURE'
),
66
'text'
=> Loc::getMessage(
'LANDING_BLOCK_EMPTY_CATLOG_LINK'
),
67
'href'
=>
'/bitrix/admin/settings.php?lang='
. LANGUAGE_ID .
'&mid=iblock'
,
68
'className'
=>
'landing-required-link'
69
);
70
}
71
// add settings link
72
if
(
$settings
[
'IBLOCK_ID'
] && !isset($manifest[
'requiredUserAction'
]))
73
{
74
if
(
75
!isset($manifest[
'block'
]) ||
76
!is_array($manifest[
'block'
])
77
)
78
{
79
$manifest[
'block'
] =
array
();
80
}
81
if
(
Manager::isB24
())
82
{
83
$link =
'/shop/settings/menu_catalog_'
.
$settings
[
'IBLOCK_ID'
] .
'/'
;
84
}
85
else
if
(\
Bitrix
\
Main
\
Loader::includeModule
(
'iblock'
))
86
{
87
if
(
$iblock
= \CIBlock::getById(
$settings
[
'IBLOCK_ID'
])->fetch())
88
{
89
$link =
'/bitrix/admin/cat_product_list.php?IBLOCK_ID='
.
$iblock
[
'ID'
] .
90
'&type='
.
$iblock
[
'IBLOCK_TYPE_ID'
] .
'&lang='
. LANGUAGE_ID .
91
'&find_section_section=-1'
;
92
}
93
}
94
if
(isset($link))
95
{
96
$manifest[
'block'
][
'attrsFormDescription'
] =
'<a href="'
. $link .
'" target="_blank">'
.
97
Loc::getMessage(
'LANDING_BLOCK_CATALOG_CONFIG'
) .
98
'</a>'
;
99
}
100
}
101
}
102
103
return
$manifest;
104
}
105
}
Bitrix\Landing\Connector\Iblock
Определения
iblock.php:7
Bitrix\Landing\Hook\Page\Settings\getDataForSite
static getDataForSite($id=null)
Определения
settings.php:371
Bitrix\Landing\Manager\isB24
static isB24()
Определения
manager.php:1135
Bitrix\Landing\Node\Component\setPredefineForDynamicProps
static setPredefineForDynamicProps(array $additionalVals)
Определения
component.php:33
Bitrix\Landing\Subtype\Component\prepareManifest
static prepareManifest(array $manifest, \Bitrix\Landing\Block $block=null, array $params=array())
Определения
component.php:18
Bitrix\Main\Loader\includeModule
static includeModule($moduleName)
Определения
loader.php:67
Bitrix\Main\ModuleManager\isModuleInstalled
static isModuleInstalled($moduleName)
Определения
modulemanager.php:125
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
$iblock
if(! $catalogEdit->isSuccess()) $iblock
Определения
iblock_catalog_edit.php:38
Bitrix\Landing\Block
Определения
blockrepo.php:3
Bitrix\Landing\Copilot\Model
Определения
GenerationsTable.php:4
Bitrix\Landing
Определения
agent.php:3
Bitrix\Main\Component
Определения
baseufcomponent.php:3
Bitrix\Main
Bitrix
$settings
$settings
Определения
product_settings.php:43
$params
if($inWords) echo htmlspecialcharsbx(Number2Word_Rus(roundEx($totalVatSum $params['CURRENCY']
Определения
template.php:799
bitrix
modules
landing
lib
subtype
component.php
Создано системой
1.14.0