public function delete() { parent::delete(); if ($this->_model->hasDeletedFlag()) { $this->_beforeDelete(); $this->deleted = true; $this->save(); $this->_afterDelete(); } else { $this->_beforeDelete(); $id = $this->{$this->_getPrimaryKey()}; $this->_model->delete($this); $this->_afterDelete(); $this->_data = array_combine(array_keys($this->_data), array_fill(0, count($this->_data), null)); } }
public function delete() { parent::delete(); $this->_beforeDelete(); $this->_row->delete(); $this->_afterDelete(); }
public function delete() { parent::delete(); $this->_beforeDelete(); if ($this->_model->hasDeletedFlag()) { $this->_row->deleted = true; $this->_row->save(); } else { $this->_row->delete(); } $this->_afterDelete(); }