本文整理匯總了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);
}
}