/** * @name deleteProduit($pId) * @param integer * @desc Supprime un ProduitAbonnementVO */ public function deleteProduit($pId) { $lAbonnementValid = new AbonnementValid(); if ($lAbonnementValid->deleteProduit($pId)) { // Suppression des lots $lLots = LotAbonnementManager::selectByIdProduitAbonnement($pId); foreach ($lLots as $lLot) { $lLot->setEtat(1); LotAbonnementManager::update($lLot); } $lListeAbonnement = $this->getAbonnesProduit($pId); // Supression des abonnements foreach ($lListeAbonnement as $lAbonnement) { $this->deleteAbonnement($lAbonnement->getCptAboId()); } $lProduitAbonnementVO = $this->getProduit($pId); $lProduitAbonnementVO->setEtat(1); return ProduitAbonnementManager::update($lProduitAbonnementVO); } else { return false; } }