コード例 #1
0
ファイル: oledrion_commands.php プロジェクト: osw17/oledrion
 /**
  * Supprime une commande et tout ce qui s'y rattache
  *
  * @param  oledrion_commands $order
  * @return boolean
  */
 public function removeOrder(oledrion_commands $order)
 {
     $handlers = oledrion_handler::getInstance();
     $cmd_id = $order->getVar('cmd_id');
     $res = $this->delete($order);
     // Suppression des objets associés
     // 1) Ses propres caddies
     $handlers->h_oledrion_caddy->removeCartsFromOrderId($cmd_id);
     // 2) Les caddies des attributs
     $handlers->h_oledrion_caddy_attributes->removeCartsFromOrderId($cmd_id);
     return $res;
 }