12 abstract protected function getIblockId(): int;
20 if ($isSelectedAllRows)
41 private function getPageSize(): int
49 'IBLOCK_ID' => $this->getIblockId(),
50 'CHECK_PERMISSIONS' =>
'Y',
51 'MIN_PERMISSION' =>
'R',
61 $itemFilter += $filter->getValue();
67 $iterator = $this->getItemsList([
69 'filter' => $itemFilter,
71 while ($row = $iterator->Fetch())
73 $id = (int)$row[
'ID'];
83 unset($row, $iterator);
85 return [$elementIds, $sectionIds];
91 $select = array_values(array_unique($select));
97 $itemFilter += $filter->getValue();
103 $iterator = $this->getItemsList([
105 'filter' => $itemFilter,
107 while ($row = $iterator->Fetch())
109 $row[
'ID'] = (int)$row[
'ID'];
119 unset($row, $iterator);
121 return [$elements, $sections];
128 if ($filter !==
null)
130 $itemFilter += $filter->getValue();
135 $iterator = \CIBlockElement::GetList(
142 while ($row = $iterator->Fetch())
144 $elementIds[] = (int)$row[
'ID'];
146 unset($row, $iterator);
153 if (empty($elementIds))
162 foreach (array_chunk($elementIds, $this->getPageSize()) as $pageIds)
164 $itemFilter[
'ID'] = $pageIds;
165 $iterator = \CIBlockElement::GetList(
172 while ($row = $iterator->Fetch())
174 $result[] = (int)$row[
'ID'];
176 unset($row, $iterator);
184 if (empty($sectionIds))
193 foreach (array_chunk($sectionIds, $this->getPageSize()) as $pageIds)
195 $itemFilter[
'ID'] = $pageIds;
196 $iterator = \CIBlockSection::GetList(
202 while ($row = $iterator->Fetch())
204 $result[] = (int)$row[
'ID'];
206 unset($row, $iterator);
214 if (empty($elementIds))
219 $select = array_values(array_unique($select));
225 foreach (array_chunk($elementIds, $this->getPageSize()) as $pageIds)
227 $itemFilter[
'ID'] = $pageIds;
228 $iterator = \CIBlockElement::GetList(
235 while ($row = $iterator->Fetch())
237 $row[
'ID'] = (int)$row[
'ID'];
240 unset($row, $iterator);
248 if (empty($sectionIds))
253 $select = array_values(array_unique($select));
259 foreach (array_chunk($sectionIds, $this->getPageSize()) as $pageIds)
261 $itemFilter[
'ID'] = $pageIds;
262 $iterator = \CIBlockSection::GetList(
268 while ($row = $iterator->Fetch())
270 $row[
'ID'] = (int)$row[
'ID'];
273 unset($row, $iterator);
279 private function getItemsList(array $params): \CDBResult
283 $iterator = \CIBlockSection::GetMixedList(
292 $iterator = \CIBlockElement::GetList(
static parseIndexList(array $ids)
getElementIdsByFilter(?Filter $filter=null)
getElementsByIdList(array $select, array $elementIds)
prepareItemIds(HttpRequest $request, bool $isSelectedAllRows, ?Filter $filter=null)
getSectionsByIdList(array $select, array $sectionIds)
validateElementIds(array $elementIds)
getItemsByFilter(array $select, ?Filter $filter=null)
getItemIdsByFilter(?Filter $filter=null)
getRequestRows(HttpRequest $request)
validateSectionIds(array $sectionIds)