Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
productsettings.php
1<?php
2
4
7
8Loader::requireModule('iblock');
9
11{
12 private ?int $variationIblockId = null;
13 private ?int $linkPropertyId = null;
14
15 public function __construct(array $params)
16 {
17 parent::__construct($params);
18
19 $this->variationIblockId = $params['VARIATION_IBLOCK_ID'] ?? null;
20 $this->linkPropertyId = $params['LINK_PROPERTY_ID'] ?? null;
21 if ($this->variationIblockId === null || $this->linkPropertyId === null)
22 {
23 $this->variationIblockId = null;
24 $this->linkPropertyId = null;
25 }
26 }
27
28 public function getVariationIblockId(): ?int
29 {
30 return $this->variationIblockId;
31 }
32
33 public function getLinkPropertyId(): ?int
34 {
35 return $this->linkPropertyId;
36 }
37
38 public function getCatalogIblockId(): int
39 {
40 return $this->getIblockId();
41 }
42
43 public function isWithVariations(): bool
44 {
45 return $this->getVariationIblockId() !== null;
46 }
47}