本文整理汇总了PHP中Blog::delete方法的典型用法代码示例。如果您正苦于以下问题:PHP Blog::delete方法的具体用法?PHP Blog::delete怎么用?PHP Blog::delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Blog
的用法示例。
在下文中一共展示了Blog::delete方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: delete
public function delete()
{
$Blog = new Blog($this->plural_resorce, $this->option, $this->db);
$sql = $Blog->delete();
var_dump($sql);
mysqli_query($this->db, $sql) or die(mysqli_error($this->db));
header('Location:../index');
exit;
}
示例2: getGS
}
$f_action = Input::Get('f_action', 'string');
if (!camp_blog_permission_check($f_action)) {
echo getGS('You do not have the right to perform this action.');
exit;
}
switch ($f_action) {
case 'blogs_delete':
$f_blogs = Input::Get('f_blogs', 'array');
foreach ($f_blogs as $blog_id) {
$Blog = new Blog($blog_id);
$Blog->delete();
}
break;
case 'entries_delete':
$f_entries = Input::Get('f_entries', 'array');
foreach ($f_entries as $entry_id) {
$BlogEntry = new BlogEntry($entry_id);
$BlogEntry->delete();
}
break;
case 'comments_delete':
$f_comments = Input::Get('f_comments', 'array');
示例3: delete
public function delete($id)
{
//モデルを呼び出す
$blog = new Blog();
$this->deleteOptions = $blog->delete($id);
header('Location: /seed_blog/blogs/index');
}
示例4: delete
public function delete($id)
{
$blog = new Blog();
$blog->delete($id);
// indexへ遷移
header('Location: /seed_blog/blogs/index/');
}
示例5: delete
public function delete($id)
{
$blog = new Blog();
$this->viewOptions = $blog->delete($id);
// var_dump($this->viewOptions);
// アクション名を設定する
// $this->action ='edit';
// indexへ遷移
header('Location: /seed_blog/blogs/index/');
}
示例6: testDeleteInstanceOnNewModel
/**
* @expectedException SimpleAR\Exception
*/
public function testDeleteInstanceOnNewModel()
{
// Cannot delete a new model instance.
$blog = new Blog();
$blog->delete();
}