當前位置: 首頁>>代碼示例>>PHP>>正文


PHP BlockController::delete方法代碼示例

本文整理匯總了PHP中BlockController::delete方法的典型用法代碼示例。如果您正苦於以下問題:PHP BlockController::delete方法的具體用法?PHP BlockController::delete怎麽用?PHP BlockController::delete使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在BlockController的用法示例。


在下文中一共展示了BlockController::delete方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: delete

		function delete() {
			$ip = Loader::helper('validation/ip');
			if (!$ip->check()) {
				$this->set('invalidIP', $ip->getErrorMessage());			
				return;
			}
			$c = Page::getCurrentPage();
			$E = new GuestBookBlockEntry($this->bID, $c->getCollectionID());
			$bo = $this->getBlockObject();
			$E->removeAllEntries( $c->getCollectionID() );
			parent::delete();
		}
開發者ID:nveid,項目名稱:concrete5,代碼行數:12,代碼來源:guestbook.php

示例2: 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();
 }
開發者ID:VonUniGE,項目名稱:concrete5-1,代碼行數:10,代碼來源:controller.php

示例3: delete

 function delete()
 {
     $db = Loader::db();
     $deleteData['questionsIDs'] = array();
     $deleteData['strandedAnswerSetIDs'] = array();
     $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 $strandedAnswerIDs) {
         $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;
 }
開發者ID:ojalehto,項目名稱:concrete5-legacy,代碼行數:31,代碼來源:form.php

示例4: delete

 public function delete()
 {
     $db = Loader::db();
     $db->query("DELETE FROM btGithubRepositories WHERE bID = ?", array(intval($this->bID)));
     parent::delete();
 }
開發者ID:holyshared,項目名稱:developer-package,代碼行數:6,代碼來源:controller.php

示例5: delete

 function delete()
 {
     $db = Loader::db();
     $db->query("DELETE FROM btSlideshowImg WHERE bID=" . intval($this->bID));
     parent::delete();
 }
開發者ID:ricardomccerqueira,項目名稱:rcerqueira.portfolio,代碼行數:6,代碼來源:slideshow.php


注:本文中的BlockController::delete方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。