当前位置: 首页>>代码示例>>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;未经允许,请勿转载。