public function reverseTransform($values)
{
if (null === $values || '' === $values || !is_array($values)) {
return null;
}
$productAssociations = new ArrayCollection();
foreach ($values as $productAssociationTypeCode => $productIds) {
if (null === $productIds) {
continue;
}
/** @var ProductAssociationInterface $productAssociation */
$productAssociation = $this->getProductAssociationByTypeCode($productAssociationTypeCode);
$this->setAssociatedProductsByProductIds($productAssociation, $productIds);
$productAssociations->add($productAssociation);
}
$this->setProductAssociations(null);
return $productAssociations;
}