1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
sectionproperty.php
См. документацию.
1<?php
7namespace Bitrix\Iblock\Template\Entity;
8
9class 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 {
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}
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
global $USER_FIELD_MANAGER
Определения attempt.php:6
$fields
Определения yandex_run.php:501