1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
sectionproperty.php
См. документацию.
1
<?php
7
namespace
Bitrix\Iblock\Template\Entity;
8
9
class
SectionProperty
extends
Base
10
{
11
protected
$iblockId
= 0;
12
16
public
function
__construct
($id)
17
{
18
parent::__construct($id);
19
}
20
28
public
function
setIblockId
(
$iblockId
)
29
{
30
$this->iblockId = intval(
$iblockId
);
31
}
32
40
public
function
setFields
(
array
$fields
)
41
{
42
parent::setFields(
$fields
);
43
if
(
44
is_array($this->fields)
45
&& $this->iblockId > 0
46
)
47
{
48
foreach
($this->fields as $id => $value)
49
{
50
if
(mb_substr($id, 0, 3) ===
"UF_"
)
51
{
52
$propertyCode = $id;
53
$fieldCode = mb_strtolower(mb_substr($id, 3));
54
$this->fieldMap[$fieldCode] = $propertyCode;
55
}
56
}
57
}
58
}
59
66
protected
function
loadFromDatabase
()
67
{
69
global
$USER_FIELD_MANAGER
;
70
71
if
(!isset($this->fields) && $this->iblockId > 0)
72
{
73
$userFields =
$USER_FIELD_MANAGER
->getUserFields(
74
"IBLOCK_"
.$this->iblockId.
"_SECTION"
,
75
$this->id
76
);
77
foreach
($userFields as $id => $uf)
78
{
79
$this->addField(mb_substr($id, 3), $id, $uf[
"VALUE"
]);
80
}
81
}
82
return
is_array($this->fields);
83
}
84
}
Bitrix\Iblock\Template\Entity\SectionProperty
Определения
sectionproperty.php:10
Bitrix\Iblock\Template\Entity\SectionProperty\__construct
__construct($id)
Определения
sectionproperty.php:16
Bitrix\Iblock\Template\Entity\SectionProperty\loadFromDatabase
loadFromDatabase()
Определения
sectionproperty.php:66
Bitrix\Iblock\Template\Entity\SectionProperty\$iblockId
$iblockId
Определения
sectionproperty.php:11
Bitrix\Iblock\Template\Entity\SectionProperty\setIblockId
setIblockId($iblockId)
Определения
sectionproperty.php:28
Bitrix\Iblock\Template\Entity\SectionProperty\setFields
setFields(array $fields)
Определения
sectionproperty.php:40
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
$USER_FIELD_MANAGER
global $USER_FIELD_MANAGER
Определения
attempt.php:6
Bitrix\Sale\Services\Base
Определения
concreteproductrestriction.php:3
$fields
$fields
Определения
yandex_run.php:501
bitrix
modules
iblock
lib
template
entity
sectionproperty.php
Создано системой
1.14.0