• Модуль: catalog
  • Путь к файлу: ~/bitrix/modules/catalog/lib/v2/Sku/SkuCollection.php
  • Класс: BitrixCatalogv2SkuSkuCollection
  • Вызов: SkuCollection::createEntity
protected function createEntity(): BaseSku
{
	/** @var BitrixCatalogv2ProductBaseProduct $parent */
	$parent = $this->getParent();

	if ($parent && $parent->isSimple())
	{
		$type = SkuFactory::SIMPLE_SKU;
	}
	else
	{
		$type = SkuFactory::SKU;
	}

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