protected function getProductEmulator($typeId) { if (!isset($this->productEmulators[$typeId])) { $productEmulator = new \Magento\Framework\DataObject(); $productEmulator->setTypeId($typeId); $this->productEmulators[$typeId] = $productEmulator; } return $this->productEmulators[$typeId]; }