本文整理汇总了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();
}
示例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();
}
示例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;
}
示例4: delete
public function delete()
{
$db = Loader::db();
$db->query("DELETE FROM btGithubRepositories WHERE bID = ?", array(intval($this->bID)));
parent::delete();
}
示例5: delete
function delete()
{
$db = Loader::db();
$db->query("DELETE FROM btSlideshowImg WHERE bID=" . intval($this->bID));
parent::delete();
}