Exemple #1
0
 public function delete()
 {
     $db = Database::connection();
     $params = array($this->bID);
     $query = "DELETE FROM btTextListEntries WHERE bID = ?";
     $db->query($query, $params);
     parent::delete();
 }
Exemple #2
0
 public function delete()
 {
     $arLayout = $this->getAreaLayoutObject();
     if (is_object($arLayout)) {
         $arLayout->delete();
     }
     parent::delete();
 }
Exemple #3
0
 public function delete()
 {
     $db = Database::connection();
     $v = array($this->bID);
     $q = "DELETE FROM btSurveyOptions WHERE bID = ?";
     $db->query($q, $v);
     $q = "DELETE FROM btSurveyResults WHERE bID = ?";
     $db->query($q, $v);
     parent::delete();
 }
 function delete()
 {
     $db = Loader::db();
     $v = array($this->bID);
     $q = "DELETE FROM btSurveyOptions WHERE bID = ?";
     $db->query($q, $v);
     $q = "DELETE FROM btSurveyResults WHERE bID = ?";
     $db->query($q, $v);
     return parent::delete();
 }
 public function delete()
 {
     parent::delete();
     $entity = $this->getFormEntity()->getEntity();
     $entityManager = \Core::make('database/orm')->entityManager();
     // Important – are other blocks in the system using this form? If so, we don't want to delete it!
     $db = $entityManager->getConnection();
     $r = $db->fetchColumn('select count(bID) from btExpressForm where bID <> ? and exFormID = ?', [$this->bID, $this->exFormID]);
     if ($r == 0) {
         $entityManager->remove($entity);
         $entityManager->flush();
     }
 }
Exemple #6
0
 public function delete()
 {
     $db = Loader::db();
     $db->delete('btImageSliderEntries', array('bID' => $this->bID));
     parent::delete();
 }
Exemple #7
0
 public function delete()
 {
     parent::delete();
     if ($this->gaID) {
         $gathering = Gathering::getByID($this->gaID);
         if (is_object($gathering)) {
             $gathering->delete();
         }
     }
 }
Exemple #8
0
 public function delete()
 {
     $db = Database::connection();
     $db->execute('DELETE from btFaqEntries WHERE bID = ?', array($this->bID));
     parent::delete();
 }
Exemple #9
0
 /**
  * Make sure to delete all files associated w/ the block record in secondary table.
  * @return void
  */
 public function delete()
 {
     Loader::db()->Execute("DELETE FROM {$this->btTableSecondary} WHERE bID = ?", array($this->bID));
     return parent::delete();
 }
 public function delete()
 {
     $db = Database::connection();
     $deleteData['questionsIDs'] = [];
     $deleteData['strandedAnswerSetIDs'] = [];
     $miniSurvey = new MiniSurvey();
     $info = $miniSurvey->getMiniSurveyBlockInfo($this->bID);
     //get all answer sets
     $q = "SELECT asID FROM {$this->btAnswerSetTablename} WHERE questionSetId = " . intval($info['questionSetId']);
     $answerSetsRS = $db->query($q);
     //delete the questions
     $deleteData['questionsIDs'] = $db->getAll("SELECT qID FROM {$this->btQuestionsTablename} WHERE questionSetId = " . intval($info['questionSetId']) . ' AND bID=' . intval($this->bID));
     foreach ($deleteData['questionsIDs'] as $questionData) {
         $db->query("DELETE FROM {$this->btQuestionsTablename} WHERE qID=" . intval($questionData['qID']));
     }
     //delete left over answers
     $strandedAnswerIDs = $db->getAll('SELECT fa.aID FROM `btFormAnswers` AS fa LEFT JOIN btFormQuestions as fq ON fq.msqID=fa.msqID WHERE fq.msqID IS NULL');
     foreach ($strandedAnswerIDs as $strandedAnswer) {
         $db->query('DELETE FROM `btFormAnswers` WHERE aID=' . intval($strandedAnswer['aID']));
     }
     //delete the left over answer sets
     $deleteData['strandedAnswerSetIDs'] = $db->getAll('SELECT aset.asID FROM btFormAnswerSet AS aset LEFT JOIN btFormAnswers AS fa ON aset.asID=fa.asID WHERE fa.asID IS NULL');
     foreach ($deleteData['strandedAnswerSetIDs'] as $strandedAnswerSetIDs) {
         $db->query('DELETE FROM btFormAnswerSet WHERE asID=' . intval($strandedAnswerSetIDs['asID']));
     }
     //delete the form block
     $q = "delete from {$this->btTable} where bID = '{$this->bID}'";
     $r = $db->query($q);
     parent::delete();
     return $deleteData;
 }
Exemple #11
0
 public function delete()
 {
     $db = Loader::db();
     $db->delete('btFundamentalSlickSlide', array('bID' => $this->bID));
     parent::delete();
 }
 public function delete()
 {
     Application::getFacadeApplication()->make('statistics/tracker')->forget($this);
     parent::delete();
 }
 public function delete()
 {
     $db = Loader::db();
     $db->execute('DELETE from btFaqEntriesWHERE bID = ?', array($this->bID));
     parent::delete();
 }
Exemple #14
0
 public function delete()
 {
     $db = Loader::db();
     $db->delete('btVividCarouselItem', array('bID' => $this->bID));
     parent::delete();
 }
 /**
  * On delete update the tracker.
  */
 public function delete()
 {
     $this->tracker->forget($this);
     parent::delete();
 }
 public function delete()
 {
     $db = Database::getActiveConnection();
     $db->delete('btManualNavEntries', array('bID' => $this->bID));
     parent::delete();
 }
 public function delete()
 {
     $db = Database::get();
     $db->delete('btImageSliderEntries', array('bID' => $this->bID));
     parent::delete();
     $this->tracker->forget($this);
 }
Exemple #18
0
 public function delete()
 {
     $db = Loader::db();
     $db->delete('btVividSimpleAccordionItem', array('bID' => $this->bID));
     parent::delete();
 }