• Модуль: catalog
  • Путь к файлу: ~/bitrix/modules/catalog/lib/v2/Sku/SkuRepository.php
  • Класс: BitrixCatalogv2SkuSkuRepository
  • Вызов: SkuRepository::makeEntity
protected function makeEntity(array $fields = []): BaseIblockElementEntity
{
	$type = (int)($fields['TYPE'] ?? 0);

	if ($type === ProductTable::TYPE_OFFER || $type === ProductTable::TYPE_FREE_OFFER)
	{
		$entityClass = $this->factory::SKU;
	}
	else
	{
		$entityClass = $this->factory::SIMPLE_SKU;
	}

	return $this->factory->createEntity($entityClass);
}