public function delete() { if ($this->asa('workflow') !== null) { $this->changeStatus(self::STATUS_DELETED); return true; // prevents hard deletion } return parent::delete(); }
public function delete() { Context::get('db')->start_transaction(); // delete blog comment BlogComment::neo()->where('blog_id = ?', $this->id)->delete(); // delete blog parent::delete(); Context::get('db')->commit(); }