97 if ($this->elementId > 0)
99 $elementList = \Bitrix\Iblock\ElementTable::getList(array(
100 "select" => array(
"IBLOCK_SECTION_ID"),
101 "filter" => array(
"=ID" => $this->elementId),
103 $element = $elementList->fetch();
104 if ($element && $element[
"IBLOCK_SECTION_ID"] > 0)
105 $parents[] =
new SectionValues($this->iblockId, $element[
"IBLOCK_SECTION_ID"]);
109 elseif ($this->sectionId > 0)
111 $parents[] =
new SectionValues($this->iblockId, $this->sectionId);
128 $connection = \Bitrix\Main\Application::getConnection();
132 if ($this->
queue->getElement($this->iblockId, $this->elementId) ===
false)
134 $ids = $this->
queue->get($this->iblockId);
135 $query = $connection->query(
"
145 b_iblock_element_iprop IP
146 INNER JOIN b_iblock_iproperty P ON P.ID = IP.IPROP_ID
148 IP.IBLOCK_ID = ".$this->iblockId.
"
149 AND IP.ELEMENT_ID in (".implode(
", ", $ids).
")
152 while ($row = $query->fetch())
154 $result[$row[
"ELEMENT_ID"]][$row[
"CODE"]] = $row;
156 $this->
queue->set($this->iblockId, $result);
158 $result = $this->
queue->getElement($this->iblockId, $this->elementId);
162 $result = parent::queryValues();
165 $sqlHelper = $connection->getSqlHelper();
166 $elementList = \Bitrix\Iblock\ElementTable::getList(array(
167 "select" => array(
"IBLOCK_SECTION_ID"),
168 "filter" => array(
"=ID" => $this->elementId),
170 $element = $elementList->fetch();
171 $element[
'IBLOCK_SECTION_ID'] = (int)$element[
'IBLOCK_SECTION_ID'];
181 foreach ($result as $CODE => $row)
185 $element[
"IBLOCK_SECTION_ID"],
188 $sqlHelper->forSql($row[
"VALUE"]),
191 $this->
insertValues(
"b_iblock_element_iprop", $fields, $rows);