if (!
empty($data['__productAttribute_id'
])) { $this->
assignAttributeData($product,
$data);
} return $product;
} private function assignPriceGroupData(ListProduct
$product, array
$data): void
{ if (!
empty($data['__priceGroup_id'
])) { $product->
setPriceGroup(new PriceGroup());
$product->
getPriceGroup()->
setId((int) $data['__priceGroup_id'
]);
$product->
getPriceGroup()->
setName($data['__priceGroup_description'
]);
} } /**
* Helper function which assigns the shopware article
* data to the product. (data of s_articles)
*/
private function assignProductData(ListProduct
$product, array
$data): void
{