• Модуль: iblock
  • Путь к файлу: ~/bitrix/modules/iblock/lib/component/grid/gridcomponent.php
  • Класс: BitrixIblockComponentGridGridComponent
  • Вызов: GridComponent::initRows
protected function initRows(): void
{
	$params = [
		'select' => $this->getRowsSelect(),
		'filter' => $this->getRowsFilter(),
		'order' => $this->getRowsSorting(),
	];

	$pagination = $this->getRowsPagination();
	if ($pagination)
	{
		$params['limit'] = $pagination->getLimit();
		$params['offset'] = $pagination->getOffset();
	}

	$rows = [];
	foreach ($this->getRawRows($params) as $row)
	{
		$rows[] = $this->prepareRow($row);
	}

	$this->getGridProvider()->setRows($rows);

	if ($pagination)
	{
		$this->getGridProvider()->setNavObject($pagination);
	}
}