• Модуль: iblock
  • Путь к файлу: ~/bitrix/modules/iblock/lib/Integration/UI/Grid/General/BaseProvider.php
  • Класс: BitrixIblockIntegrationUIGridGeneralBaseProvider
  • Вызов: BaseProvider::getRows
protected function getRows(): array
{
	$result = $this->rows ?? [];

	$templateRow = $this->getTemplateRow();
	if (isset($templateRow))
	{
		$templateRowId = 'template_0';

		$isHasTemplateRow = false;
		foreach ($result as $row)
		{
			if ($row['id'] === $templateRowId)
			{
				$isHasTemplateRow = true;

				break;
			}
		}

		if (!$isHasTemplateRow)
		{
			$templateRow['id'] = $templateRowId;
			array_unshift($result, $templateRow);
		}
	}

	return $result;
}