/** * Handle deletion of families that are not in PIM anymore * * @param string $name * @param int $id */ protected function handleFamilyNotInPimAnymore($name, $id) { if (!$this->familyMappingManager->magentoFamilyExists($id, $this->getSoapUrl()) && !in_array($name, $this->getIgnoredFamilies())) { $this->webservice->removeAttributeSet($id); $this->stepExecution->incrementSummaryInfo(self::FAMILY_DELETED); } }
/** * Handle deletion of families that are not in PIM anymore. * * @param string $name * @param int $id * * @throws InvalidItemException */ protected function handleFamilyNotInPimAnymore($name, $id) { if ($this->notInPimAnymoreAction === self::DELETE && !$this->familyMappingManager->magentoFamilyExists($id, $this->getSoapUrl()) && !in_array($name, $this->getIgnoredFamilies())) { try { $this->webservice->removeAttributeSet($id, $this->forceAttributeSetRemoval); $this->stepExecution->incrementSummaryInfo('family_deleted'); } catch (SoapCallException $e) { throw new InvalidItemException($e->getMessage(), [$id], [$e]); } } }