/** * Checks if the same exact value has already been processed on a different product instance * * When validates values for a VariantGroup there is not product related to the value * * @param ProductValueInterface $productValue * * @return bool */ protected function hasAlreadyValidatedTheSameValue(ProductValueInterface $productValue) { if (null !== $productValue->getProduct()) { return false === $this->uniqueValuesSet->addValue($productValue); } return false; }
/** * Reset the Unique Value Set. * Called on StorageEvents::POST_SAVE_ALL */ public function onAkeneoStoragePostsaveall() { $this->uniqueValueSet->reset(); }