示例#1
0
 public function deleteObjet()
 {
     if ($this->getType() == 'core') {
         throw new Exception('Vous ne pouvez pas supprimer le core de Jeedom');
     } else {
         try {
             $market = market::byLogicalIdAndType($this->getLogicalId(), $this->getType());
         } catch (Exception $e) {
             $market = new market();
             $market->setLogicalId($this->getLogicalId());
             $market->setType($this->getType());
         }
         try {
             if (is_object($market)) {
                 $market->remove();
             }
         } catch (Exception $e) {
         }
         $this->remove();
     }
 }