1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
productsettings.php
См. документацию.
1
<?php
2
3
namespace
Bitrix\Catalog\Grid\Settings
;
4
5
use
Bitrix\Iblock\Grid\Entity\ElementSettings
;
6
use
Bitrix\Main\Loader
;
7
use CCatalogSku;
8
9
Loader::requireModule(
'iblock'
);
10
11
class
ProductSettings
extends
ElementSettings
12
{
13
private
?
int
$offersIblockId =
null
;
14
private
?
int
$skuPropertyId =
null
;
15
16
protected
function
init
(): void
17
{
18
parent::init();
19
20
$catalog
= CCatalogSku::GetInfoByIBlock($this->
getIblockId
());
21
if
(!empty(
$catalog
))
22
{
23
$type
=
$catalog
[
'CATALOG_TYPE'
];
24
25
if
(
26
$type
=== CCatalogSku::TYPE_FULL
27
||
$type
=== CCatalogSku::TYPE_PRODUCT
28
)
29
{
30
$this->offersIblockId =
$catalog
[
'IBLOCK_ID'
];
31
$this->skuPropertyId =
$catalog
[
'SKU_PROPERTY_ID'
];
32
}
33
}
34
}
35
36
public
function
isAllowedIblockSections
(): bool
37
{
38
return
false
;
39
}
40
41
public
function
getOffersIblockId
(): ?int
42
{
43
return
$this->offersIblockId;
44
}
45
46
public
function
getSkuPropertyId
(): ?int
47
{
48
return
$this->skuPropertyId;
49
}
50
}
$type
$type
Определения
options.php:106
Bitrix\Catalog\Grid\Settings\ProductSettings
Определения
productsettings.php:12
Bitrix\Catalog\Grid\Settings\ProductSettings\init
init()
Определения
productsettings.php:16
Bitrix\Catalog\Grid\Settings\ProductSettings\getSkuPropertyId
getSkuPropertyId()
Определения
productsettings.php:46
Bitrix\Catalog\Grid\Settings\ProductSettings\getOffersIblockId
getOffersIblockId()
Определения
productsettings.php:41
Bitrix\Catalog\Grid\Settings\ProductSettings\isAllowedIblockSections
isAllowedIblockSections()
Определения
productsettings.php:36
Bitrix\Iblock\Grid\Entity\ElementSettings
Определения
elementsettings.php:9
Bitrix\Iblock\Grid\Entity\IblockSettings\getIblockId
getIblockId()
Определения
iblocksettings.php:71
Bitrix\Main\Loader
Определения
loader.php:13
$catalog
$catalog
Определения
iblock_catalog_edit.php:135
Bitrix\Catalog\Grid\Settings
Определения
productsettings.php:3
bitrix
modules
catalog
lib
grid
settings
productsettings.php
Создано системой
1.14.0