• Модуль: catalog
  • Путь к файлу: ~/bitrix/modules/catalog/lib/component/productform.php
  • Класс: BitrixCatalogComponentProductForm
  • Вызов: ProductForm::getIblockSectionServiceFieldValue
private function getIblockSectionServiceFieldValue(array $values): array
{
	$sectionData = [];

	$sections = $values['IBLOCK_SECTION'] ?? [];
	$sections = array_diff($sections, [0]);

	if (!empty($sections))
	{
		$sectionList = CIBlockSection::GetList(
			[],
			['ID' => $sections],
			false,
			['ID', 'NAME', 'PICTURE']
		);
		while ($section = $sectionList->Fetch())
		{
			$picture = CFile::resizeImageGet(
				$section['PICTURE'],
				['width' => 100, 'height' => 100],
				BX_RESIZE_IMAGE_EXACT,
				false
			);
			$section['PICTURE'] = $picture['src'] ?? null;
			$sectionData[] = $section;
		}
	}

	return $sectionData;
}