/** * Remove a variant group * * @param string $code * * @AclAncestor("pim_enrich_group_remove") * * @return JsonResponse */ public function removeAction($code) { $variantGroup = $this->repository->findOneByIdentifier($code); if (null === $variantGroup) { throw new NotFoundHttpException(sprintf('Variant group with code "%s" not found', $code)); } $this->remover->remove($variantGroup); return new JsonResponse(); }