ProductSelectorFieldAssembler::prepareRows

  1. Bitrix24 API (v. 23.675.0)
  2. catalog
  3. ProductSelectorFieldAssembler
  4. prepareRows
  • Модуль: catalog
  • Путь к файлу: ~/bitrix/modules/catalog/lib/grid/row/assembler/productselectorfieldassembler.php
  • Класс: BitrixCatalogGridRowAssemblerProductSelectorFieldAssembler
  • Вызов: ProductSelectorFieldAssembler::prepareRows
public function prepareRows(array $rowList): array
{
	foreach ($rowList as $index => $rowItem)
	{
		$type = $rowItem['data']['ROW_TYPE'] ?? null;
		if (!isset($type))
		{
			continue;
		}

		foreach ($this->getColumnIds() as $columnId)
		{
			if ($type !== RowType::ELEMENT || $this->getSettings()->isExcelMode())
			{
				$rowList[$index]['columns'][$columnId] = $rowItem['columns']['NAME'] ?? $rowItem['data']['NAME'];
			}
			else
			{
				$rowList[$index]['columns'][$columnId] = $this->getProductSelectorHtml($rowList[$index]['data']);
			}
		}
	}

	return $rowList;
}

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