protected getProductTypeInstance ( string $typeId ) : Magento\Catalog\Model\Product\Type\AbstractType | ||
$typeId | string | Type identifier. |
return | Magento\Catalog\Model\Product\Type\AbstractType |
protected function getProductTypeInstance($typeId)
{
if (!isset($this->productTypes[$typeId])) {
$productEmulator = $this->getProductEmulator($typeId);
$this->productTypes[$typeId] = $this->catalogProductType->factory($productEmulator);
}
return $this->productTypes[$typeId];
}