public static function delete($id) { $std = (object) array('success' => false, 'msg' => array()); $motCleDAO = new MotCleDAO(BDD::getInstancePDO()); $motCle = $motCleDAO->getOne($id); if (($std->success = $motCleDAO->delete($id)) === true) { $std->msg[] = 'Mot clé supprimé avec succès'; } else { $std->msg[] = 'Erreur BDD'; } $actionDAO = new ActionDAO(BDD::getInstancePDO()); $action = new Action(array('id_action' => DAO::UNKNOWN_ID, 'libelle' => "Suppression d\\'un mot clé (mot clé n°{$id} : {$motCle->label})", 'id_membre' => $_SESSION['user']->id_membre)); $actionDAO->save($action); return $std; }