• Модуль: iblock
  • Путь к файлу: ~/bitrix/modules/iblock/lib/grid/row/assembler/sectioncountfieldassembler.php
  • Класс: BitrixIblockGridRowAssemblerSectionCountFieldAssembler
  • Вызов: SectionCountFieldAssembler::prepareRow
protected function prepareRow(array $row): array
{
	$value = '';

	$id = (int)($row['data']['ID'] ?? 0);
	$rowType = $row['data']['ROW_TYPE'] ?? null;
	if ($id > 0 && $rowType === RowType::SECTION)
	{
		$value = CIBlockSection::GetCount([
			'IBLOCK_ID' => $this->iblockId,
			'SECTION_ID' => $id,
		]);
	}

	$row['columns'] ??= [];
	$row['columns']['SECTION_CNT'] = $value;

	return $row;
}