Example #1
0
 /**
  * Deletes the object from database
  *
  * @return void
  */
 public function delete()
 {
     try {
         $this->db->delete("documents_snippet", $this->db->quoteInto("id = ?", $this->model->getId()));
         parent::delete();
     } catch (Exception $e) {
         throw $e;
     }
 }
Example #2
0
 /**
  * Deletes the object (and data) from database
  *
  * @return void
  */
 public function delete()
 {
     try {
         $this->deleteAllProperties();
         $this->db->delete("documents_page", $this->db->quoteInto("id = ?", $this->model->getId()));
         $this->db->delete("documents_email", $this->db->quoteInto("id = ?", $this->model->getId()));
         //deleting log files
         $mailLogs = new Document_Email_Log_List();
         $mailLogs->setCondition(" documentId= " . $this->model->getId());
         foreach ($mailLogs->load() as $logEntry) {
             $logEntry->delete();
         }
         parent::delete();
     } catch (Exception $e) {
         throw $e;
     }
 }
Example #3
0
 /**
  * Deletes the object (and data) from database
  *
  * @return void
  */
 public function delete()
 {
     try {
         $this->deleteAllProperties();
         $this->db->delete("documents_page", $this->db->quoteInto("id = ?", $this->model->getId()));
         parent::delete();
     } catch (Exception $e) {
         throw $e;
     }
 }