Product::perfGetList

  1. Bitrix24 API (v. 23.675.0)
  2. catalog
  3. Product
  4. perfGetList
  • Модуль: catalog
  • Путь к файлу: ~/bitrix/modules/catalog/lib/controller/product.php
  • Класс: BitrixCatalogControllerProduct
  • Вызов: Product::perfGetList
protected function perfGetList(array $select, array $filter, array $order, $pageNavigation = null): array
{
	$rawRows = [];
	$elementIds = [];

	$rsData = CIBlockElement::GetList(
		$order,
		$filter,
		false,
		$pageNavigation ?? false,
		array('ID', 'IBLOCK_ID')
	);
	while($row = $rsData->Fetch())
	{
		$rawRows[$row['ID']] = $row;
		$elementIds[] = $row['ID'];
	}

	foreach (array_chunk($elementIds, IRestService::LIST_LIMIT) as $pageIds)
	{
		$elementFilter = [
			'IBLOCK_ID' => $filter['IBLOCK_ID'],
			'ID' => $pageIds,
		];
		$iterator = CIBlockElement::GetList([], $elementFilter, false, false, $select);
		while ($row = $iterator->Fetch())
		{
			$rawRows[$row['ID']] += $row;
		}
	}

	return $rawRows;
}

Добавить комментарий