44 if ($entity ===
"property")
48 if ($this->fields[
"IBLOCK_ID"] > 0)
51 $this->
property->setIblockId($this->fields[
"IBLOCK_ID"]);
58 elseif ($entity ===
"iblock")
62 if ($this->fields[
"IBLOCK_ID"] > 0)
63 $this->iblock =
new Iblock($this->fields[
"IBLOCK_ID"]);
69 elseif ($entity ===
"parent")
73 if ($this->fields[
"IBLOCK_SECTION_ID"] > 0)
74 $this->parent =
new Section($this->fields[
"IBLOCK_SECTION_ID"]);
76 return $this->
resolve(
"iblock");
82 elseif ($entity ===
"sections")
86 if ($this->fields[
"IBLOCK_SECTION_ID"] > 0)
87 $this->sections =
new SectionPath($this->fields[
"IBLOCK_SECTION_ID"]);
93 elseif ($entity ===
"catalog")
97 if (\
Bitrix\Main\Loader::includeModule(
'catalog'))
104 return parent::resolve($entity);
116 parent::setFields($fields);
118 is_array($this->fields)
119 && $this->fields[
"IBLOCK_ID"] > 0
122 $properties = array();
123 foreach ($this->fields as $id => $value)
125 if (mb_substr($id, 0, 3) ===
"UF_")
126 $properties[$id] = $value;
129 $this->
property->setIblockId($this->fields[
"IBLOCK_ID"]);
130 $this->
property->setFields($properties);
132 $this->iblock =
new Iblock($fields[
"IBLOCK_ID"]);
135 isset($fields[
"IBLOCK_SECTION_ID"])
136 && $fields[
"IBLOCK_SECTION_ID"] > 0
139 $this->parent =
new Section($fields[
"IBLOCK_SECTION_ID"]);
140 $this->sections =
new SectionPath($fields[
"IBLOCK_SECTION_ID"]);
143 if (\
Bitrix\Main\Loader::includeModule(
'catalog'))