31 public function create():
BaseSku
36 if ($parent && $parent->isSimple())
39 $converter = $this->container->get(Dependency::PRODUCT_CONVERTER);
40 $converter->convert($parent, $converter::SKU_PRODUCT);
43 $sku = $this->createEntity();
46 if (!$sku->hasName() && $parent->hasName())
48 $sku->setName($parent->getName());
54 protected function createEntity(): BaseSku
59 if ($parent && $parent->isSimple())
68 return $this->factory->createEntity($type);
73 $filter = parent::getAlreadyLoadedFilter();
75 foreach ($this->items as $item)
79 $filter[
'!ID'][] = $item->getId();
92 return parent::getFirst($callback);