39 if (!isset($this->fields))
42 $select = array_values($this->fieldMap);
43 $this->dbPath = array();
47 $sectionList = \Bitrix\Iblock\SectionTable::getList(array(
49 "filter" => array(
"=ID" => $id),
51 $section = $sectionList->fetch();
53 $this->dbPath[] = $section;
56 $id = $section[
"IBLOCK_SECTION_ID"];
60 $this->fields = array();
61 for($i = count($this->dbPath)-1; $i >= 0; $i--)
63 foreach($this->dbPath[$i] as $fieldName => $fieldValue)
65 $this->fields[$fieldName][] = $fieldValue;
70 return is_array($this->fields);
81 global $USER_FIELD_MANAGER;
83 foreach ($this->fields[
"ID"] as $i => $sectionId)
85 $userFields = $USER_FIELD_MANAGER->getUserFields(
86 "IBLOCK_".$this->fields[
"IBLOCK_ID"][$i].
"_SECTION",
89 foreach ($userFields as $id => $uf)
93 $fieldCode =
"property.".mb_strtolower(mb_substr($id, 3));
94 $this->fieldMap[$fieldCode] = $propertyCode;
95 if (is_array($uf[
"VALUE"]))
97 foreach ($uf[
"VALUE"] as $value)
98 $this->fields[$propertyCode][] = $value;
102 $this->fields[$propertyCode][] = $uf[
"VALUE"];