本文整理汇总了PHP中Tool::delete方法的典型用法代码示例。如果您正苦于以下问题:PHP Tool::delete方法的具体用法?PHP Tool::delete怎么用?PHP Tool::delete使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tool
的用法示例。
在下文中一共展示了Tool::delete方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: delete_tool
public function delete_tool()
{
if ($this->loaded) {
ORM::factory('calendar_item')->where(array('fk_site' => $this->fk_site, 'calendar_id' => $this->id))->delete_all();
return parent::delete($this->id);
}
}
示例2: delete_tool
public function delete_tool()
{
if ($this->loaded) {
ORM::factory('blog_post')->where(array('fk_site' => $this->fk_site, 'blog_id' => $this->id))->delete_all();
ORM::factory('blog_post_tag')->where(array('fk_site' => $this->fk_site, 'blog_id' => $this->id))->delete_all();
ORM::factory('blog_post_comment')->where(array('fk_site' => $this->fk_site, 'blog_id' => $this->id))->delete_all();
return parent::delete($this->id);
}
}
示例3: delete
public function delete($id)
{
if ($id) {
$rs = new Tool($id);
$rs->delete();
set_notify('success', lang('delete_data_complete'));
}
redirect('tools/admin/tools');
}
示例4: delete_tool
public function delete_tool()
{
if ($this->loaded) {
$db = Database::instance();
$db->query("\n DELETE cats.*, items.*\n FROM showroom_cats as cats, showroom_cat_items as items\n WHERE cats.fk_site = '{$this->fk_site}'\n AND cats.showroom_id = '{$this->id}'\n AND cats.id = items.showroom_cat_id\n ");
# hack to remove the root node which has no items on it.
ORM::factory('showroom_cat')->where(array('fk_site' => $this->fk_site, 'showroom_id' => $this->id))->delete_all();
return parent::delete($this->id);
}
}
示例5: delete_tool
public function delete_tool()
{
if ($this->loaded) {
return parent::delete($this->id);
}
}