Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
elementsettings.php
1<?php
2
4
7
9{
10 private int $iblockId;
11 private bool $showSections = true;
12 private bool $showXmlId = false;
13
14 public function __construct(array $params)
15 {
16 parent::__construct($params);
17
18 if (!isset($params['IBLOCK_ID']))
19 {
20 throw new ArgumentException('Params array must be contains "IBLOCK_ID" value');
21 }
22
23 $this->iblockId = $params['IBLOCK_ID'];
24
25 if (isset($params['SHOW_SECTIONS']))
26 {
27 $this->showSections = $params['SHOW_SECTIONS'];
28 }
29
30 if (isset($params['SHOW_XML_ID']))
31 {
32 $this->showXmlId = $params['SHOW_XML_ID'];
33 }
34 }
35
36 public function getIblockId(): int
37 {
38 return $this->iblockId;
39 }
40
41 public function isShowSections(): bool
42 {
43 return $this->showSections;
44 }
45
46 public function isShowXmlId(): bool
47 {
48 return $this->showXmlId;
49 }
50}